Conversation activity theme tweaks.

This commit is contained in:
Anton Chekulaev 2020-09-02 11:55:01 +10:00
parent 0004e7b387
commit 4a39fe9588
20 changed files with 42 additions and 285 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B

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="M7.41,8.59L12,13.17l4.59,-4.58L18,10l-6,6 -6,-6 1.41,-1.41z"/>
</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="M7.41,15.41L12,10.83l4.59,4.58L18,14l-6,-6 -6,6z"/>
</vector>

View File

@ -1,267 +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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:layout_width="match_parent"
android:layout_height="4dp"
android:background="@drawable/attachment_selector_shadow"/>
<LinearLayout
android:id="@+id/contentView"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attachment_type_selector_background">
<org.thoughtcrime.securesms.components.RecentPhotoViewRail
android:id="@+id/recent_photos"
android:layout_width="match_parent"
android:layout_height="90dp"
android:padding="4dp"/>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="16dp"
android:weightSum="3">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<org.thoughtcrime.securesms.components.CircleColorImageView
android:id="@+id/gallery_button"
android:layout_width="53dp"
android:layout_height="53dp"
android:src="@drawable/ic_image_white_24dp"
android:scaleType="center"
android:contentDescription="@string/attachment_type_selector__gallery_description"
app:circleColor="@color/purple_400"/>
<TextView
android:layout_marginTop="10dp"
style="@style/AttachmentTypeLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/attachment_type_selector__gallery"/>
</LinearLayout>
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<org.thoughtcrime.securesms.components.CircleColorImageView
android:id="@+id/camera_button"
android:layout_width="53dp"
android:layout_height="53dp"
android:src="@drawable/ic_camera_white_24dp"
android:scaleType="center"
android:contentDescription="@string/attachment_type_selector__camera_description"
app:circleColor="@color/green_400"/>
<TextView
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
style="@style/AttachmentTypeLabel"
android:text="@string/attachment_type_selector__camera"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<org.thoughtcrime.securesms.components.CircleColorImageView
android:id="@+id/audio_button"
android:layout_width="53dp"
android:layout_height="53dp"
android:contentDescription="@string/attachment_type_selector__audio_description"
android:scaleType="center"
android:src="@drawable/ic_headset_white_24dp"
app:circleColor="@color/orange_400" />
<TextView
style="@style/AttachmentTypeLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/attachment_type_selector__audio" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<org.thoughtcrime.securesms.components.CircleColorImageView
android:id="@+id/document_button"
android:layout_width="53dp"
android:layout_height="53dp"
android:contentDescription="@string/attachment_type_selector__file_description"
android:scaleType="center"
android:src="@drawable/ic_insert_drive_file_white_24dp"
app:circleColor="@color/red_400" />
<TextView
style="@style/AttachmentTypeLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/attachment_type_selector__file" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:layout_weight="1"
android:visibility="gone">
<org.thoughtcrime.securesms.components.CircleColorImageView
android:id="@+id/contact_button"
android:layout_width="53dp"
android:layout_height="53dp"
android:src="@drawable/ic_person_white_24dp"
android:scaleType="center"
android:contentDescription="@string/attachment_type_selector__contact_description"
app:circleColor="@color/blue_400"/>
<TextView
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AttachmentTypeLabel"
android:text="@string/attachment_type_selector__contact"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:weightSum="3">
<LinearLayout
android:id="@+id/location_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible">
<org.thoughtcrime.securesms.components.CircleColorImageView
android:id="@+id/location_button"
android:layout_width="53dp"
android:layout_height="53dp"
android:contentDescription="@string/attachment_type_selector__location_description"
android:scaleType="center"
android:src="@drawable/ic_location_on_white_24dp"
app:circleColor="@color/blue_grey_400" />
<TextView
style="@style/AttachmentTypeLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/attachment_type_selector__location" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<org.thoughtcrime.securesms.components.CircleColorImageView
android:id="@+id/giphy_button"
android:layout_width="53dp"
android:layout_height="53dp"
android:src="@drawable/ic_gif_white_24dp"
android:scaleType="center"
android:contentDescription="@string/attachment_type_selector__gif_description"
app:circleColor="@color/cyan_400"/>
<TextView
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AttachmentTypeLabel"
android:text="@string/attachment_type_selector__gif"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<org.thoughtcrime.securesms.components.CircleColorImageView
android:id="@+id/close_button"
android:layout_width="53dp"
android:layout_height="53dp"
android:paddingTop="4dp"
android:src="@drawable/ic_keyboard_arrow_down_white_24dp"
android:scaleType="center"
android:contentDescription="@string/attachment_type_selector__drawer_description"
app:circleColor="@color/gray50"/>
<TextView
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AttachmentTypeLabel"
android:text=""/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>

