Я применяю тему:
<style name="myAlertTheme" parent="@android:style/AlertDialog">
<item name="android:textColor">#ff000000</item>
</style>
<style name="RadioButton" parent="@android:style/Widget.CompoundButton.RadioButton">
<item name="android:textColor">#ff000000</item>
</style>
<style name="HSDroidStyle" parent="android:Theme">
<item name="android:background">#ffd3d3d3</item>
<item name="android:textColor">#ff000000</item>
<item name="android:textSize">20dp</item>
<item name="android:radioButtonStyle">@style/RadioButton</item>
</style>
Но когда я создаю оповещение, текст отображается белым, а не черным. Для создания оповещения я использую:
AlertDialog alertDialog = new AlertDialog.Builder(
new ContextThemeWrapper(act, R.style.myAlertTheme)).create();
alertDialog.setTitle(title);
alertDialog.setMessage(msg);
alertDialog.setIcon(android.R.drawable.ic_dialog_alert);
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
if (exitOnFailure) mainAct.finish();
return;
} });
alertDialog.show();
Теперь «OK» в кнопке меняется, если я изменяю размер в myAlertTheme, но не заголовок или текст. Так что я предполагаю, что есть какой-то другой атрибут textColor, который решает эту проблему. Я перепробовал большинство из них, но ни один из них не работает.
Есть идеи?