Layouts' default background replaced with a proper theme level window background.

Bottom sheet style unified.
This commit is contained in:
Anton Chekulaev 2020-08-21 15:06:39 +10:00
parent fef7154cb4
commit dd37adee5c
67 changed files with 179 additions and 227 deletions

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@android:color/transparent"
android:endColor="#CCFCFCFC"
android:angle="270" />
</shape>

View File

@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/dialog_background" />
<solid android:color="?attr/dialog_background_color" />
<corners android:topLeftRadius="24dp" android:topRightRadius="24dp" />

View File

@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/dialog_background" />
<solid android:color="?attr/dialog_background_color" />
<corners android:radius="@dimen/dialog_corner_radius" />

View File

@ -4,8 +4,8 @@
android:shape="rectangle">
<gradient
android:startColor="@android:color/transparent"
android:endColor="#CC000000"
android:centerColor="?attr/home_gradient_start"
android:endColor="?attr/home_gradient_end"
android:angle="270" />
</shape>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM4,12c0,-4.42 3.58,-8 8,-8 1.85,0 3.55,0.63 4.9,1.69L5.69,16.9C4.63,15.55 4,13.85 4,12zM12,20c-1.85,0 -3.55,-0.63 -4.9,-1.69L18.31,7.1C19.37,8.45 20,10.15 20,12c0,4.42 -3.58,8 -8,8z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
</vector>

View File

@ -1,5 +1,11 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M13,8.2l-1,-1 -4,4 -4,-4 -1,1 4,4 -4,4 1,1 4,-4 4,4 1,-1 -4,-4 4,-4zM19,1H9c-1.1,0 -2,0.9 -2,2v3h2V4h10v16H9v-2H7v3c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-2 -2,-2z"/>
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M13,8.2l-1,-1 -4,4 -4,-4 -1,1 4,4 -4,4 1,1 4,-4 4,4 1,-1 -4,-4 4,-4zM19,1H9c-1.1,0 -2,0.9 -2,2v3h2V4h10v16H9v-2H7v3c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-2 -2,-2z"/>
</vector>

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:gravity="center_horizontal"
android:orientation="vertical">

View File

@ -4,7 +4,6 @@
android:id="@+id/contentView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:gravity="center_horizontal"
android:orientation="vertical">

View File

@ -4,7 +4,6 @@
android:id="@+id/contentView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:gravity="center_horizontal"
android:orientation="vertical">

View File

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:paddingLeft="@dimen/very_large_spacing"
android:paddingTop="@dimen/large_spacing"
android:paddingRight="@dimen/very_large_spacing"
android:paddingBottom="@dimen/very_large_spacing"
app:behavior_hideable="true"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
android:background="@drawable/default_bottom_sheet_background_inset">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Changes to Multi-Device"
android:textColor="@color/text"
android:textStyle="bold"
android:textSize="@dimen/very_large_font_size" />
<TextView
android:id="@+id/explanationTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing"
android:text="Youre seeing this because you have a secondary device linked to your Session ID. To improve reliability and stability, weve decided to temporarily disable Sessions multi-device functionality. Device linking has been disabled, and existing secondary clients will be erased on %s.\n\nTo read more about this change, visit the Session FAQ at getsession.org/faq"
android:textColor="@color/text"
android:textSize="@dimen/small_font_size" />
<Button
style="@style/MediumProminentOutlineButton"
android:id="@+id/okButton"
android:layout_width="240dp"
android:layout_height="@dimen/medium_button_height"
android:layout_marginTop="@dimen/large_spacing"
android:text="@string/ok" />
</LinearLayout>

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:gravity="center_horizontal"
android:orientation="vertical">

View File

@ -2,8 +2,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background" >
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/mainContentContainer"

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View

View File

@ -4,7 +4,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="@drawable/default_session_background"
tools:context="org.thoughtcrime.securesms.loki.activities.EditClosedGroupActivity">
<LinearLayout

