Skip to content

Commit

Permalink
fixed color button issues, see bug #1038
Browse files Browse the repository at this point in the history
  • Loading branch information
oliexdev committed Nov 17, 2024
1 parent 18861cd commit 8b43266
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions android_app/app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,40 @@
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_dark_inversePrimary</item>
<item name="alertDialogTheme">@style/AppTheme.Dialog</item>
<item name="android:alertDialogTheme">@style/AppTheme.Dialog</item> <!-- for material 3 dialog button color -->
<item name="alertDialogTheme">@style/AppTheme.Dialog</item> <!-- for preference dialog button color -->
<item name="materialCalendarTheme">@style/MaterialCalendarTheme</item> <!-- for material calendar button color -->
<item name="preferenceTheme">@style/MaterialPreferenceTheme</item>
<item name="colorAccent">@color/md_theme_dark_onPrimary</item>
</style>

<style name="AppTheme.NavigationBar" parent="Widget.MaterialComponents.BottomNavigationView.Colored">
<item name="colorSecondaryContainer">@android:color/transparent</item>
</style>

<style name="AppTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog">
<style name="MaterialPreferenceTheme" parent="PreferenceThemeOverlay">
<item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
<item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
</style>

<style name="MaterialCalendarTheme" parent="ThemeOverlay.MaterialComponents.MaterialCalendar">
<item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
<item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
</style>

<style name="AppTheme.Dialog" parent="ThemeOverlay.Material3.Dialog">
<item name="colorPrimary">@color/md_theme_dark_onBackground</item>
<item name="android:buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
<item name="android:buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
<item name="android:buttonBarNeutralButtonStyle">@style/PositiveButtonStyle</item>
</style>

<style name="NegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/md_theme_dark_onBackground</item>
</style>

<style name="PositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/md_theme_dark_onBackground</item>
</style>

<style name="AppTheme.RadioButton" parent="Widget.Material3.CompoundButton.RadioButton">
Expand Down

0 comments on commit 8b43266

Please sign in to comment.