【发布时间】:2013-07-25 23:52:44
【问题描述】:
我的 style.xml 中有一些小自定义:
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.NoActionBar"></style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:background">@color/light_grey</item>
<item name="android:textColor">@color/white</item>
</style>
现在样式已正确应用于我的活动。
但是当我创建一个警报对话框时,背景颜色会应用于对话框的标题和正文,这是我不想要的。我希望 alertdialog 保持其股票样式。
这是警报对话框:
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle("Wtitle").setMessage("message");
builder.setNeutralButton("ok", null);
builder.show();
谁能帮忙?
【问题讨论】:
-
您是否将 AppBaseTheme 应用于应用程序,而不是活动?
标签: android styles android-alertdialog