【发布时间】:2015-11-25 16:47:56
【问题描述】:
我有一个完全由 java 代码定义的进度对话框。我只想更改背景颜色和可能的文本颜色。我在 stackoverflow 中看到过其他帖子,例如添加 style.xml 等,但没有一个有效。请不要让我参考其他帖子。该怎么办? 我的代码听起来像这样:
Class A extends Activity {
ProgressDialog pd;
Context context;
public void onCreate(){
context = A.this;
pd = new ProgressDialog.show(context, "" , "Loading");
}
}
![A sample of progress dialog which i want. Actually i have it , but the problem is the background color which i want to be white.]1
【问题讨论】:
-
默认颜色是白色吗?
-
不,是黑色的。其实我想把它改成白色。
-
您是否在 style.xml 中使用了
android:alertDialogStyle项? -
阅读我给 Eric B 留下的评论。谢谢。