mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 04:18:53 +01:00
Introduce conversation settings screen
This commit is contained in:
committed by
Torsten Grote
parent
baa0341727
commit
e10b6334f5
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/BriarToolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/abc_ic_ab_back_material"
|
||||
app:title="@string/disappearing_messages_title" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:paddingHorizontal="@dimen/margin_large"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageViewBomb"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_bomb"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/switchDisappearingMessages"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:enabled="false"
|
||||
android:text="@string/disappearing_messages_summary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageViewBomb" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/buttonLearnMore"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_large"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:text="@string/learn_more"
|
||||
android:textColor="@color/briar_text_link"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/switchDisappearingMessages" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingHorizontal="?dialogPreferredPadding">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/disappearing_messages_explanation_long"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</ScrollView>
|
||||
@@ -17,9 +17,8 @@
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_auto_delete"
|
||||
android:checkable="true"
|
||||
android:title="@string/menu_item_auto_delete"
|
||||
android:id="@+id/action_conversation_settings"
|
||||
android:title="@string/menu_item_disappearing_messages"
|
||||
android:visible="false"
|
||||
app:showAsAction="never"
|
||||
tools:visible="true" />
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
<string name="image_attach_error_invalid_mime_type">Image format unsupported: %s</string>
|
||||
<string name="set_contact_alias">Change contact name</string>
|
||||
<string name="set_contact_alias_hint">Contact name</string>
|
||||
<string name="menu_item_auto_delete">Disappearing messages</string>
|
||||
<string name="menu_item_disappearing_messages">Disappearing messages</string>
|
||||
<string name="auto_delete_msg_you_enabled">Your messages will disappear after 7 days.</string>
|
||||
<string name="auto_delete_msg_you_disabled">Your messages will not disappear.</string>
|
||||
<string name="auto_delete_msg_contact_enabled">%1$s\'s messages will disappear after 7 days.</string>
|
||||
@@ -557,6 +557,19 @@
|
||||
<string name="choose_ringtone_title">Choose ringtone</string>
|
||||
<string name="cannot_load_ringtone">Cannot load ringtone</string>
|
||||
|
||||
<!-- Conversation Settings -->
|
||||
<string name="disappearing_messages_title">Disappearing messages</string>
|
||||
<string name="disappearing_messages_explanation_long">Turning on this setting will make new
|
||||
messages in this conversation automatically disappear 7\u00A0days after being received.
|
||||
This applies to messages you send to your contact as well as messages your contact sends to you.
|
||||
Your contact can also change this setting for the both of you.
|
||||
\n\nMessages that will disappear are marked with a bomb icon.
|
||||
\n\nKeep in mind that recipients can still make copies of the messages you send.
|
||||
\n\nIf you change this setting, it will apply to your messages immediately and to your
|
||||
contact\'s messages once they receive your next message.</string>
|
||||
<string name="learn_more">Learn more</string>
|
||||
<string name="disappearing_messages_summary">Make future messages in this conversation automatically disappear 7\u00A0days after being received.</string>
|
||||
|
||||
<!-- Settings Feedback -->
|
||||
<string name="send_feedback">Send feedback</string>
|
||||
|
||||
|
||||
@@ -43,6 +43,16 @@
|
||||
<item name="android:filterTouchesWhenObscured">true</item>
|
||||
</style>
|
||||
|
||||
<style name="BriarFullScreenDialogTheme" parent="BriarDialogTheme">
|
||||
<item name="android:windowIsFloating">false</item>
|
||||
<item name="android:windowAnimationStyle">@style/FullScreenDialogAnimation</item>
|
||||
</style>
|
||||
|
||||
<style name="FullScreenDialogAnimation" parent="@android:style/Animation.Activity">
|
||||
<item name="android:windowEnterAnimation">@anim/step_next_in</item>
|
||||
<item name="android:windowExitAnimation">@anim/step_next_out</item>
|
||||
</style>
|
||||
|
||||
<!-- Use this with care. Only used for the screen filter warning dialog -->
|
||||
<style name="BriarDialogThemeNoFilter" parent="BriarDialogTheme">
|
||||
<item name="android:filterTouchesWhenObscured">false</item>
|
||||
|
||||
Reference in New Issue
Block a user