how to apply flip animation to imageviews in android?

Why does Android use immediate mode rendering rather than retained mode rendering?

  • I have heard that the jittery animation of Android is due to immediate mode rendering. Why would Android use that?

  • Answer:

    In short - it's doubtful. https://en.wikipedia.org/wiki/Immediate_mode_(computer_graphics) vs. https://en.wikipedia.org/wiki/Retained_mode indicates the mode in which a graphics API library takes instructions from the API user (typically an app or another library). In immediate mode - instructions to render each element on the screen need to be executed by the API user every time a frame is rendered. Conversely in retained mode - the API user only needs to call the API to change the elements that need to look different, so the API library retains the list of elements to draw that has been passed to it before. Typically retained mode is used for things such as UI elements - controls/widgets such as text boxes, buttons, scrollable containers etc. Retained mode APIs are typically a bit easier to use and make development faster, but they also typically carry quite a bit of overhead though since the library needs to handle a lot more logic and store a lot more properties than is necessary for particular scenarios. Immediate mode is used for more dynamic elements - real time graphs, animations, special effects, games etc. Even these though are usually wrapped with retained mode APIs to make development easier - graph controls, effect libraries, game engines and so on. Both modes can be implemented to perform great for their respective scenarios and they can also be implemented badly to perform badly, so you can't blame the mode for jittery animations. In fact if you want smoothest animations - immediate mode is more lightweight and as such should yield better performance. APIs typically have some inherent limitations, but they are usually implemented by large groups of experts who as any humans can make mistakes that end up being hard to fix, but since they are used by many users - they are typically higher quality than the code of most applications that use them. Another most likely source of jitteriness is cheap hardware. While code scales to infinite number of users and investments can be made to make it perform well - each piece of hardware is manufactured separately, so the better the hardware - the better the animations. Subjectively speaking I believe that hardware quality as well as app quality are much more likely causes for poor performance than the APIs available. I haven't done any Android development, but from brief scan of the APIs - as any other platform it uses a mix of the two modes - XML based retained mode APIs for UI and most likely OpenGL for things like games.

Filip Skakun at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.