进度条颜色
我想将我的应用程序中的进度条颜色设置为默认进度条颜色为浅白色,并且我的应用程序也具有白色背景,因此它无法正确可见。 所以请给我解决方案。谢谢。
I want to set the Progressbar Colour in My Application as Default progressbar colour is Slight White and My Application also has the White background so it cant be visible properly.
So Please give me the Solution for it. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
@Chirag:我认为这还不够,不是吗?您的代码可能会在背景设置渐变,但白色旋转器仍会在这里。
为了让自定义微调器正常工作,我所做的就是设置一个带有背景可绘制对象(图像或形状)的进度条。这里用Java调用ProgressBar动画。
splash_spinner.xml
LauncherActivity
spinner_blue_76 (或其他)
这可能也不是正确的方法,但效果很好。 (我的灰色背景上现在有一个蓝色旋转器)
@Chirag : I don't think that will be enough is it ? Your code will probably set a gradient at the background but the white spinner will still be here.
What I did to get my custom spinner working was to set a ProgressBar with a background drawable (image or shape). The ProgressBar animation is here called in Java.
splash_spinner.xml
LauncherActivity
spinner_blue_76 (or whatever)
It might not be the proper way either but it works well. (I have now a blue spinner on my grey background)
请创建一个名为progress.xml的xml文件并将其放在res/xml文件夹中,并在该xml文件中写入以下代码。
创建此 xml 文件后,将进度条背景设置为此 xml ..
就像
Please make one xml file name progress.xml and put it in res/xml folder and write the below code in that xml file.
after creating this xml file set your progressbars background as this xml ..
Like
这不是正确的答案,但我所做的仍然是:
为了获得黑色进度条,请使用相反的样式之一:
为此,您至少需要具有 Android SDK 级别 4 (Android 1.6)。
Not the proper answer but still what I did was this:
In order to get a black ProgressBar, use one of the inverse styles:
For this you need to have a minimum of Android SDK level 4 (Android 1.6).
对于水平样式的 ProgressBar,我使用:
调用示例如下:
如果您不需要“辅助进度”,只需将 value2 设置为 value1。
For a horizontal style ProgressBar I use:
An example call would be:
If you don't need the 'secondary progress' simply set value2 to value1.