View File

@ -7,7 +7,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/default_session_background"
tools:context="org.thoughtcrime.securesms.loki.activities.HomeActivity">
<androidx.appcompat.widget.Toolbar

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View

View File

@ -2,8 +2,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background">
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"

View File

@ -4,7 +4,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/default_session_background"
android:orientation="vertical"
android:gravity="center">

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:gravity="center_horizontal"
android:orientation="vertical">

View File

@ -2,8 +2,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background" >
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/mainContentContainer"

View File

@ -5,7 +5,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
tools:context="org.thoughtcrime.securesms.loki.activities.SettingsActivity"
tools:theme="@style/Session.DarkTheme.NoActionBar"
tools:menu="@menu/settings_general">

View File

@ -4,8 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/rootView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background">
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
@ -210,7 +209,7 @@
android:id="@+id/space_left"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="?android:windowBackground"
android:background="?android:attr/windowBackground"
android:paddingStart="5dip"
android:text="160/160 (1)"
android:visibility="gone" />

View File

@ -1,28 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/prompt_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background">
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/prompt_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/passphrase_edit"
style="?android:attr/progressBarStyleLargeInverse"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:indeterminate="true"
android:padding="10dp"
android:visibility="gone"
tools:visibility="visible"/>
<ProgressBar android:id="@+id/passphrase_edit"
android:layout_width="75dp"
android:layout_height="75dp"
android:indeterminate="true"
android:padding="10dp"
android:layout_centerInParent="true"
android:visibility="gone"
style="?android:attr/progressBarStyleLargeInverse"/>
<ImageView android:id="@+id/watermark"
android:layout_width="wrap_content"
android:layout_height="128dp"
android:layout_centerInParent="true"
android:layout_marginBottom="20dp"
android:layout_above="@id/passphrase_edit"
android:src="@drawable/ic_launcher_foreground"
android:contentDescription="@string/PassphrasePromptActivity_watermark_content_description"/>
<ImageView
android:id="@+id/watermark"
android:layout_width="wrap_content"
android:layout_height="128dp"
android:layout_above="@id/passphrase_edit"
android:layout_centerInParent="true"
android:layout_marginBottom="20dp"
android:contentDescription="@string/PassphrasePromptActivity_watermark_content_description"
android:src="@drawable/ic_launcher_foreground" />
</RelativeLayout>

View File

@ -6,15 +6,12 @@
android:layout_height="wrap_content"
android:orientation="vertical"
app:behavior_hideable="true"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
android:background="@color/dialog_background">
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<TextView
android:id="@+id/removeFromGroup"
style="@style/ActionItem"
style="@style/BottomSheetActionItem"
android:drawableStart="@drawable/ic_phonelink_erase_white_24dp"
android:textSize="@dimen/medium_font_size"
android:textColor="@color/text"
android:text="@string/fragment_edit_group_bottom_sheet_remove"/>
</LinearLayout>

View File

@ -2,27 +2,33 @@
<LinearLayout
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="wrap_content"
android:orientation="vertical"
app:behavior_hideable="true"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
android:background="@color/dialog_background">
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<TextView
android:id="@+id/blockOrUnblockTextView"
style="@style/ActionItem"
android:drawableStart="@drawable/ic_block_white_24dp"
android:textSize="@dimen/medium_font_size"
android:textColor="@color/text"
android:text="@string/RecipientPreferenceActivity_block"/>
android:id="@+id/blockTextView"
style="@style/BottomSheetActionItem"
android:drawableStart="?attr/menu_block_icon"
android:text="@string/RecipientPreferenceActivity_block"
android:visibility="gone"
tools:visibility="visible"/>
<TextView
android:id="@+id/unblockTextView"
style="@style/BottomSheetActionItem"
android:drawableStart="?attr/menu_accept_icon"
android:text="@string/RecipientPreferenceActivity_unblock"
android:visibility="gone"
tools:visibility="visible"/>
<TextView
android:id="@+id/deleteTextView"
style="@style/ActionItem"
android:drawableStart="@drawable/ic_delete_white_24dp"
android:textSize="@dimen/medium_font_size"
android:textColor="@color/text"
style="@style/BottomSheetActionItem"
android:drawableStart="?attr/menu_trash_icon"
android:text="@string/delete" />
</LinearLayout>

