Cyanea
Cyanea copied to clipboard
Cyanea incorrectly puts the background buttons on a dialog in accentColor
They were: textColor = accent BackgroundColor = transparent
I have an issue where i get buttons styled like that instead of TextButton styled ones when I have my theme descend from Themes.Cyanea.NoActionBar (dark or light), and when inspecting the layout it seems it is applying android:style/ThemeOverlay.Material.Dialog.Alert()
instead of my.bundle.identifier.dev:style/ThemeOverlay.MaterialComponents.Dialog.Alert()
(and this latter seems to have been applied twice..?). Any tips regarding this?
Similarly, the text color of DialogButtons are incorrectly colored with colorPrimary, when they are typically colored with colorAccent. The AndroidX library versions for ListPreference, PreferenceDialogFragments, and other misc AlertDialogs have this same behavior
If someone posts simple sample code it would be much appreciated.
In my scenario, I'm using the ThemePickerActivity and your provided JSON themes per the documentation:
{
"theme_name": "Reddit",
"base_theme": "DARK",
"primary": "#FF000000",
"primary_dark": "#FF000000",
"primary_light": "#FF262626",
"accent": "#FFFF3D00",
"accent_dark": "#FFD83300",
"accent_light": "#FFFF5A26",
"background": "#FF212121",
"background_dark": "#FF1C1C1C",
"background_light": "#FF424242"
}
Colors DialogButtons with the above-defined "primary" or "primary_dark", when it should be colored with "accent". My dialogs use the parent style from Theme.Cyanea.Light
. I've tried your "Reddit" Cyanea Theme and my own, and both cases do the same.
Affected components:
- AlertDialog.Builder
- Dialogs from Preferences (ListPreference, EditTextPreference, etc.)
- All dialogs from what I've seen
To Reproduce: (In Java, sorry)
This is an AlertDialog.Builder
from 'androidx.appcompat.app.AlertDialog
'
final AlertDialog.Builder sampleDialog = new AlertDialog.Builder(mContext);
sampleDialog.setMessage("Sample Dialog")
.setNegativeButton("Close", (thisDialog, id) -> thisDialog.dismiss());
});
sampleDialog.show();
Or, you can create an EditTextPreference on a PreferenceScreen and the same occurs.
On a related note, CheckBoxPreferences have their checkboxes colored by the some variant of the background color, when they should also be colorAccent.
Any updates on this?
Using this library also having the same issue
https://github.com/wdullaer/MaterialDateTimePicker
Is there a way to fix it?
Has there been anyway to fix this?