session-android/app/src/main/res/layout/activity_appearance_settings.xml

352 lines
17 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
tools:context="org.thoughtcrime.securesms.preferences.appearance.AppearanceSettingsActivity"
android:id="@+id/scrollView"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:textColor="?android:textColorTertiary"
android:textSize="@dimen/medium_font_size"
android:paddingHorizontal="@dimen/large_spacing"
android:paddingVertical="@dimen/small_spacing"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/activity_appearance_themes_category"/>
<androidx.cardview.widget.CardView
app:cardElevation="0dp"
app:cardCornerRadius="@dimen/dialog_corner_radius"
android:layout_marginHorizontal="@dimen/medium_spacing"
app:cardBackgroundColor="?colorSettingsBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/theme_option_classic_dark"
android:addStatesFromChildren="true"
android:background="?selectableItemBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Classic.Dark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:lines="1"
android:textSize="16sp"
android:text="@string/classic_dark_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_classic_dark"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<View
android:alpha="0.15"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:textColorPrimary"/>
<LinearLayout
android:id="@+id/theme_option_classic_light"
android:addStatesFromChildren="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Classic.Light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textSize="16sp"
android:lines="1"
android:text="@string/classic_light_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_classic_light"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<View
android:alpha="0.15"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:textColorPrimary"/>
<LinearLayout
android:id="@+id/theme_option_ocean_dark"
android:addStatesFromChildren="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Ocean.Dark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textSize="16sp"
android:lines="1"
android:text="@string/ocean_dark_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_ocean_dark"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<View
android:alpha="0.15"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:textColorPrimary"/>
<LinearLayout
android:id="@+id/theme_option_ocean_light"
android:addStatesFromChildren="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Ocean.Light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textSize="16sp"
android:lines="1"
android:text="@string/ocean_light_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_ocean_light"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<TextView
android:textColor="?android:textColorTertiary"
android:textSize="@dimen/medium_font_size"
android:paddingHorizontal="@dimen/large_spacing"
android:paddingVertical="@dimen/small_spacing"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/activity_appearance_primary_color_category"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/preference_single"
android:orientation="vertical">
<LinearLayout
android:layout_marginTop="@dimen/large_spacing"
android:background="@drawable/fake_chat_view_incoming_message_background"
android:padding="12dp"
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_gravity="start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:textSize="12sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?message_received_text_color"
android:text="How are you?"
android:gravity="center"
android:drawablePadding="12dp"
app:drawableLeftCompat="@drawable/quote_accent_line"
tools:ignore="HardcodedText" />
<TextView
android:layout_marginTop="4dp"
android:text="I'm good thanks, you?"
android:textColor="?message_received_text_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_marginVertical="@dimen/large_spacing"
android:background="@drawable/fake_chat_view_outgoing_message_background"
android:padding="12dp"
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_gravity="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:text="I'm doing great, thanks."
android:textColor="?message_sent_text_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/accent_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginVertical="@dimen/small_spacing"
android:layout_marginHorizontal="@dimen/small_spacing">
<View
android:id="@+id/accent_green"
android:background="@drawable/padded_circle_tintable"
android:backgroundTint="@color/accent_green"
android:foreground="@drawable/radial_select"
android:layout_width="@dimen/radial_size"
android:layout_height="@dimen/radial_size"/>
<View
android:id="@+id/accent_blue"
android:background="@drawable/padded_circle_tintable"
android:backgroundTint="@color/accent_blue"
android:foreground="@drawable/radial_select"
android:layout_width="@dimen/radial_size"
android:layout_height="@dimen/radial_size"/>
<View
android:id="@+id/accent_yellow"
android:background="@drawable/padded_circle_tintable"
android:backgroundTint="@color/accent_yellow"
android:foreground="@drawable/radial_select"
android:layout_width="@dimen/radial_size"
android:layout_height="@dimen/radial_size"/>
<View
android:id="@+id/accent_pink"
android:background="@drawable/padded_circle_tintable"
android:backgroundTint="@color/accent_pink"
android:foreground="@drawable/radial_select"
android:layout_width="@dimen/radial_size"
android:layout_height="@dimen/radial_size"/>
<View
android:id="@+id/accent_purple"
android:background="@drawable/padded_circle_tintable"
android:backgroundTint="@color/accent_purple"
android:foreground="@drawable/radial_select"
android:layout_width="@dimen/radial_size"
android:layout_height="@dimen/radial_size"/>
<View
android:id="@+id/accent_orange"
android:background="@drawable/padded_circle_tintable"
android:backgroundTint="@color/accent_orange"
android:foreground="@drawable/radial_select"
android:layout_width="@dimen/radial_size"
android:layout_height="@dimen/radial_size"/>
<View
android:id="@+id/accent_red"
android:background="@drawable/padded_circle_tintable"
android:backgroundTint="@color/accent_red"
android:foreground="@drawable/radial_select"
android:layout_width="@dimen/radial_size"
android:layout_height="@dimen/radial_size"/>
</LinearLayout>
<TextView
android:textColor="?android:textColorTertiary"
android:textSize="@dimen/medium_font_size"
android:paddingHorizontal="@dimen/large_spacing"
android:paddingVertical="@dimen/small_spacing"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/activity_appearance_follow_system_category"/>
<androidx.cardview.widget.CardView
app:cardElevation="0dp"
android:elevation="0dp"
app:cardBackgroundColor="?colorSettingsBackground"
app:cardCornerRadius="@dimen/dialog_corner_radius"
android:layout_margin="@dimen/medium_spacing"
android:layout_marginBottom="@dimen/massive_spacing"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/system_settings_switch_holder"
android:background="?selectableItemBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:addStatesFromChildren="true"
android:gravity="center">
<TextView
android:textColor="?android:textColorPrimary"
android:textStyle="bold"
android:textSize="@dimen/medium_font_size"
android:paddingHorizontal="@dimen/large_spacing"
android:paddingVertical="@dimen/small_spacing"
android:text="@string/activity_appearance_follow_system_explanation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/system_settings_switch"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</ScrollView>