Jerky animations on Nexus 7 and Nexus 10

dariengs

Member
Licensed User
Longtime User
Hi there - I've written a game which involves dropping an ImageView from the top of the playfield to the bottom, using the regular animation library (specifically the InitializeTranslate method). On regular smartphones the drop is beautifully smooth, but on the Nexus 7 the animation can be somewhat juddery, and on the Nexus 10 it's horrifically jerky. I presume this is down to the higher resolutions these devices use, but that's just a guess.

Any suggestions as to how I can make the animations run more smoothly on these hi-res tablets? Please don't tell me I have to rewrite the whole thing with GameViews or Canvases...
 

Informatix

Expert
Licensed User
Longtime User
Hi there - I've written a game which involves dropping an ImageView from the top of the playfield to the bottom, using the regular animation library (specifically the InitializeTranslate method). On regular smartphones the drop is beautifully smooth, but on the Nexus 7 the animation can be somewhat juddery, and on the Nexus 10 it's horrifically jerky. I presume this is down to the higher resolutions these devices use, but that's just a guess.

Any suggestions as to how I can make the animations run more smoothly on these hi-res tablets? Please don't tell me I have to rewrite the whole thing with GameViews or Canvases...

You must set the hardware acceleration to true in your manifest. In the latest JellyBean version available on these devices, this setting is not activated by default (and I think it's a wise decision). The animation library needs it in some cases.
 
Upvote 0

dariengs

Member
Licensed User
Longtime User
Thanks for this! I've made the change and I think things are now smoother on the Nexus 7. The acid test will be the Nexus 10, but it may be a while until I can next get my hands on one... cheers anyway!
 
Upvote 0

RJB

Active Member
Licensed User
Longtime User
Hi,
I'm having the same problem, jerky animation. I've tried setting the hardware acceleration in the manifest but it doesn't seem to have any effect. Should this now be set in the project or activity attributes and if so how? I'm moving photographic images.
The animation also seems to have an adverse effect on timers where the time period can be, for example, stretched from 20mS to nearly 40mS during the transition. Is that normal?
Thanks
 
Upvote 0
Top