User Support Dialog. The text fragment is the wrong color.

If I put TextViewin a custom dialog, the text will be black by default.

Unfortunately, dialogue backgrounds support fragments of dark gray. Black on gray is very difficult to read.

I could change TextViewto white or something like that android:textColor="?android:attr/textColorPrimaryInverseDisableOnly". But the dialog boxes on the new android (Holo Light) are white. Therefore, it will be white on a white background.

I could use hack how to make it be white on older versions of Android and make it be black on newer versions of Android, but I'd rather find a more elegant solution.

Is there a way to change TextViewto mimic the same text that usually fits in support DialogFragment? I use the Action Bar Sherlock, if that matters.

+5
source share
2 answers

try it

alertDialogBuilder.setInverseBackgroundForced( true )

works fine in my case on devices with a preliminary cell and newer. The title is still displayed in a darker color, but the main text is clearly read on all devices.

+3
source

ActionBarSherlock, , . , Holo Dialog, Dialogs ( ). , .

2 , :

0

All Articles