mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-02-02 11:59:23 +00:00
207 lines
No EOL
10 KiB
XML
207 lines
No EOL
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:linphone="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
<data>
|
|
<import type="android.view.View"/>
|
|
<import type="android.text.InputType"/>
|
|
<variable
|
|
name="backClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="viewModel"
|
|
type="org.linphone.activities.main.settings.viewmodels.SettingsViewModel" />
|
|
</data>
|
|
|
|
<androidx.slidingpanelayout.widget.SlidingPaneLayout
|
|
android:id="@+id/sliding_pane"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:context=".MainActivity">
|
|
|
|
<RelativeLayout
|
|
android:layout_width="@dimen/master_fragment_width"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="start">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/top_bar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="@dimen/main_activity_top_bar_size"
|
|
android:layout_gravity="center_horizontal"
|
|
android:background="?attr/lightToolbarBackgroundColor"
|
|
android:orientation="horizontal">
|
|
|
|
<ImageView
|
|
android:id="@+id/back"
|
|
android:onClick="@{backClickListener}"
|
|
android:contentDescription="@string/content_description_go_back"
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="0.2"
|
|
android:background="?attr/button_background_drawable"
|
|
android:padding="18dp"
|
|
android:src="@drawable/back" />
|
|
|
|
<TextView
|
|
style="@style/accent_colored_title_font"
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="0.6"
|
|
android:gravity="center"
|
|
android:singleLine="true"
|
|
android:ellipsize="end"
|
|
android:padding="15dp"
|
|
android:text="@string/settings"/>
|
|
|
|
<View
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="0.2"
|
|
android:visibility="invisible" />
|
|
|
|
</LinearLayout>
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:layout_below="@id/top_bar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="5dp"
|
|
android:paddingBottom="5dp"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
style="@style/settings_category_font"
|
|
android:text="@string/settings_primary_account_title"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_text"
|
|
linphone:title="@{@string/settings_primary_account_display_name_title}"
|
|
linphone:listener="@{viewModel.primaryAccountDisplayNameListener}"
|
|
linphone:defaultValue="@{viewModel.primaryAccountDisplayName}"
|
|
linphone:inputType="@{InputType.TYPE_CLASS_TEXT}"
|
|
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_text"
|
|
linphone:title="@{@string/settings_primary_account_username_title}"
|
|
linphone:listener="@{viewModel.primaryAccountUsernameListener}"
|
|
linphone:defaultValue="@{viewModel.primaryAccountUsername}"
|
|
linphone:inputType="@{InputType.TYPE_CLASS_TEXT}"
|
|
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
|
|
<TextView
|
|
style="@style/settings_category_font"
|
|
android:text="@string/settings_accounts_title"
|
|
android:visibility="@{viewModel.showAccountSettings && !viewModel.accounts.empty ? View.VISIBLE : View.GONE}"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"/>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:visibility="@{viewModel.showAccountSettings ? View.VISIBLE : View.GONE}"
|
|
linphone:entries="@{viewModel.accounts}"
|
|
linphone:layout="@{@layout/settings_account_cell}"/>
|
|
|
|
<TextView
|
|
style="@style/settings_category_font"
|
|
android:text="@string/settings_list_title"
|
|
android:paddingTop="15dp"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_basic"
|
|
linphone:listener="@{viewModel.tunnelSettingsListener}"
|
|
android:visibility="@{viewModel.showTunnelSettings ? View.VISIBLE : View.GONE}"
|
|
linphone:title="@{@string/settings_tunnel_title}" />
|
|
|
|
<include
|
|
layout="@layout/settings_widget_basic"
|
|
android:visibility="@{viewModel.showAudioSettings ? View.VISIBLE : View.GONE}"
|
|
linphone:listener="@{viewModel.audioSettingsListener}"
|
|
linphone:title="@{@string/settings_audio_title}"
|
|
linphone:icon="@{@drawable/settings_audio}" />
|
|
|
|
<include
|
|
layout="@layout/settings_widget_basic"
|
|
android:visibility="@{viewModel.showVideoSettings ? View.VISIBLE : View.GONE}"
|
|
linphone:listener="@{viewModel.videoSettingsListener}"
|
|
linphone:title="@{@string/settings_video_title}"
|
|
linphone:icon="@{@drawable/settings_video}" />
|
|
|
|
<include
|
|
layout="@layout/settings_widget_basic"
|
|
android:visibility="@{viewModel.showCallSettings ? View.VISIBLE : View.GONE}"
|
|
linphone:listener="@{viewModel.callSettingsListener}"
|
|
linphone:title="@{@string/settings_call_title}"
|
|
linphone:icon="@{@drawable/settings_call}" />
|
|
|
|
<include
|
|
layout="@layout/settings_widget_basic"
|
|
android:visibility="@{viewModel.showChatSettings ? View.VISIBLE : View.GONE}"
|
|
linphone:listener="@{viewModel.chatSettingsListener}"
|
|
linphone:title="@{@string/settings_chat_title}"
|
|
linphone:icon="@{@drawable/settings_chat}" />
|
|
|
|
<include
|
|
layout="@layout/settings_widget_basic"
|
|
android:visibility="@{viewModel.showNetworkSettings ? View.VISIBLE : View.GONE}"
|
|
linphone:listener="@{viewModel.networkSettingsListener}"
|
|
linphone:title="@{@string/settings_network_title}"
|
|
linphone:icon="@{@drawable/settings_network}" />
|
|
|
|
<include
|
|
layout="@layout/settings_widget_basic"
|
|
android:visibility="@{viewModel.showContactsSettings ? View.VISIBLE : View.GONE}"
|
|
linphone:listener="@{viewModel.contactsSettingsListener}"
|
|
linphone:title="@{@string/settings_contacts_title}"
|
|
linphone:icon="@{@drawable/settings_contacts}" />
|
|
|
|
<include
|
|
layout="@layout/settings_widget_basic"
|
|
android:visibility="@{viewModel.showAdvancedSettings ? View.VISIBLE : View.GONE}"
|
|
linphone:listener="@{viewModel.advancedSettingsListener}"
|
|
linphone:title="@{@string/settings_advanced_title}"
|
|
linphone:icon="@{@drawable/settings_advanced}" />
|
|
|
|
</LinearLayout>
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
<View
|
|
android:layout_width="1dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_alignParentRight="true"
|
|
android:background="?attr/dividerColor" />
|
|
|
|
</RelativeLayout>
|
|
|
|
<androidx.fragment.app.FragmentContainerView
|
|
android:id="@+id/settings_nav_container"
|
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
|
android:layout_width="300dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
linphone:defaultNavHost="false"
|
|
linphone:navGraph="@navigation/settings_nav_graph"/>
|
|
|
|
</androidx.slidingpanelayout.widget.SlidingPaneLayout>
|
|
|
|
</layout> |