我怎样才能显示一个全息主题活动圈?
问题描述:
我试图表现出像这样的一个不确定的活动圈:
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"
,唯一提及的这对开发者文档here.