View File

@ -6,23 +6,18 @@
android:layout_height="wrap_content"
android:orientation="vertical"
app:behavior_hideable="true"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
android:background="@color/dialog_background">
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<TextView
android:id="@+id/editDisplayNameText"
style="@style/ActionItem"
android:drawableStart="@drawable/ic_edit_white_24dp"
android:textSize="@dimen/medium_font_size"
android:textColor="@color/text"
style="@style/BottomSheetActionItem"
android:drawableStart="@drawable/ic_baseline_edit_24"
android:text="@string/fragment_device_list_bottom_sheet_change_name_button_title"/>
<TextView
android:id="@+id/unlinkDeviceText"
style="@style/ActionItem"
style="@style/BottomSheetActionItem"
android:drawableStart="@drawable/ic_phonelink_erase_white_24dp"
android:textSize="@dimen/medium_font_size"
android:textColor="@color/text"
android:text="@string/fragment_device_list_bottom_sheet_unlink_device_button_title" />
</LinearLayout>

View File

@ -4,7 +4,6 @@
android:id="@+id/contentView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:gravity="center_horizontal"
android:orientation="vertical">

View File

@ -4,7 +4,6 @@
android:id="@+id/contentView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:gravity="center_horizontal"
android:orientation="vertical">

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:gravity="center_horizontal"
android:orientation="vertical">

View File

@ -11,8 +11,7 @@
android:paddingRight="@dimen/very_large_spacing"
android:paddingBottom="@dimen/very_large_spacing"
app:behavior_hideable="true"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
android:background="@drawable/default_bottom_sheet_background_inset">
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<TextView
android:layout_width="wrap_content"

View File

@ -2,8 +2,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background">
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"

View File

@ -2,8 +2,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background" >
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"

View File

@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:background="@drawable/default_session_background"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">

View File

@ -2,8 +2,7 @@
<RelativeLayout 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:background="@drawable/default_session_background">
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"

View File

@ -2,8 +2,7 @@
<RelativeLayout 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:background="@drawable/default_session_background">
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/media_grid"

View File

@ -5,8 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background">
android:layout_height="match_parent">
<org.thoughtcrime.securesms.components.viewpager.HackyViewPager
android:id="@+id/media_pager"

View File

@ -3,8 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/default_session_background">
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/mediapicker_toolbar"
@ -16,7 +15,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/mediapicker_folder_list"
android:background="@drawable/default_session_background"
android:background="?android:windowBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="2dp"

View File

@ -3,8 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/default_session_background">
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/mediapicker_toolbar"
@ -16,7 +15,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/mediapicker_item_list"
android:background="@drawable/default_session_background"
android:background="?android:attr/windowBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="2dp"

View File

@ -4,8 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background">
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/mediasend_fragment_container"

View File

@ -2,7 +2,6 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:background="@drawable/default_session_background"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

View File

@ -6,7 +6,6 @@
android:id="@+id/prompt_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background"
android:orientation="vertical">
<View android:id="@+id/shim"

View File

@ -5,8 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background">
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"

View File

@ -27,7 +27,7 @@
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_block_white_24dp"
android:src="?attr/menu_block_icon"
android:tint="@color/signal_primary"/>
<TextView android:layout_marginStart="15dp"

View File

@ -3,6 +3,6 @@
<item android:title="@string/recipient_preferences__block"
android:id="@+id/menu_block"
android:icon="@drawable/ic_block_white_24dp" />
android:icon="?attr/menu_block_icon" />
</menu>

View File

