Steve
Steve

Reputation: 55635

Android Animation Alternatives

I want to implement a news ticker in my application, with vertical and horizontal scrolling, as well as some alpha animations.

I need the animation to be unaffected by the rest of the application (GPU/hardware accelerated). Especially since the application will be run on a Google TV box, and the user is expected to be using D-Pad navigation which can cause animation to become choppy.

These appear to be my options (I need to support Honeycomb and above):

  1. Use the Android Animation classes

    • Will the performance of this approach ever match using OpenGL?
    • Is hardware acceleration possible, and reliable?
    • Easiest to work with.
  2. OpenGL ES 2

    • There appears to be a limit to the texture size of 2048. If I have a headline longer than that

  3. RenderScript

    • The documentation is sparse here.


In your opinion, what is the best solution? What other solutions are there?

Upvotes: 0

Views: 195

Answers (1)

Les Vogel
Les Vogel

Reputation: 7132

One pattern that's common is to enable hardware acceleration, animate, then disable it. However, on the Intel based GoogleTV boxes there is a problem with text when you turn on Hardware Acceleration. I haven't tried it on an ARM based Google TV yet.

I am by no means an OpenGL ES expert, but I am a huge fan and have seen some wonderful things done using it for Google TV. That said, I think your understanding of OpenGL ES Textures is incorrect. The size of the texture should have little bearing on the length of a headline. I currently have an intern working on a bunch of OpenGL ES examples that we hope to publish by the end of August.

There is excellent sample code for working with RenderScript, even if the documentation is sparse. However some developers haven't been able to integrate RenderScript w/ d-pad navigation.

My suggestion is to try your worst case senario using OpenGL ES as a very short program and see how it works. It's likely to be the best solution.

I can imagine why your seeing choppiness on some GoogleTV animations, StateLists firing when D-Pading, but it's not an insolvable issue.

Upvotes: 1

Related Questions