Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dark mode support for alert dialog on Android 15 #1252

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions onebusaway-android/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<item name="autoCompleteTextViewStyle">@style/cursorColor</item>
<!-- Allows us to force Dark Theme throughout the app -->
<item name="android:forceDarkAllowed">true</item>
<!-- Allows us to force AlertDialog Theme across the app -->
<item name="alertDialogTheme">@style/customAlertDialogTheme</item>

</style>

Expand All @@ -35,4 +37,17 @@
<item name="colorAccent">@color/theme_accent</item>
</style>

<!-- Custom Theme For Alert Dialog -->
<style name="customAlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:background">@android:color/white</item>
<item name="buttonBarPositiveButtonStyle">@style/customAlertDialogButton</item>
<item name="buttonBarNegativeButtonStyle">@style/customAlertDialogButton</item>
<item name="buttonBarNeutralButtonStyle">@style/customAlertDialogButton</item>
</style>

<style name="customAlertDialogButton" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
<item name="android:textColor">@color/theme_primary</item>
</style>


</resources>
Loading