@ -7,7 +7,7 @@
<item android:id="@+id/delete"
android:title="@string/delete"
android:icon="@drawable/ic_delete_white_24dp"
android:icon="?attr/menu_trash_icon"
app:showAsAction="always"/>
<item android:id="@+id/select_all"

View File

@ -15,6 +15,6 @@
app:showAsAction="ifRoom"/>
<item android:id="@+id/delete"
android:title="@string/delete"
android:icon="@drawable/ic_delete_white_24dp"
android:icon="@drawable/ic_baseline_delete_24"
app:showAsAction="ifRoom"/>
</menu>

View File

@ -7,6 +7,6 @@
android:title="@string/menu_apply_button"
android:id="@+id/applyButton"
android:icon="?menu_accept_icon"
app:showAsAction="always" />
app:showAsAction="always|withText"/>
</menu>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:title="@string/menu_apply_button"
android:id="@+id/action_apply"
app:showAsAction="always|withText"/>
</menu>

View File

@ -19,7 +19,7 @@
<color name="fake_chat_bubble_background">#F5F5F5</color>
<color name="default_background_start">#fcfcfd</color>
<color name="default_background_start">#ffffff</color>
<color name="default_background_end">#fcfcfd</color>
<color name="action_bar_background">#fcfcfd</color>

View File

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="SessionBottomSheetDialogTheme" parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/SessionBottomSheetStyle</item>
</style>
<style name="Session.DarkActionBar" parent="@style/Widget.AppCompat.ActionBar">
<item name="background">@color/action_bar_background</item>

View File

@ -6,6 +6,9 @@
<item name="android:statusBarColor">@color/accent</item>
<item name="titleTextColor">@color/text</item>
<item name="android:textColorHint">@color/gray50</item>
<item name="home_gradient_start">#00FFFFFF</item>
<item name="home_gradient_end">#FFFFFFFF</item>
</style>
<style name="TextSecure.DarkNoActionBar" parent="@style/TextSecure.BaseDarkNoActionBar">
@ -20,7 +23,6 @@
<item name="colorControlActivated">@color/accent</item>
<item name="colorControlNormal">@color/text</item>
<item name="colorControlHighlight">@color/accent</item>
<item name="android:windowBackground">@color/loki_darkest_gray</item>
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyleLight</item>
<item name="android:alertDialogTheme">@style/AppCompatDialogStyleLight</item>
<item name="bottomSheetDialogTheme">@style/Theme.MaterialComponents.Light.BottomSheetDialog</item>
@ -140,7 +142,6 @@
<item name="menu_unlock_icon">@drawable/ic_unlocked_white_24dp</item>
<item name="menu_lock_icon">@drawable/ic_lock_white_24dp</item>
<item name="menu_lock_icon_small">@drawable/ic_lock_white_18dp</item>
<item name="menu_trash_icon">@drawable/ic_delete_white_24dp</item>
<item name="menu_selectall_icon">@drawable/ic_select_all_white_24dp</item>
<item name="menu_split_icon">@drawable/ic_call_split_white_24dp</item>
<item name="menu_accept_icon">@drawable/ic_check_white_24dp</item>

View File

@ -144,6 +144,7 @@
<attr name="menu_forward_icon" format="reference" />
<attr name="menu_save_icon" format="reference" />
<attr name="menu_reply_icon" format="reference" />
<attr name="menu_block_icon" format="reference" />
<attr name="pref_icon_tint" format="color"/>
@ -151,6 +152,9 @@
<attr name="quote_missing_icon_color" format="color" />
<attr name="home_gradient_start" format="color|reference" />
<attr name="home_gradient_end" format="color|reference" />
<declare-styleable name="CustomDefaultPreference">
<attr name="custom_pref_toggle" format="string"/>
</declare-styleable>

View File

