2

我一直在使用 Android ProgressBar。这里唯一的是针对特定应用程序,我需要 ProgressBar 不具有半透明背景。我的意思是你仍然可以看到它背后的视图,因为进度条是半透明的。

实际上我需要一个完整的背景不透明度(黑色,白色,没关系)。只要可以使用进度条隐藏后面的面板。
我不能只使用面板本身并设置背景,因为它是一个 Web 面板(发生 JS 的事情)。

感谢您的回复

问候

4

2 回答 2

2

尝试这个:

TextView tv = (TextView) progressDialog.findViewById(android.R.id.message);
tv.setTextColor(Portlet.MessageFontColor);

View v = (View) tv.getParent();
((ScrollView) v).setBackgroundColor(Portlet.messageBackColor);

v = (View) v.getParent();
v.setBackgroundColor(Portlet.messageBackColor);

LinearLayout ll = (LinearLayout) v.getParent();
ll.setBackgroundColor(Portlet.messageBackColor);
于 2013-07-16T07:20:37.320 回答
0

我解决了我的问题。实际上我创建了自己的自定义进度条。可以在此处找到示例: 创建自定义进度对话框

然后我只是使用这种方法模糊了对话框的背景: Blur Dialog

希望有帮助!

于 2012-06-14T10:27:04.113 回答