If I put a TextView
in a custom dialog box, the text will be black by default.
Unfortunately, the support fragment dialogs backgrounds are dark gray. Black on gray is very hard to read.
I could change the TextView
to white or something like android:textColor="?android:attr/textColorPrimaryInverseDisableOnly"
.
But the dialog boxes on the new android (Holo Light) are white. So it will be white on white.
I could use a hack like forcing it to be white on old versions of Android and forcing it to be black on newer versions of Android, but I'd rather find a more elegant solution.
Is there a way to change the TextView
to imitate the same text that's normally put on the support DialogFragment
? I'm using Action Bar Sherlock, if that matters.
Try this
alertDialogBuilder.setInverseBackgroundForced( true )
works fine in my case on pre-Honeycomb devices and newer ones. The title still appears in a darker color but the main text is clearly readable on all devices.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With