@ -45,12 +45,12 @@
<item name="buttonBarPositiveButtonStyle">@style/Session.AlertDialog.PositiveButtonStyle</item>
</style>
<style name="SessionBottomSheetDialogTheme" parent="Theme.Design.Light.BottomSheetDialog">
<style name="SessionBottomSheetDialogTheme" parent="Theme.Design.BottomSheetDialog">
<item name="bottomSheetStyle">@style/SessionBottomSheetStyle</item>
</style>
<style name="SessionBottomSheetStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@android:color/transparent</item>
<item name="android:background">@drawable/default_bottom_sheet_background</item>
</style>
<style name="Session.AlertDialog.NegativeButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
@ -435,11 +435,11 @@
<item name="colorControlActivated">@color/white</item>
</style>
<style name="ActionItem">
<item name="android:textSize">@dimen/text_size</item>
<item name="android:drawablePadding">@dimen/drawable_padding</item>
<style name="BottomSheetActionItem">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/action_item_height</item>
<item name="android:textSize">@dimen/medium_font_size</item>
<item name="android:drawablePadding">@dimen/drawable_padding</item>
<item name="android:padding">@dimen/normal_padding</item>
<item name="android:gravity">center_vertical</item>
<item name="android:selectable">true</item>

View File

@ -7,11 +7,14 @@
<item name="colorPrimary">@color/action_bar_background</item>
<item name="colorPrimaryDark">@color/action_bar_background</item>
<item name="colorAccent">@color/accent</item>
<item name="android:windowBackground">@drawable/default_session_background</item>
<item name="android:colorBackground">@color/default_background_start</item>
<item name="android:navigationBarColor">@color/compose_view_background</item>
<!-- TODO Separate action bar theme/style -->
<!-- <item name="actionBarStyle">@style/Session.DarkActionBar</item>-->
<item name="actionBarTheme">@style/Session.DarkActionBar</item>
<item name="alertDialogTheme">@style/Session.AlertDialog</item>
<item name="android:navigationBarColor">@color/compose_view_background</item>
<item name="android:windowBackground">@drawable/default_session_background</item>
<item name="bottomSheetDialogTheme">@style/SessionBottomSheetDialogTheme</item>
<item name="preferenceTheme">@style/Session.SettingsTheme</item>
<item name="actionModeBackground">@color/compose_view_background</item>
<item name="statusBarBackground">@color/accent</item>
@ -26,7 +29,14 @@
<item name="actionModeCloseDrawable">@drawable/ic_baseline_clear_24</item>
<!-- App specific attributes -->
<item name="dialog_background_color">@color/dialog_background</item>
<item name="home_gradient_start">#00000000</item>
<item name="home_gradient_end">#FF000000</item>
<item name="menu_accept_icon">@drawable/ic_baseline_done_24</item>
<item name="menu_trash_icon">@drawable/ic_baseline_delete_24</item>
<item name="menu_block_icon">@drawable/ic_baseline_block_24</item>
</style>
<style name="Session.DarkTheme" parent="Session.BaseDarkTheme">
@ -166,7 +176,6 @@
<style name="TextSecure.LightTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="theme_type">light</item>
<item name="actionBarStyle">@style/Session.DarkActionBar</item>
<item name="searchViewStyle">@style/TextSecure.BaseDarkTheme.SearchView</item>
<item name="actionBarTabBarStyle">@style/TextSecure.LightActionBar.TabBar</item>
<item name="actionModeBackground">@color/compose_view_background</item>
@ -276,7 +285,7 @@
<item name="dialog_info_icon">@drawable/ic_info_outline_light</item>
<item name="dialog_alert_icon">@drawable/ic_warning_light</item>
<item name="dialog_background_color">@color/background_material_light</item>
<!-- <item name="dialog_background_color">@color/background_material_light</item>-->
<item name="device_link_item_card_background">@color/device_link_item_background_light</item>
@ -366,9 +375,8 @@
<item name="colorControlActivated">@color/accent</item>
<item name="colorControlNormal">@color/text</item>
<item name="colorControlHighlight">@color/accent</item>
<item name="android:windowBackground">@color/loki_darkest_gray</item>
<item name="alertDialogTheme">@style/Session.AlertDialog</item>
<item name="bottomSheetDialogTheme">@style/Theme.MaterialComponents.BottomSheetDialog</item>
<!-- <item name="alertDialogTheme">@style/Session.AlertDialog</item>-->
<!-- <item name="bottomSheetDialogTheme">@style/Theme.MaterialComponents.BottomSheetDialog</item>-->
<item name="android:navigationBarColor">@color/compose_view_background</item>
<item name="attachment_type_selector_background">@color/gray95</item>
@ -414,7 +422,7 @@
<item name="dialog_info_icon">@drawable/ic_info_outline_dark</item>
<item name="dialog_alert_icon">@drawable/ic_warning_dark</item>
<item name="dialog_background_color">@color/background_material_dark</item>
<!-- <item name="dialog_background_color">@color/background_material_dark</item>-->
<item name="device_link_item_card_background">@color/device_link_item_background_dark</item>
@ -487,7 +495,6 @@
<item name="menu_unlock_icon">@drawable/ic_unlocked_white_24dp</item>
<item name="menu_lock_icon">@drawable/ic_lock_white_24dp</item>
<item name="menu_lock_icon_small">@drawable/ic_lock_white_18dp</item>
<item name="menu_trash_icon">@drawable/ic_delete_white_24dp</item>
<item name="menu_selectall_icon">@drawable/ic_select_all_white_24dp</item>
<item name="menu_split_icon">@drawable/ic_call_split_white_24dp</item>
<item name="menu_accept_icon">@drawable/ic_check_white_24dp</item>

