Let me start out by saying that I feel like there should be a very simple way to do this, and it’s entirely possible I’m missing something very simple. But all the examples I find for transition animations (push left out, push right in, etc.) deal with moving from one view to another. What about an application that only has one view, but dynamically changes the data feeding that view?
The best common example of this is the base calendar app. It has identical views, but when you swipe forward or backward the date of the view transitions with a swipe animation.
How do I reproduce this? Surely I don’t have to inflate ViewFlippers for the same view? And if so, what is the best way to go about this?
Thanks in advance.
The source code for Android can be found on
source.android.com, and the project for the Calendar application can be found here.From the looks of things, they use a
ViewSwitcherto process the animations, triggering an animation based on a fling gesture. It’s rather complicated, which is why this is on my list of reusable components to write one of these days…