mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-28 00:59:19 +00:00
282 lines
No EOL
12 KiB
XML
282 lines
No EOL
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
|
|
<data>
|
|
<import type="android.view.View"/>
|
|
<variable
|
|
name="selfPictureClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="assistantClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="settingsClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="recordingsClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="aboutClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="quitClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="viewModel"
|
|
type="org.linphone.activities.main.sidemenu.viewmodels.SideMenuViewModel" />
|
|
</data>
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:clickable="true"
|
|
android:background="?attr/backgroundColor">
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/main_account"
|
|
android:onClick="@{() -> viewModel.defaultAccount.accountsSettingsListener.onAccountClicked(viewModel.defaultAccount.identity)}"
|
|
android:enabled="@{viewModel.defaultAccountFound}"
|
|
android:visibility="@{viewModel.showAccounts ? View.VISIBLE : View.GONE}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="70dp"
|
|
android:background="?attr/lightToolbarBackgroundColor">
|
|
|
|
<ImageView
|
|
android:visibility="@{viewModel.defaultAccountFound ? View.VISIBLE : View.GONE}"
|
|
android:onClick="@{selfPictureClickListener}"
|
|
android:id="@+id/avatar"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:adjustViewBounds="true"
|
|
android:padding="10dp"
|
|
android:src="@drawable/avatar"
|
|
android:contentDescription="@string/content_description_change_own_picture"
|
|
glideAvatarFallback="@{viewModel.defaultAccountAvatar}" />
|
|
|
|
<ImageView
|
|
android:visibility="@{viewModel.defaultAccountFound ? View.VISIBLE : View.GONE}"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:adjustViewBounds="true"
|
|
android:padding="10dp"
|
|
android:contentDescription="@null"
|
|
android:src="@drawable/avatar_border" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_toRightOf="@id/avatar"
|
|
android:gravity="center_vertical"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:visibility="@{viewModel.defaultAccountFound ? View.GONE : View.VISIBLE, default=gone}"
|
|
android:text="@string/no_account_configured"
|
|
android:textColor="?attr/lightToolbarTextColor"
|
|
android:textStyle="bold"
|
|
android:textSize="18sp"
|
|
android:padding="10dp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
|
|
<TextView
|
|
android:visibility="@{viewModel.defaultAccountFound ? View.VISIBLE : View.GONE}"
|
|
android:text="@{viewModel.defaultAccount.displayName}"
|
|
android:textColor="?attr/lightToolbarTextColor"
|
|
android:textStyle="bold"
|
|
android:textSize="18sp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
|
|
<TextView
|
|
android:visibility="@{viewModel.defaultAccountFound ? View.VISIBLE : View.GONE}"
|
|
android:text="@{viewModel.defaultAccount.displayUsernameInsteadOfIdentity ? viewModel.defaultAccount.userName : viewModel.defaultAccount.identity}"
|
|
style="@style/sip_uri_small_font"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
|
|
</LinearLayout>
|
|
|
|
<ImageView
|
|
android:src="@{viewModel.defaultAccount.iconResource}"
|
|
android:contentDescription="@{viewModel.defaultAccount.iconContentDescription}"
|
|
android:layout_width="25dp"
|
|
android:layout_height="25dp"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_marginTop="10dp"
|
|
android:padding="5dp" />
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_alignParentBottom="true"
|
|
android:background="?attr/dividerColor" />
|
|
|
|
</RelativeLayout>
|
|
|
|
<LinearLayout
|
|
android:visibility="@{viewModel.showAccounts ? View.VISIBLE : View.GONE}"
|
|
android:id="@+id/additional_accounts"
|
|
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">
|
|
|
|
<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
|
|
android:id="@+id/side_menu_quit"
|
|
android:onClick="@{quitClickListener}"
|
|
android:visibility="@{viewModel.showQuit ? View.VISIBLE : View.GONE}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="50dp"
|
|
android:layout_alignParentBottom="true"
|
|
android:background="?attr/accentColor"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical">
|
|
|
|
<ImageView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:padding="5dp"
|
|
android:contentDescription="@string/quit"
|
|
android:src="@drawable/quit_default" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="?attr/accentTextColor"
|
|
android:textSize="21sp"
|
|
android:text="@string/quit" />
|
|
|
|
</LinearLayout>
|
|
|
|
</RelativeLayout>
|
|
|
|
</layout> |