View File

@ -19,7 +19,6 @@ package org.thoughtcrime.securesms.conversation;
import android.Manifest;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import androidx.lifecycle.ViewModelProviders;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.Context;
@ -27,12 +26,8 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.ColorDrawable;
import android.hardware.Camera;
import android.net.Uri;
import android.os.AsyncTask;
@ -42,17 +37,6 @@ import android.os.Handler;
import android.os.Vibrator;
import android.provider.Browser;
import android.provider.Telephony;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.core.content.pm.ShortcutInfoCompat;
import androidx.core.content.pm.ShortcutManagerCompat;
import androidx.core.graphics.drawable.IconCompat;
import androidx.core.view.MenuItemCompat;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
@ -75,6 +59,19 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.pm.ShortcutInfoCompat;
import androidx.core.content.pm.ShortcutManagerCompat;
import androidx.core.graphics.drawable.IconCompat;
import androidx.core.view.MenuItemCompat;
import androidx.lifecycle.ViewModelProviders;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.annimon.stream.Stream;
import org.greenrobot.eventbus.EventBus;
@ -145,7 +142,6 @@ import org.thoughtcrime.securesms.database.model.StickerRecord;
import org.thoughtcrime.securesms.events.ReminderUpdateEvent;
import org.thoughtcrime.securesms.giph.ui.GiphyActivity;
import org.thoughtcrime.securesms.jobs.MultiDeviceBlockedUpdateJob;
import org.thoughtcrime.securesms.jobs.RetrieveProfileJob;
import org.thoughtcrime.securesms.jobs.ServiceOutageDetectionJob;
import org.thoughtcrime.securesms.linkpreview.LinkPreview;
import org.thoughtcrime.securesms.linkpreview.LinkPreviewRepository;
@ -208,7 +204,6 @@ import org.thoughtcrime.securesms.util.CommunicationActions;
import org.thoughtcrime.securesms.util.DateUtils;
import org.thoughtcrime.securesms.util.Dialogs;
import org.thoughtcrime.securesms.util.DynamicLanguage;
import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme;
import org.thoughtcrime.securesms.util.ExpirationUtil;
import org.thoughtcrime.securesms.util.IdentityUtil;
import org.thoughtcrime.securesms.util.MediaUtil;
@ -373,12 +368,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
setContentView(R.layout.conversation_activity);
TypedArray typedArray = obtainStyledAttributes(new int[] {R.attr.conversation_background});
int color = typedArray.getColor(0, Color.WHITE);
typedArray.recycle();
getWindow().getDecorView().setBackgroundColor(color);
fragment = initFragment(R.id.fragment_content, new ConversationFragment(), dynamicLanguage.getCurrentLocale());
registerMessageStatusObserver("calculatingPoW");
@ -2084,7 +2073,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
// setStatusBarColor(getResources().getColor(R.color.action_bar_background));
}
// FIXME: This name is confusing because we also have updateInputPanel and setInputPanelEnabled
private void updateInputUI(Recipient recipient, boolean isSecureText, boolean isDefaultSms) {
if (recipient.isGroupRecipient() && !isActiveGroup()) {
unblockButton.setVisibility(View.GONE);

View File

@ -110,8 +110,8 @@ class EditClosedGroupActivity : PassphraseRequiredActionBarActivity() {
})
}
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
menuInflater.inflate(R.menu.menu_apply, menu)
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_edit_closed_group, menu)
return members.isNotEmpty()
}
// endregion
@ -163,7 +163,7 @@ class EditClosedGroupActivity : PassphraseRequiredActionBarActivity() {
// region Interaction
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when(item.itemId) {
R.id.applyButton -> commitChanges()
R.id.action_apply -> commitChanges()
}
return super.onOptionsItemSelected(item)
}

