Skip to content

Commit

Permalink
corrected color in dialog preferences buttons and radio buttons after…
Browse files Browse the repository at this point in the history
… using Material3, see #944
  • Loading branch information
oliexdev committed Jul 29, 2023
1 parent ec4ecf7 commit 9230d94
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions android_app/app/src/main/res/layout/fragment_usersettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:theme="@style/AppTheme.RadioButton"
android:text="@string/label_male" />

<RadioButton
android:id="@+id/btnRadioWoman"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.RadioButton"
android:text="@string/label_female" />
</RadioGroup>
</TableRow>
Expand Down Expand Up @@ -184,11 +186,13 @@
android:layout_height="wrap_content"
android:text="cm"
android:id="@+id/btnRadioCM"
android:theme="@style/AppTheme.RadioButton"
android:checked="true" />

<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.RadioButton"
android:text="in"
android:id="@+id/btnRadioINCH" />
</RadioGroup>
Expand Down Expand Up @@ -216,18 +220,21 @@
android:layout_height="wrap_content"
android:text="kg"
android:id="@+id/btnRadioKG"
android:theme="@style/AppTheme.RadioButton"
android:checked="true" />

<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="lb"
android:theme="@style/AppTheme.RadioButton"
android:id="@+id/btnRadioLB" />

<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="st"
android:theme="@style/AppTheme.RadioButton"
android:id="@+id/btnRadioST" />
</RadioGroup>
</TableRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
android:id="@+id/user_radio_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.RadioButton"
android:layout_marginLeft="16dp"
android:layout_weight="1" />
</LinearLayout>
10 changes: 10 additions & 0 deletions android_app/app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@
<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="colorAccent">@color/md_theme_dark_onPrimary</item>
</style>

<style name="AppTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog">
<item name="colorPrimary">@color/md_theme_dark_onBackground</item>
</style>

<style name="AppTheme.RadioButton" parent="Widget.Material3.CompoundButton.RadioButton">
<item name="colorPrimary">@color/md_theme_dark_onPrimary</item>
</style>

<style name="AppTheme.NoActionBar">
Expand Down
1 change: 1 addition & 0 deletions android_app/app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
<item name="colorAccent">@color/md_theme_light_primary</item>
</style>

<style name="AppTheme.NoActionBar">
Expand Down

0 comments on commit 9230d94

Please sign in to comment.