【问题标题】:changing theme of android dialog改变android对话框的主题
【发布时间】:2013-12-27 06:36:19
【问题描述】:

在我的 Android 应用程序中,我已将应用程序的 主题 设置为

android:Theme.Holo.Light

我将对话框创建为

final Dialog dialog = new Dialog(DropPicupProcess.this);

但是当我在应用程序中弹出一个对话框时,它显示如下。

如何将对话框的主题更改为 android:Theme.Holo.Light

【问题讨论】:

  • 安卓 4.4。有关系吗??????

标签: android android-dialog


【解决方案1】:

而不是这个

final Dialog dialog = new Dialog(DropPicupProcess.this);

像这样创建你的对话框..

Dialog dialog=new Dialog(DropPicupProcess.this,android.R.style.Theme_Holo_Light);

【讨论】:

  • 成功了。我使用了 R.style.Theme_Holo_Dialog。感谢您的帮助。
【解决方案2】:

你可以试试这个

Dialog dialog=new Dialog(DropPicupProcess.this,new ContextThemeWrapper(this,android.R.style.Theme_Holo_Light));

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-07-13
    • 1970-01-01
    • 2016-05-29
    • 1970-01-01
    • 1970-01-01
    • 2013-06-23
    • 1970-01-01
    相关资源
    最近更新 更多