如何改变ProgressDialog微调颜色的Andr​​oid? [英] How to change ProgressDialog Spinner color in Android?

查看:1726
本文介绍了如何改变ProgressDialog微调颜色的Andr​​oid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想定制 ProgressDialog 添加到我的活动。我成功地改变了 ProgressDialog 字体和背景颜色,但我不知道如何改变颜色微调不使用小部件。谁能帮我?

I am trying to add a customized ProgressDialog to my Activity. I successfully changed the ProgressDialog font and the background colors, but I don't know how to change the spinner color without using a widget. Can anyone help me?

这是我的活动 code:

 myPd_bar=new ProgressDialog(Ratings.this,R.style.Theme_MyDialog);
 myPd_bar.setMessage("Loading....");
 myPd_bar.setTitle(null);
 myPd_bar.show();

这是我的 styles.xml code:

<style name="Theme.MyDialog" parent="@android:style/Theme.Dialog">
    <item name="android:textColor">#daac56</item>
    <item name="android:background">#160203</item>
    <item name="android:windowFrame">@null</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:windowContentOverlay">@null</item>
</style>

这是电流输出:

推荐答案

您将不得不找到进度的资产,并改变颜色用Photoshop或其他图像编辑程序手动。

You would have to find the asset of the progressbar and change the color manually with Photoshop or some other image editing program.

如果你真的想你的风格进度,我会建议采取一看HoloEverywhere库,这使您的应用程序的Andr​​oid 4.0的霍洛风格,与旧版本的Andr​​oid兼容,它看起来真的不错。

If you really want to style your progressbar, I would recommend taking a look at the HoloEverywhere library, which gives your app the Android 4.0 Holo style, compatible with older versions of Android, it looks really nice.

另外,Android的设计指南说,这是不必要的旁边添加载入中...文字的进度条。该进度足以表明您的应用程序加载用户。他们也说,这是更好的某处嵌入进度在您的应用程序,而不是在一个对话框中显示出来。

By the way, the Android design guidelines say it's unnecessary to add the "Loading..." text next to the progress bar. The progressbar is enough to indicate the user that your app is loading. They also say it is nicer to embed the progressbar somewhere in your app, rather than displaying it in a dialog.

这篇关于如何改变ProgressDialog微调颜色的Andr​​oid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