在pre蜂窝设备Android进度条缓慢旋转 [英] Android Progress Bar slow rotation on pre HoneyComb devices
问题描述
我一直试图实现pre蜂窝设备抽屉的转动平稳,但对我来说是不可能的:
I've been trying to achieve an smooth rotation of a drawer in pre honeycomb devices, but it was impossible for me:
在我layout.xml
In my layout.xml
<ProgressBar
style="@style/ProgressBarLarge"
android:layout_centerInParent="true" />
在styles.xml
in styles.xml
<!-- ProgressBar style -->
<style name="ProgressBarLarge" parent="@android:style/Widget.ProgressBar.Large">
<item name="android:layout_width">@dimen/large_size</item>
<item name="android:layout_height">@dimen/large_size</item>
<item name="android:indeterminateDrawable">@drawable/progress_large</item>
</style>
最后,这里是我的绘制:
and finally, here is my drawable:
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/spinner_green_76"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:toDegrees="720" />
它工作在阿比11 +设备smoothy,但在pre ...它被禁止或缓慢...
It works smoothy on Api 11 + devices, but on pre... it gets barred or slowly...
我绝望了,我试图改变旋转抽屉,更改绘制资源到正确的API版本,但我无法得到任何
I'm desperate, I've tried to change the rotate drawer, change drawable resource to the right api version, but I couldn't get anything
推荐答案
要避免每次图像的处理,您可以$计算机页上$ P-过程中它们,然后使用的帧动画:
To avoid the processing of every image, you can pre-process them on your computer, and then use a Frame animation:
在XML中定义的动画,显示在顺序图像序列
(如薄膜)。
An animation defined in XML that shows a sequence of images in order (like a film).
这篇关于在pre蜂窝设备Android进度条缓慢旋转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!