View File

@ -241,9 +241,10 @@
android:layout_width="42dp" android:layout_width="42dp"
android:layout_height="42dp" android:layout_height="42dp"
android:paddingTop="4dp" android:paddingTop="4dp"
android:src="@drawable/ic_keyboard_arrow_down_white_24dp" android:src="@drawable/ic_baseline_keyboard_arrow_down_24"
android:scaleType="center" android:scaleType="center"
android:contentDescription="@string/attachment_type_selector__drawer_description" android:contentDescription="@string/attachment_type_selector__drawer_description"
android:tint="@android:color/white"
app:circleColor="@color/gray50"/> app:circleColor="@color/gray50"/>
<TextView <TextView

View File

@ -53,9 +53,8 @@
android:paddingTop="10dp" android:paddingTop="10dp"
android:paddingRight="@dimen/small_spacing" android:paddingRight="@dimen/small_spacing"
android:paddingBottom="6dp" android:paddingBottom="6dp"
android:tint="@color/text"
android:elevation="10dp" android:elevation="10dp"
android:contentDescription="@string/conversation_fragment__scroll_to_the_bottom_content_description" android:contentDescription="@string/conversation_fragment__scroll_to_the_bottom_content_description"
android:src="@drawable/ic_keyboard_arrow_down_white_24dp"/> android:src="@drawable/ic_baseline_keyboard_arrow_down_24"/>
</FrameLayout> </FrameLayout>

View File

@ -33,8 +33,7 @@
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:padding="8dp" android:padding="8dp"
android:src="@drawable/ic_keyboard_arrow_up_white_36dp" android:src="@drawable/ic_baseline_keyboard_arrow_up_24"
android:tint="@color/signal_primary"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/conversation_search_down" app:layout_constraintEnd_toStartOf="@+id/conversation_search_down"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -48,8 +47,7 @@
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:padding="8dp" android:padding="8dp"
android:src="@drawable/ic_keyboard_arrow_down_white_24dp" android:src="@drawable/ic_baseline_keyboard_arrow_down_24"
android:tint="@color/signal_primary"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -62,8 +60,9 @@
android:padding="8dp" android:padding="8dp"
android:background="@color/compose_view_background" android:background="@color/compose_view_background"
android:visibility="gone" android:visibility="gone"
app:SpinKit_Color="@color/text" app:SpinKit_Color="?android:textColorPrimary"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent"
tools:visibility="gone"/>
</org.thoughtcrime.securesms.components.ConversationSearchBottomBar> </org.thoughtcrime.securesms.components.ConversationSearchBottomBar>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"> <merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/photo_list" android:id="@+id/photo_list"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -13,7 +13,7 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginBottom="-15dp" android:layout_marginBottom="-15dp"
android:alpha="0" android:alpha="0"
android:src="@drawable/ic_keyboard_arrow_up_white_36dp" android:src="@drawable/ic_baseline_keyboard_arrow_up_24"
android:tint="@color/gray20" android:tint="@color/gray20"
tools:alpha="1"/> tools:alpha="1"/>
@ -23,7 +23,7 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginBottom="-15dp" android:layout_marginBottom="-15dp"
android:alpha="0" android:alpha="0"
android:src="@drawable/ic_keyboard_arrow_up_white_36dp" android:src="@drawable/ic_baseline_keyboard_arrow_up_24"
android:tint="@color/gray20" android:tint="@color/gray20"
tools:alpha="1"/> tools:alpha="1"/>
@ -33,7 +33,7 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginBottom="-15dp" android:layout_marginBottom="-15dp"
android:alpha="0" android:alpha="0"
android:src="@drawable/ic_keyboard_arrow_up_white_36dp" android:src="@drawable/ic_baseline_keyboard_arrow_up_24"
android:tint="@color/gray20" android:tint="@color/gray20"
tools:alpha="1"/> tools:alpha="1"/>
@ -43,7 +43,7 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:alpha="0" android:alpha="0"
android:src="@drawable/ic_keyboard_arrow_up_white_36dp" android:src="@drawable/ic_baseline_keyboard_arrow_up_24"
android:tint="@color/gray20" android:tint="@color/gray20"
tools:alpha="1"/> tools:alpha="1"/>

