sheitan
sheitan

Reputation: 1156

Tween animation slow on Ice-Cream-Sandwich

I've been playing around with tween animations for a while. In my latest project I'm declaring 4 rotate animations in xml like the folowing:

<rotate 
android:repeatMode="reverse"
android:repeatCount="infinite"
android:fromDegrees="0"
android:toDegrees="-7"
android:duration="1600"
android:pivotX="90%"
android:pivotY="63%">
</rotate>
</set>

And I'm aplying these 4 animations to 4 ImageViews. Everything worked perfect on Gingerbread but when i tested it on Ice-Cream-Sandwich i got horrible frame rates. What is the cause of this?

Upvotes: 0

Views: 770

Answers (2)

p4u144
p4u144

Reputation: 757

You could take a look at this site I recently found : http://laurencedawson.com/slow-animations-in-android It may help you. You could also tried to disable the hardware acceleration (which seems to be set to true by default on upper 3.x). Surprinsingly, I had the same problem with a laggy animation on ICS (that was working fine under 3.x), an android:hardwareAccelerated="false" in my manifest solved it.

Upvotes: 1

Medo
Medo

Reputation: 671

You can try using setting the interpolator attribute to smooth out the animatoins android:interpolator="@interpolator/accelerate_quad"

You should place the interpolator .xml files in the res\interpolator folder of your project.

The files are located in {android_sdk_location}\android-sdks\platforms\android-15\data\res\interpolator

Upvotes: 0

Related Questions