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

520 lines
27 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
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"
tools:context="org.thoughtcrime.securesms.preferences.SettingsActivity"
tools:theme="@style/Theme.Session.DayNight.NoActionBar"
tools:menu="@menu/settings_general">
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal">
<org.thoughtcrime.securesms.components.ProfilePictureView
android:id="@+id/profilePictureView"
android:layout_width="@dimen/large_profile_picture_size"
android:layout_height="@dimen/large_profile_picture_size"
android:layout_marginTop="@dimen/medium_spacing"
android:contentDescription="@string/AccessibilityId_profile_picture" />
<RelativeLayout
android:id="@+id/ctnGroupNameSection"
android:contentDescription="@string/AccessibilityId_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="@dimen/small_spacing"
android:layout_marginRight="@dimen/large_spacing">
<EditText
android:id="@+id/displayNameEditText"
style="@style/SessionEditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:contentDescription="@string/AccessibilityId_username"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:visibility="invisible"
android:hint="@string/activity_settings_display_name_edit_text_hint" />
<TextView
android:id="@+id/btnGroupNameDisplay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:contentDescription="@string/AccessibilityId_username"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/very_large_font_size"
android:textStyle="bold" />
</RelativeLayout>
<include layout="@layout/view_separator"
android:id="@+id/separatorView"
android:layout_width="match_parent"
android:layout_height="32dp"
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="20dp"
android:layout_marginRight="@dimen/large_spacing"/>
<TextView
android:id="@+id/publicKeyTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="@dimen/large_spacing"
android:layout_marginRight="@dimen/large_spacing"
android:textSize="@dimen/large_font_size"
android:textColor="?android:textColorPrimary"
android:fontFamily="@font/space_mono_regular"
android:textAlignment="center"
android:contentDescription="@string/AccessibilityId_session_id"
tools:text="05987d601943c267879be41830888066c6a024cbdc9a548d06813924bf3372ea78" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="@dimen/large_spacing"
android:layout_marginRight="@dimen/large_spacing"
android:orientation="horizontal">
<Button
style="@style/Widget.Session.Button.Common.ProminentOutline"
android:id="@+id/copyButton"
android:layout_width="0dp"
android:layout_height="@dimen/medium_button_height"
android:layout_weight="1"
android:text="@string/copy" />
<Button
style="@style/Widget.Session.Button.Common.ProminentOutline"
android:id="@+id/shareButton"
android:layout_width="0dp"
android:layout_height="@dimen/medium_button_height"
android:layout_weight="1"
android:layout_marginStart="@dimen/medium_spacing"
android:text="@string/share" />
</LinearLayout>
<LinearLayout
android:background="@drawable/preference_single_no_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing"
android:layout_marginHorizontal="@dimen/large_spacing"
android:orientation="vertical">
<!-- Path -->
<RelativeLayout
android:id="@+id/pathButton"
android:background="?selectableItemBackground"
android:orientation="horizontal"
android:layout_width="match_parent"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_height="@dimen/setting_button_height">
<FrameLayout
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:id="@+id/pathContainer"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size">
<org.thoughtcrime.securesms.home.PathStatusView
android:layout_gravity="center"
android:layout_width="@dimen/path_status_view_size"
android:layout_height="@dimen/path_status_view_size"/>
</FrameLayout>
<TextView
android:id="@+id/pathText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textStyle="bold"
android:gravity="center"
android:layout_toEndOf="@+id/pathContainer"
android:text="@string/activity_path_title" />
</RelativeLayout>
<View
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?colorDividerBackground" />
<RelativeLayout
android:id="@+id/privacyButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height">
<ImageView
android:id="@+id/privacyContainer"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_privacy_icon"
android:scaleType="centerInside"
app:tint="?android:textColorPrimary" />
<TextView
android:id="@+id/privacyText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textStyle="bold"
android:gravity="center"
android:layout_toEndOf="@+id/privacyContainer"
android:text="@string/activity_settings_privacy_button_title" />
</RelativeLayout>
<View
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?colorDividerBackground" />
<RelativeLayout
android:id="@+id/notificationsButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:contentDescription="@string/AccessibilityId_notifications">
<ImageView
android:id="@+id/notificationsContainer"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_speaker"
android:scaleType="centerInside"
app:tint="?android:textColorPrimary" />
<TextView
android:id="@+id/notificationsText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textStyle="bold"
android:gravity="center"
android:layout_toEndOf="@+id/notificationsContainer"
android:text="@string/activity_settings_notifications_button_title"
/>
</RelativeLayout>
<View
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?colorDividerBackground" />
<RelativeLayout
android:id="@+id/chatsButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:contentDescription="@string/AccessibilityId_conversations">
<ImageView
android:id="@+id/chatsContainer"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_conversations"
android:scaleType="centerInside"
app:tint="?android:textColorPrimary" />
<TextView
android:id="@+id/chatsText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textStyle="bold"
android:gravity="center"
android:layout_toEndOf="@+id/chatsContainer"
android:text="@string/activity_settings_conversations_button_title" />
</RelativeLayout>
<View
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?colorDividerBackground" />
<RelativeLayout
android:id="@+id/messageRequestsButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:contentDescription="@string/AccessibilityId_message_requests">
<ImageView
android:id="@+id/messageRequestsContainer"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_message_requests"
android:scaleType="centerInside"
app:tint="?android:textColorPrimary" />
<TextView
android:id="@+id/messageRequestsTexts"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textStyle="bold"
android:gravity="center"
android:layout_toEndOf="@+id/messageRequestsContainer"
android:text="@string/activity_settings_message_requests_button_title" />
</RelativeLayout>
<View
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?colorDividerBackground" />
<RelativeLayout
android:id="@+id/appearanceButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:contentDescription="@string/AccessibilityId_appearance">
<ImageView
android:id="@+id/appearanceContainer"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_appearance"
android:scaleType="centerInside"
app:tint="?android:textColorPrimary" />
<TextView
android:id="@+id/appearanceText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textStyle="bold"
android:gravity="center"
android:layout_toEndOf="@+id/appearanceContainer"
android:text="@string/activity_settings_message_appearance_button_title" />
</RelativeLayout>
<View
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?colorDividerBackground" />
<RelativeLayout
android:id="@+id/inviteFriendButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:contentDescription="@string/AccessibilityId_invite_friend">
<ImageView
android:id="@+id/inviteFriendContainer"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_invite_friend"
android:scaleType="centerInside"
app:tint="?android:textColorPrimary" />
<TextView
android:id="@+id/inviteFriendTexts"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textStyle="bold"
android:gravity="center"
android:layout_toEndOf="@+id/inviteFriendContainer"
android:text="@string/activity_settings_invite_button_title" />
</RelativeLayout>
<View
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?colorDividerBackground" />
<RelativeLayout
android:id="@+id/passwordButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:contentDescription="@string/AccessibilityId_recovery_password">
<ImageView
android:id="@+id/passwordContainer"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_recovery_phrase"
android:scaleType="centerInside"
app:tint="?android:textColorPrimary" />
<TextView
android:id="@+id/seedText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textStyle="bold"
android:gravity="center"
android:layout_toEndOf="@+id/passwordContainer"
android:text="@string/activity_settings_recovery_password_button_title" />
</RelativeLayout>
<View
android:id="@+id/passwordDivider"
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?colorDividerBackground" />
<RelativeLayout
android:id="@+id/helpButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:contentDescription="@string/AccessibilityId_help">
<ImageView
android:id="@+id/helpContainer"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_help"
android:scaleType="centerInside"
app:tint="?android:textColorPrimary" />
<TextView
android:id="@+id/helpTexts"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textStyle="bold"
android:gravity="center"
android:layout_toEndOf="@+id/helpContainer"
android:text="@string/activity_settings_help_button" />
</RelativeLayout>
<View
android:layout_marginHorizontal="@dimen/very_large_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?colorDividerBackground" />
<RelativeLayout
android:id="@+id/clearAllDataButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:contentDescription="@string/AccessibilityId_clear_data">
<ImageView
android:id="@+id/clearContainer"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_clear_data"
android:scaleType="centerInside"/>
<TextView
android:id="@+id/clearText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="@color/destructive"
android:textSize="@dimen/medium_font_size"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textStyle="bold"
android:gravity="center"
android:layout_toEndOf="@+id/clearContainer"
android:text="@string/activity_settings_clear_all_data_button_title" />
</RelativeLayout>
</LinearLayout>
<ImageView
android:id="@+id/oxenLogoImageView"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_spacing"
app:tint="?android:textColorPrimary"
android:src="@drawable/oxen_light_mode" />
<TextView
android:id="@+id/versionTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginBottom="@dimen/medium_spacing"
android:gravity="center"
android:text="@string/version_s"
android:textColor="?android:textColorPrimary"
android:alpha="0.6"
android:textSize="@dimen/very_small_font_size" />
</LinearLayout>
</ScrollView>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true">
<RelativeLayout
android:id="@+id/loader"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#A4000000"
android:visibility="gone">
<com.github.ybq.android.spinkit.SpinKitView
style="@style/SpinKitView.Large.ThreeBounce"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="8dp"
app:SpinKit_Color="@android:color/white" />
</RelativeLayout>
</FrameLayout>
</RelativeLayout>