From what I can say, ViewSwitcher is used if you want to switch between the two views, as you said. It is useful if you have 2 species that you need to regularly and regularly return back and forth. And the class implements ViewFactory if you want to use it.
However, ViewFlipper can be used if you want to periodically change views. Say it like an automatic leafing book. Although the custom adapter gallery is much better.
And yes, thatβs all. They really are not much more useful than ViewAnimator. Why Android development does something mysterious to me.
I usually just prefer to use ViewAnimator because it gives you more freedom and therefore flexibility in the way you develop. But if you need features like ViewFactory, and you only have 2 views, use ViewSwitcher. If you want to be able to periodically change views, use ViewFlipper. If you do not need to use ViewAnimator.
alexanderjslin Aug 23 2018-10-10T00: 00Z
source share