Material 3: Favorite checkbox

Signed-off-by: Stefan Niedermann <info@niedermann.it>
This commit is contained in:
Stefan Niedermann 2022-11-12 08:38:09 +01:00
parent 311ad084c9
commit 14e44dc65f
2 changed files with 21 additions and 0 deletions

View file

@ -13,6 +13,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
app:popupTheme="@style/PopUpDarkMenu"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginHorizontal="@dimen/spacer_activity_sides"

View file

@ -27,6 +27,26 @@
<style name="AppTheme" parent="BaseTheme" />
<style name="PopUpDarkMenu" parent="Theme.Material3.DayNight">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">?android:colorPrimary</item>
<item name="colorAccent">@color/accent</item>
<item name="checkboxStyle">@style/checkboxStyle</item>
</style>
<style name="checkboxStyle" parent="Widget.Material3.CompoundButton.CheckBox">
<item name="materialThemeOverlay">@style/materialThemeOverlay</item>
</style>
<style name="materialThemeOverlay" parent="Widget.Material3.CompoundButton.CheckBox">
<!-- Container colors -->
<item name="colorPrimary">@color/accent</item>
<item name="colorOnSurface">@color/accent</item>
<!-- Icon colors -->
<item name="colorSurface">@color/primary</item>
<item name="colorOnPrimary">@color/primary</item>
</style>
<style name="actionModeStyle" parent="@style/Widget.Material3.ActionMode">
<item name="android:paddingStart">@dimen/spacer_activity_sides</item>
<item name="android:paddingEnd">@dimen/spacer_activity_sides</item>