View File

@ -259,12 +259,16 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
val thread = view.thread ?: return
val bottomSheet = ConversationOptionsBottomSheet()
bottomSheet.recipient = thread.recipient
bottomSheet.onBlockOrUnblockTapped = {
bottomSheet.onBlockTapped = {
bottomSheet.dismiss()
if (!thread.recipient.isBlocked) {
blockConversation(thread)
}
}
bottomSheet.onUnblockTapped = {
bottomSheet.dismiss()
if (thread.recipient.isBlocked) {
unblockConversation(thread)
} else {
blockConversation(thread)
}
}
bottomSheet.onDeleteTapped = {

View File

@ -12,7 +12,8 @@ import org.thoughtcrime.securesms.recipients.Recipient
public class ConversationOptionsBottomSheet : BottomSheetDialogFragment() {
lateinit var recipient: Recipient
var onBlockOrUnblockTapped: (() -> Unit)? = null
var onBlockTapped: (() -> Unit)? = null
var onUnblockTapped: (() -> Unit)? = null
var onDeleteTapped: (() -> Unit)? = null
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
@ -22,14 +23,11 @@ public class ConversationOptionsBottomSheet : BottomSheetDialogFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
if (!recipient.isGroupRecipient && !recipient.isLocalNumber) {
val textID = if (recipient.isBlocked) R.string.RecipientPreferenceActivity_unblock else R.string.RecipientPreferenceActivity_block
blockOrUnblockTextView.setText(textID)
val iconID = if (recipient.isBlocked) R.drawable.ic_check_white_24dp else R.drawable.ic_block_white_24dp
val icon = context!!.resources.getDrawable(iconID, context!!.theme)
blockOrUnblockTextView.setCompoundDrawablesRelativeWithIntrinsicBounds(icon, null, null, null)
blockOrUnblockTextView.setOnClickListener { onBlockOrUnblockTapped?.invoke() }
} else {
blockOrUnblockTextView.visibility = View.GONE
unblockTextView.visibility = if (recipient.isBlocked) View.VISIBLE else View.GONE
blockTextView.visibility = if (recipient.isBlocked) View.GONE else View.VISIBLE
blockTextView.setOnClickListener { onBlockTapped?.invoke() }
unblockTextView.setOnClickListener { onUnblockTapped?.invoke() }
}
deleteTextView.setOnClickListener { onDeleteTapped?.invoke() }
}