mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-02-07 06:49:45 +00:00
229 lines
No EOL
11 KiB
XML
229 lines
No EOL
11 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">
|
|
|
|
<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.CallSettingsViewModel"/>
|
|
<variable
|
|
name="sharedMainViewModel"
|
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
|
</data>
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<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:visibility="@{sharedMainViewModel.isSlidingPaneSlideable ? View.VISIBLE : View.GONE}"
|
|
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_call_title"/>
|
|
|
|
<View
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="0.2"
|
|
android:visibility="@{sharedMainViewModel.isSlidingPaneSlideable ? View.INVISIBLE : View.GONE}" />
|
|
|
|
</LinearLayout>
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_below="@id/top_bar">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_device_ringtone_title}"
|
|
android:visibility="@{viewModel.showRingtonesList ? View.GONE : View.VISIBLE}"
|
|
linphone:listener="@{viewModel.deviceRingtoneListener}"
|
|
linphone:checked="@={viewModel.deviceRingtone}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_list"
|
|
android:visibility="@{viewModel.showRingtonesList ? View.VISIBLE : View.GONE, default=gone}"
|
|
linphone:title="@{@string/call_settings_ringtones_title}"
|
|
linphone:listener="@{viewModel.ringtoneListener}"
|
|
linphone:selectedIndex="@{viewModel.ringtoneIndex}"
|
|
linphone:labels="@{viewModel.ringtoneLabels}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_vibrate_title}"
|
|
linphone:listener="@{viewModel.vibrateOnIncomingCallListener}"
|
|
linphone:checked="@={viewModel.vibrateOnIncomingCall}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_list"
|
|
linphone:title="@{@string/call_settings_encryption_title}"
|
|
linphone:listener="@{viewModel.encryptionListener}"
|
|
linphone:selectedIndex="@{viewModel.encryptionIndex}"
|
|
linphone:labels="@{viewModel.encryptionLabels}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_encryption_mandatory_title}"
|
|
linphone:listener="@{viewModel.encryptionMandatoryListener}"
|
|
linphone:checked="@={viewModel.encryptionMandatory}"
|
|
linphone:enabled="@{viewModel.encryptionIndex != 0}" />
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_use_telecom_manager_title}"
|
|
linphone:subtitle="@{@string/call_settings_use_telecom_manager_summary}"
|
|
android:visibility="@{viewModel.api26OrHigher ? View.VISIBLE : View.GONE}"
|
|
linphone:listener="@{viewModel.useTelecomManagerListener}"
|
|
linphone:checked="@={viewModel.useTelecomManager}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_overlay_title}"
|
|
linphone:listener="@{viewModel.overlayListener}"
|
|
linphone:checked="@={viewModel.overlay}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_system_wide_overlay_title}"
|
|
linphone:subtitle="@{@string/call_settings_system_wide_overlay_summary}"
|
|
linphone:listener="@{viewModel.systemWideOverlayListener}"
|
|
linphone:checked="@={viewModel.systemWideOverlay}"
|
|
linphone:enabled="@{viewModel.overlay}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_sipinfo_dtmf_title}"
|
|
linphone:listener="@{viewModel.sipInfoDtmfListener}"
|
|
linphone:checked="@={viewModel.sipInfoDtmf}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_rfc2833_dtmf_title}"
|
|
linphone:listener="@{viewModel.rfc2833DtmfListener}"
|
|
linphone:checked="@={viewModel.rfc2833Dtmf}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_auto_start_recording_title}"
|
|
linphone:listener="@{viewModel.autoStartCallRecordingListener}"
|
|
linphone:checked="@={viewModel.autoStartCallRecording}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_remote_recording_title}"
|
|
linphone:listener="@{viewModel.remoteCallRecordingListener}"
|
|
linphone:checked="@={viewModel.remoteCallRecording}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_auto_start_title}"
|
|
linphone:subtitle="@{@string/call_settings_auto_start_summary}"
|
|
linphone:listener="@{viewModel.autoStartListener}"
|
|
linphone:checked="@={viewModel.autoStart}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_auto_answer_title}"
|
|
linphone:listener="@{viewModel.autoAnswerListener}"
|
|
linphone:checked="@={viewModel.autoAnswer}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_text"
|
|
linphone:title="@{@string/call_settings_auto_answer_delay_title}"
|
|
linphone:subtitle="@{@string/call_settings_auto_answer_delay_summary}"
|
|
linphone:listener="@{viewModel.autoAnswerDelayListener}"
|
|
linphone:defaultValue="@{viewModel.autoAnswerDelay.toString()}"
|
|
linphone:inputType="@{InputType.TYPE_CLASS_NUMBER}"
|
|
linphone:enabled="@{viewModel.autoAnswer}"
|
|
android:visibility="@{viewModel.autoAnswer ? View.VISIBLE : View.GONE}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_text"
|
|
linphone:title="@{@string/call_settings_incoming_timeout_title}"
|
|
linphone:subtitle="@{@string/call_settings_incoming_timeout_summary}"
|
|
linphone:listener="@{viewModel.incomingTimeoutListener}"
|
|
linphone:defaultValue="@{viewModel.incomingTimeout.toString()}"
|
|
linphone:inputType="@{InputType.TYPE_CLASS_NUMBER}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_text"
|
|
linphone:title="@{@string/call_settings_voice_mail_uri_title}"
|
|
linphone:listener="@{viewModel.voiceMailUriListener}"
|
|
linphone:defaultValue="@{viewModel.voiceMailUri}"
|
|
linphone:inputType="@{InputType.TYPE_TEXT_VARIATION_URI}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_redirect_to_voice_mail_declined_calls_title}"
|
|
linphone:listener="@{viewModel.redirectToVoiceMailIncomingDeclinedCallsListener}"
|
|
linphone:checked="@={viewModel.redirectToVoiceMailIncomingDeclinedCalls}"
|
|
linphone:enabled="@{viewModel.voiceMailUri.length() > 0}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_accept_early_media_title}"
|
|
linphone:listener="@{viewModel.acceptEarlyMediaListener}"
|
|
linphone:checked="@={viewModel.acceptEarlyMedia}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_ring_during_early_media_title}"
|
|
linphone:listener="@{viewModel.ringDuringEarlyMediaListener}"
|
|
linphone:checked="@={viewModel.ringDuringEarlyMedia}"
|
|
linphone:enabled="@{viewModel.acceptEarlyMedia}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_switch"
|
|
linphone:title="@{@string/call_settings_pause_calls_lost_audio_focus_title}"
|
|
linphone:listener="@{viewModel.pauseCallsWhenAudioFocusIsLostListener}"
|
|
linphone:checked="@={viewModel.pauseCallsWhenAudioFocusIsLost}"
|
|
linphone:enabled="@{!viewModel.useTelecomManager}"/>
|
|
|
|
<include
|
|
layout="@layout/settings_widget_basic"
|
|
linphone:listener="@{viewModel.goToAndroidNotificationSettingsListener}"
|
|
linphone:title="@{@string/call_settings_go_to_android_notification_settings}" />
|
|
|
|
</LinearLayout>
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
</RelativeLayout>
|
|
|
|
</layout> |