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) {
|
if (cfg == proxyConfigToCheck) {
|
||||||
Log.i("[Assistant] [Generic Login] Registration state is $state: $message")
|
Log.i("[Assistant] [Generic Login] Registration state is $state: $message")
|
||||||
waitForServerAnswer.value = false
|
|
||||||
if (state == RegistrationState.Ok) {
|
if (state == RegistrationState.Ok) {
|
||||||
|
waitForServerAnswer.value = false
|
||||||
leaveAssistantEvent.value = Event(true)
|
leaveAssistantEvent.value = Event(true)
|
||||||
core.removeListener(this)
|
core.removeListener(this)
|
||||||
} else if (state == RegistrationState.Failed) {
|
} else if (state == RegistrationState.Failed) {
|
||||||
|
waitForServerAnswer.value = false
|
||||||
invalidCredentialsEvent.value = Event(true)
|
invalidCredentialsEvent.value = Event(true)
|
||||||
core.removeListener(this)
|
core.removeListener(this)
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,139 +118,144 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.core.widget.NestedScrollView
|
||||||
android:visibility="@{viewModel.showAccounts ? View.VISIBLE : View.GONE}"
|
android:layout_width="wrap_content"
|
||||||
android:id="@+id/additional_accounts"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/main_account"
|
android:layout_below="@id/main_account"
|
||||||
android:layout_width="match_parent"
|
android:layout_above="@id/side_menu_quit">
|
||||||
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">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:onClick="@{assistantClickListener}"
|
|
||||||
android:visibility="@{viewModel.showAssistant ? View.VISIBLE : View.GONE}"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="45dp">
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:layout_width="45dp"
|
android:visibility="@{viewModel.showAccounts ? View.VISIBLE : View.GONE}"
|
||||||
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_width="match_parent"
|
||||||
android:layout_height="45dp"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="5dp"
|
app:entries="@{viewModel.accounts}"
|
||||||
android:paddingRight="16dp" />
|
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>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
</androidx.core.widget.NestedScrollView>
|
||||||
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>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/side_menu_quit"
|
android:id="@+id/side_menu_quit"
|
||||||
|
|
Loading…
Reference in a new issue