View File

@ -55,7 +55,7 @@
<item name="media_keyboard_button_color">@color/core_grey_25</item> <item name="media_keyboard_button_color">@color/core_grey_25</item>
<item name="searchViewStyle">@style/TextSecure.BaseDarkTheme.SearchView</item> <item name="searchViewStyle">@style/TextSecure.BaseDarkTheme.SearchView</item>
<item name="attachment_type_selector_background">?background</item> <item name="attachment_type_selector_background">?android:windowBackground</item>
<item name="attachment_document_icon_small">@drawable/ic_document_small_dark</item> <item name="attachment_document_icon_small">@drawable/ic_document_small_dark</item>
<item name="attachment_document_icon_large">@drawable/ic_document_large_dark</item> <item name="attachment_document_icon_large">@drawable/ic_document_large_dark</item>
<item name="attachment_document_extension_text_color">#222</item> <item name="attachment_document_extension_text_color">#222</item>
@ -445,7 +445,7 @@
<!-- <item name="bottomSheetDialogTheme">@style/Theme.MaterialComponents.BottomSheetDialog</item>--> <!-- <item name="bottomSheetDialogTheme">@style/Theme.MaterialComponents.BottomSheetDialog</item>-->
<item name="android:navigationBarColor">@color/compose_view_background</item> <item name="android:navigationBarColor">@color/compose_view_background</item>
<item name="attachment_type_selector_background">@color/gray95</item> <!-- <item name="attachment_type_selector_background">@color/gray95</item>-->
<item name="attachment_document_icon_small">@drawable/ic_document_small_dark</item> <item name="attachment_document_icon_small">@drawable/ic_document_small_dark</item>
<item name="attachment_document_icon_large">@drawable/ic_document_large_dark</item> <item name="attachment_document_icon_large">@drawable/ic_document_large_dark</item>

View File

@ -70,6 +70,7 @@ import androidx.core.content.pm.ShortcutManagerCompat;
import androidx.core.graphics.drawable.IconCompat; import androidx.core.graphics.drawable.IconCompat;
import androidx.core.view.MenuItemCompat; import androidx.core.view.MenuItemCompat;
import androidx.lifecycle.ViewModelProviders; import androidx.lifecycle.ViewModelProviders;
import androidx.loader.app.LoaderManager;
import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.annimon.stream.Stream; import com.annimon.stream.Stream;
@ -1268,9 +1269,12 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private void handleAddAttachment() { private void handleAddAttachment() {
if (this.isMmsEnabled || isSecureText) { if (this.isMmsEnabled || isSecureText) {
if (attachmentTypeSelector == null) { if (attachmentTypeSelector == null) {
attachmentTypeSelector = new AttachmentTypeSelector(this, getSupportLoaderManager(), new AttachmentTypeListener(), keyboardHeight); attachmentTypeSelector = new AttachmentTypeSelector(
this,
LoaderManager.getInstance(this),
new AttachmentTypeListener(),
keyboardHeight);
} }
attachmentTypeSelector.keyboardHeight = keyboardHeight;
attachmentTypeSelector.show(this, attachButton); attachmentTypeSelector.show(this, attachButton);
} else { } else {
handleManualMmsRequired(); handleManualMmsRequired();