在黑暗的背景的黑暗的文本在与Theme.Sherlock.Light的AlertDialog

时间:2012-11-07 09:35:42

标签: android android-alertdialog android-theme android-dialogfragment

我正在为我的应用程序使用Theme.Sherlock.Light主题,而我正在使用基础DialogFragment创建AlertDialog。它在Android 3.x和4.x上运行得很好,但在Android 2.x上我看到深色背景上的深色文本,这几乎不可读。我做错了什么,是否需要通过创建自定义样式强制浅色背景?提前谢谢。

1 个答案:

答案 0 :(得分:25)

我找到了解决方案here

builder.setInverseBackgroundForced(true)

另外,正如我所看到的here,Jake Wharton建议以同样的方式修复它,因为AlertDialog的实现,他不知道更好的解决方案。

相关问题