我怎样才能显示一个全息主题活动圈? [英] How can I display a holo-themed activity circle?

查看:210
本文介绍了我怎样才能显示一个全息主题活动圈?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图表现出像这样的一个不确定的活动圈:

I've tried to show an indeterminate activity circle like this one:

这里的布局code:

<ProgressBar
    android:id="@+id/progress"
    style="@style/GenericProgressIndicator"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:layout_gravity="center_vertical|center_horizontal"
    android:visibility="gone" />

下面是造型code:

<style name="GenericProgressIndicator" parent="@android:style/Widget.ProgressBar.Large">
    <item name="android:layout_width">wrap_content</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="android:indeterminate">true</item>
</style>

我的圈子看起来并不像河洛为主题的圈子,你的Gmail应用程序或应用程序播放看到任何东西。我究竟做错了什么?我怎样才能获得不错的全息动画的活动圈子?

My circle doesn't look anything like the Holo themed circle that you see in the Gmail App or the Play app. What am I doing wrong? How can I get the nice Holo animated activity circle?

推荐答案

这真不是记录任何地方,我发现它通过一些随机的物品。添加此样式属性做的伎俩:

This really wasn't documented anywhere and I found it through some random article. Adding this styling attribute does the trick:

style="?android:attr/progressBarStyleLarge"

,唯一提及的这对开发者文档<一个href="http://developer.android.com/reference/android/R.attr.html#progressBarStyleLarge">here.

这篇关于我怎样才能显示一个全息主题活动圈?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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