Color improvements in dark mode for bottom sheets

This commit is contained in:
Sylvain Berfini 2024-12-16 11:07:28 +01:00
parent 137e8941cb
commit 2380c0fa6d
11 changed files with 26 additions and 9 deletions

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="?attr/color_background_contrast_in_dark_mode" />
</shape>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true"
android:drawable="@drawable/color_main2_100" />
<item android:state_pressed="true"
android:drawable="@drawable/color_main2_100" />
<item
android:drawable="@drawable/color_background_contrast" />
</selector>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:topRightRadius="20dp" android:topLeftRadius="20dp" />
<solid android:color="?attr/color_main2_000"/>
<solid android:color="?attr/color_background_contrast_in_dark_mode"/>
</shape>

View file

@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:padding="11dp"
android:src="@drawable/shape_drawer_handle"
app:tint="?attr/color_main2_300"
app:tint="?attr/color_bottom_sheet_handle"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

View file

@ -215,7 +215,7 @@
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginEnd="10dp"
android:background="?attr/color_main2_200"
android:background="?attr/color_separator"
android:visibility="gone"
app:layout_constraintStart_toStartOf="@id/title"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -25,7 +25,7 @@
android:layout_height="wrap_content"
android:padding="11dp"
android:src="@drawable/shape_drawer_handle"
app:tint="?attr/color_main2_300"
app:tint="?attr/color_bottom_sheet_handle"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

View file

@ -16,7 +16,7 @@
android:onClick="@{() -> model.clicked()}"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/primary_cell_background">
android:background="@drawable/primary_cell_background_alt">
<include
android:id="@+id/avatar"
@ -75,7 +75,7 @@
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginEnd="10dp"
android:background="?attr/color_main2_200"
android:background="?attr/color_separator"
app:layout_constraintStart_toStartOf="@id/name"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>

View file

@ -31,7 +31,7 @@
android:layout_height="wrap_content"
android:padding="11dp"
android:src="@drawable/shape_drawer_handle"
app:tint="?attr/color_main2_300"
app:tint="?attr/color_bottom_sheet_handle"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
@ -205,7 +205,7 @@
android:contentDescription="@string/content_description_call_start"
android:elevation="3dp"
android:background="@drawable/squircle_green_button_background"
app:tint="?attr/color_main2_000"
app:tint="@color/bc_white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/digit_0"
@ -223,7 +223,8 @@
app:layout_constraintStart_toStartOf="@id/digit_sharp"
app:layout_constraintEnd_toEndOf="@id/digit_sharp"
app:layout_constraintTop_toTopOf="@id/call"
app:layout_constraintBottom_toBottomOf="@id/call"/>
app:layout_constraintBottom_toBottomOf="@id/call"
app:tint="?attr/color_main2_600" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -70,6 +70,7 @@
<item name="color_trust_background">@color/gray_main2_600</item>
<item name="color_trust_track">@color/text_field_background_color_dark_mode</item>
<item name="color_conversation_send_area_background">@color/background_color_alt_dark_mode</item>
<item name="color_bottom_sheet_handle">@color/gray_main2_400</item>
</style>
<style name="Theme.LinphoneYellow" parent="Theme.Linphone">

View file

@ -68,5 +68,6 @@
<attr name="color_trust_background" format="color"/>
<attr name="color_trust_track" format="color"/>
<attr name="color_conversation_send_area_background" format="color"/>
<attr name="color_bottom_sheet_handle" format="color"/>
</declare-styleable>
</resources>

View file

@ -71,6 +71,7 @@
<item name="color_trust_background">@color/gray_main2_100</item>
<item name="color_trust_track">@color/blue_info_500</item>
<item name="color_conversation_send_area_background">@color/gray_100</item>
<item name="color_bottom_sheet_handle">@color/gray_main2_300</item>
</style>
<style name="Theme.LinphoneYellow" parent="Theme.Linphone">