Fix dark theme coloring for forward bottom sheet.

This commit is contained in:
Alex Hart 2021-08-18 09:32:53 -03:00
parent 921addf4c8
commit 199fb517b1
10 changed files with 33 additions and 8 deletions

View file

@ -126,6 +126,11 @@ public final class ContactFilterView extends FrameLayout {
searchText.requestFocus();
}
int backgroundRes = attributes.getResourceId(R.styleable.ContactFilterToolbar_cfv_background, -1);
if (backgroundRes != -1) {
findViewById(R.id.background_holder).setBackgroundResource(backgroundRes);
}
attributes.recycle();
}

View file

@ -38,7 +38,7 @@ abstract class FixedRoundedCornerBottomSheetDialogFragment : BottomSheetDialogFr
val dialogBackground = MaterialShapeDrawable(shapeAppearanceModel)
dialogBackground.setTint(ContextCompat.getColor(requireContext(), R.color.signal_background_primary))
dialogBackground.setTint(ContextCompat.getColor(requireContext(), R.color.signal_background_dialog))
dialog.behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
override fun onStateChanged(bottomSheet: View, newState: Int) {

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@color/signal_background_dialog_secondary"/>
<corners android:radius="30dp"/>
</shape>

View file

@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:id="@+id/background_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rounded_rectangle_secondary"

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat 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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<View
@ -30,7 +30,8 @@
android:layout_marginTop="17dp"
android:layout_marginRight="@dimen/dsl_settings_gutter"
android:minHeight="44dp"
app:cfv_autoFocus="false" />
app:cfv_autoFocus="false"
app:cfv_background="@drawable/rounded_rectangle_dialog_secondary" />
<androidx.fragment.app.FragmentContainerView
android:id="@+id/contact_selection_list_fragment"

View file

@ -10,16 +10,26 @@
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/signal_divider_minor"
android:background="@color/signal_divider_major"
app:layout_constraintBottom_toBottomOf="@id/share_confirm"
app:layout_constraintTop_toTopOf="@id/share_confirm" />
<View
android:id="@+id/background_helper"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/signal_background_dialog"
app:layout_constraintBottom_toBottomOf="@id/selected_list"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/selected_list" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/selected_list"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginEnd="@dimen/dsl_settings_gutter"
android:background="@color/signal_background_primary"
android:clipToPadding="false"
android:orientation="horizontal"
android:paddingStart="@dimen/dsl_settings_gutter"
@ -34,7 +44,7 @@
android:id="@+id/add_message_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/signal_background_primary"
android:background="@color/signal_background_dialog"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/selected_list">
@ -45,7 +55,7 @@
android:layout_marginStart="@dimen/dsl_settings_gutter"
android:layout_marginEnd="@dimen/dsl_settings_gutter"
android:layout_marginBottom="8dp"
android:background="@drawable/rounded_rectangle_secondary"
android:background="@drawable/rounded_rectangle_dialog_secondary"
android:hint="@string/MultiselectForwardFragment__add_a_message"
android:inputType="textCapSentences"
android:minHeight="44dp"

View file

@ -12,6 +12,7 @@
<color name="signal_background_secondary">@color/core_grey_75</color>
<color name="signal_background_tertiary">@color/core_grey_90</color>
<color name="signal_background_dialog">@color/core_grey_75</color>
<color name="signal_background_dialog_secondary">@color/core_grey_65</color>
<color name="signal_text_primary">@color/core_grey_05</color>
<color name="signal_text_primary_disabled">@color/core_grey_60</color>

View file

@ -228,6 +228,7 @@
<attr name="searchTextStyle" format="reference" />
<attr name="showDialpad" format="boolean" />
<attr name="cfv_autoFocus" format="boolean" />
<attr name="cfv_background" format="reference" />
</declare-styleable>
<declare-styleable name="SquareImageView">

View file

@ -12,6 +12,7 @@
<color name="signal_background_secondary">@color/core_grey_05</color>
<color name="signal_background_tertiary">@color/core_grey_02</color>
<color name="signal_background_dialog">@color/core_white</color>
<color name="signal_background_dialog_secondary">@color/signal_background_secondary</color>
<color name="signal_text_primary">@color/core_grey_90</color>
<color name="signal_text_primary_disabled">@color/core_grey_25</color>

View file

@ -397,7 +397,7 @@
<style name="Widget.Signal.FixedRoundedCorners.BottomSheet" parent="Widget.MaterialComponents.BottomSheet">
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Signal.BottomSheet.Rounded</item>
<item name="backgroundTint">@color/signal_background_primary</item>
<item name="backgroundTint">@color/signal_background_dialog</item>
</style>
<style name="ShapeAppearanceOverlay.Signal.BottomSheet.Rounded" parent="">