Skip to content

Commit

Permalink
Use color error in remove button dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
WSTxda committed Feb 27, 2024
1 parent 3ef26d9 commit 9540803
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class AccountsFragment : PreferenceFragmentCompat() {
}

private fun showConfirmationDialog(accountName: String) {
val alertDialogBuilder = AlertDialog.Builder(requireContext())
val alertDialogBuilder = AlertDialog.Builder(requireContext(), R.style.AppTheme_Dialog_Account)
alertDialogBuilder.apply {
setTitle(getString(R.string.dialog_title_remove_account))
setMessage(getString(R.string.dialog_message_remove_account))
Expand Down
14 changes: 14 additions & 0 deletions play-services-core/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@
<item name="colorBackgroundFloating">?colorSurface</item>
</style>

<style name="AppTheme.Dialog.Account" parent="@style/ThemeOverlay.Material3.MaterialAlertDialog">
<item name="android:colorBackground">?colorSurfaceContainer</item>
<item name="android:listPreferredItemHeightSmall">48dp</item>
<item name="android:windowAnimationStyle">@style/MaterialAlertDialog.Material3.Animation</item>
<item name="android:windowSoftInputMode">adjustResize</item>
<item name="dialogCornerRadius">@dimen/settings_dialog_corner_radius</item>
<item name="buttonBarPositiveButtonStyle">@style/Theme.PositiveButton.Warning</item>
</style>

<style name="Settings.CategoryPreference" parent="@style/Preference.Category.Material">
<item name="allowDividerAbove">@bool/settings_config_allow_divider</item>
<item name="allowDividerBelow">@bool/settings_config_allow_divider</item>
Expand All @@ -95,6 +104,11 @@
<item name="android:textSize">14.0sp</item>
</style>

<style name="Theme.PositiveButton.Warning" parent="Widget.Material3.Button.TextButton.Dialog">
<item name="android:textColor">?colorError</item>
<item name="rippleColor">?colorErrorContainer</item>
</style>

<!-- Application theme -->

<style name="AppTheme" parent="AppThemeBase" />
Expand Down

0 comments on commit 9540803

Please sign in to comment.