Android 3.0 animations demo

Watch in full 720p. This is a very simple demo that shows how to use some of the new Android 3.0 APIs.

44 Responses to “Android 3.0 animations demo”

  1. mytharak says:

    Not a bad gallery. I still think cooliris does it the best.

  2. Romain Guy says:

    It’s not a real app @mytharak, just a demo for new APIs :)

  3. Tim H says:

    A demo with no code? :) This would be a great candidate for a Fragments source code example.

  4. Romain Guy says:

    The code will be published. However, this demo does not use fragments.

  5. Jorsher says:

    Nice job Romain :)

    It is quite smooth, and a very nice looking gallery, but still a very slight choppiness. Is this due to a framerate limitation or something else?

    Totally dig your photographs.

  6. mr_archano says:

    Renderscript, isn’t it ?

  7. Romain Guy says:

    @mr_archano: It’s not RenderScript, it’s Android’s standard UI toolkit
    @Jorsher: My computer was having a hard time recording 720p video at 60fps so it dropped a few frames (that’s why the first time you see the map, it goes away very quickly, it’s an artifact of recording the video)

  8. Jorsher says:

    Good to hear Romain Guy, I was hoping it was an issue with the recording. Choppy UI has been one of my biggest annoyances for a long time, and I’m looking forward to dev’ing with Honeycomb and its successor.

  9. Romain Guy says:

    The app itself can get a little bit choppy if you do what I did in the video and press very quickly on a bunch of different pictures: it will start animating them all which may cost too much in fillrate. I also did not optimize the animations yet, so it fires one animation per sliding picture, which can cause quite a bit of overhead if there are too many at the same time. This would easily be fixed by using a single animator that animates all the pictures at the same time.

  10. Hans Petter says:

    Is the source an actual physical device with HDMI-out, or does it come from the emulator? If the latter, what’s the spec of your computer? It’s hard/impossible to develop anything for 3.0 when the emulator is as slow as it is.

  11. Romain Guy says:

    The source is an actual device.

  12. Hans Petter says:

    OK. Do you know if there will be any improvements to the emulator soon?

  13. Romain Guy says:

    We’re aware of the issue, but the problem is that the emulator is an emulator. It has to emulate an ARM CPU, which is very expensive. We are considering various solutions though.

  14. Gary Wang says:

    Dear Romain,

    Really a good demo for Animation in Android 3.0. Thanks for your sharing!

    Being longing to this program codes…:)

    Gary

  15. Hans Petter says:

    Romain: I understand. It’s really hindering the development process, so I hope it gets addressed in some way or the other.

  16. David Conrad says:

    These are pretty pictures, but after watching the demo I know nothing more about Android 3.0 animations than I did before watching it. Where can I go for more information?

  17. Romain Guy says:

    David, I will publish the source code of this demo as soon as I can.

  18. Android Jet says:

    Smooth animation, looking forward to see more demos.

  19. pauland says:

    With what tools did you make this video?

  20. Romain Guy says:

    An HDMI capture card and Adobe Premiere.

  21. Chet Haase says:

    @David: For information about the new animation API, check out the API docs in the 3.0 SDK, plus the API Demos (the “Animations” category) for various examples. Also, there is an upcoming article on the Android developer blog hopefully being published Real Soon Now….

  22. Alex says:

    Only partially related to the smooth animation, but when you talk about hardware acceleration, is it only the drawing part? or the compositing part as well? Constant smooth animation would imply compositing since high complexity views would not cause it to stutter because its only required to draw once to a bitmap/fbo for each view. Also, in the sdk it said views do not have a set layer initially, so I’m wondering if turning on the hardwareacceleration in the manifest automatically sets each view with its own hardware layer? or does the developer have to set the layer specifically? Thanks.

  23. Romain Guy says:

    The source code is now available at http://code.google.com/p/xlarge-demos/

    @Alex Layers have to be turned on manually. It is a good practice to enable/disable hardware layers when starting/stopping an animation. Note that it makes sense only for very complex views (if a View only draws a bitmap, it doesn’t matter.) There’s an example of enabling hardware layers for a ListView in the source code I just linked to.

  24. Ben Gildenstein says:

    This is a fantastic looking demo, and a fine testament to the flexibility of Android UIs.

    It occurs to me that Google should have more creative examples like this with source code on the Android developers site. Many developers/users seem to think that multi-pane displays (such as this one) are only possible with 3.0s UI toolkit. An online resource would expose the flexibility of the system.

  25. Boris Millet says:

    How do I allow contributors to see only their uploads in WordPress?

  26. I have a wordpress blog with a lot of pictures hosted on third party websites. I want all the pictures to be hosted in my wordpress blogs. I don’t want to manually download all pictures and replace them in the posts, i need something to do that automatically..