Minor UI fix for generic SIP login + added scrolling to side menu
This commit is contained in:
parent
804bf6dc64
commit
78e66d4cf2
2 changed files with 131 additions and 125 deletions
|
@ -74,11 +74,12 @@ class GenericLoginViewModel(private val accountCreator: AccountCreator) : ViewMo
|
|||
) {
|
||||
if (cfg == proxyConfigToCheck) {
|
||||
Log.i("[Assistant] [Generic Login] Registration state is $state: $message")
|
||||
waitForServerAnswer.value = false
|
||||
if (state == RegistrationState.Ok) {
|
||||
waitForServerAnswer.value = false
|
||||
leaveAssistantEvent.value = Event(true)
|
||||
core.removeListener(this)
|
||||
} else if (state == RegistrationState.Failed) {
|
||||
waitForServerAnswer.value = false
|
||||
invalidCredentialsEvent.value = Event(true)
|
||||
core.removeListener(this)
|
||||
}
|
||||
|
|
|
@ -118,139 +118,144 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="@{viewModel.showAccounts ? View.VISIBLE : View.GONE}"
|
||||
android:id="@+id/additional_accounts"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/main_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:entries="@{viewModel.accounts}"
|
||||
app:layout="@{@layout/side_menu_account_cell}"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_below="@id/additional_accounts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_above="@id/side_menu_quit">
|
||||
|
||||
<LinearLayout
|
||||
android:onClick="@{assistantClickListener}"
|
||||
android:visibility="@{viewModel.showAssistant ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="10dp"
|
||||
android:contentDescription="@string/assistant"
|
||||
android:src="@drawable/menu_assistant" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant"
|
||||
style="@style/standard_text_font"
|
||||
<LinearLayout
|
||||
android:visibility="@{viewModel.showAccounts ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="16dp" />
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:entries="@{viewModel.accounts}"
|
||||
app:layout="@{@layout/side_menu_account_cell}"/>
|
||||
|
||||
<LinearLayout
|
||||
android:onClick="@{assistantClickListener}"
|
||||
android:visibility="@{viewModel.showAssistant ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="10dp"
|
||||
android:contentDescription="@string/assistant"
|
||||
android:src="@drawable/menu_assistant" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant"
|
||||
style="@style/standard_text_font"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
|
||||
<LinearLayout
|
||||
android:onClick="@{settingsClickListener}"
|
||||
android:visibility="@{viewModel.showSettings ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="10dp"
|
||||
android:contentDescription="@string/settings"
|
||||
android:src="@drawable/menu_options" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/settings"
|
||||
style="@style/standard_text_font"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
|
||||
<LinearLayout
|
||||
android:onClick="@{recordingsClickListener}"
|
||||
android:visibility="@{viewModel.showRecordings ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="10dp"
|
||||
android:contentDescription="@string/recordings"
|
||||
android:src="@drawable/menu_recordings" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/recordings"
|
||||
style="@style/standard_text_font"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
|
||||
<LinearLayout
|
||||
android:onClick="@{aboutClickListener}"
|
||||
android:visibility="@{viewModel.showAbout ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="10dp"
|
||||
android:contentDescription="@string/about"
|
||||
android:src="@drawable/menu_about" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/about"
|
||||
style="@style/standard_text_font"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
|
||||
<LinearLayout
|
||||
android:onClick="@{settingsClickListener}"
|
||||
android:visibility="@{viewModel.showSettings ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="10dp"
|
||||
android:contentDescription="@string/settings"
|
||||
android:src="@drawable/menu_options" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/settings"
|
||||
style="@style/standard_text_font"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
|
||||
<LinearLayout
|
||||
android:onClick="@{recordingsClickListener}"
|
||||
android:visibility="@{viewModel.showRecordings ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="10dp"
|
||||
android:contentDescription="@string/recordings"
|
||||
android:src="@drawable/menu_recordings" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/recordings"
|
||||
style="@style/standard_text_font"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
|
||||
<LinearLayout
|
||||
android:onClick="@{aboutClickListener}"
|
||||
android:visibility="@{viewModel.showAbout ? View.VISIBLE : View.GONE}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="10dp"
|
||||
android:contentDescription="@string/about"
|
||||
android:src="@drawable/menu_about" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/about"
|
||||
style="@style/standard_text_font"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/side_menu_quit"
|
||||
|
|
Loading…
Reference in a new issue