我在style.xml一些小的定製:的Android防止活性風格被應用於alertdialogs
<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保持其股票樣式。
這裏是alertdialog:
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle("Wtitle").setMessage("message");
builder.setNeutralButton("ok", null);
builder.show();
誰能幫助?
您是否將AppBaseTheme應用到應用程序,而不是活動? – sandrstar