如何更改 ProgressDialog 的颜色
我有一个在 Galaxy Tab 10.1" 上看起来像这样的 ProgressDialog
并在 Galaxy Tab 7 上像这样“
我希望两个对话框看起来相同:
我得到的最接近的是使用以下样式
结果是这样的
所以我的问题是:
- 如何删除“请稍候”标题周围的边框?
- 如何将整体边框从蓝色更改为白色?
- 如何调整/减少宽度?
I have a ProgressDialog that looks like this on a Galaxy Tab 10.1"
and like this on a Galaxy Tab 7"
I want both Dialogs to look the same:
The closest that I get is by using the following style
<style name="popupStyle" parent="android:Theme.Dialog">
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:background">#FF000000</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
which results in this
So my questions are:
- How can I remove the border around the "Please wait" title?
- How can I change the overall border from blue to white?
- How can I adjust/reduce the width?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过这种方式,您可以更改消息文本,还可以通过从显示的
ProgressDialog
获取其组件来自定义整个视图。请记住,您可以在progressDialog.show()之后使用findViewById()
获取视图Id,因为视图是在show()之后生成的。By doing it this way, you can change the message text and also customize the entire view by getting their components from the
ProgressDialog
that is shown. Remember, you can get the view Id by usingfindViewById()
after progressDialog.show() because the view is generated after show().