Detailed explanation and examples of Android viewflipper
Detailed explanation of Android viewflipper
preface:
View flipper is a subclass of viewanimator, and viewanimator inherits from FrameLayout, which is a layout that basically displays only one child view. Because it is difficult to determine the position of child views under FrameLayout, there are mutual occlusion in front of child views in many cases, As a result, many times we only require FrameLayout to display a sub view, and then switch through some controls. As it happens, viewflipper helps us achieve this work. What we need to do is to select the right time and call the right method
Class structure
Basic use
1. Animation definition
scalein.xml
scaleout.xml
2. Layout documents
activity_ main.xml
3. Left and right sliding switching
Actual effect
The above is how to use Android viewflipper. If you have any questions, please leave a message or communicate and discuss with our community. Thank you for reading. I hope it can help you. Thank you for your support to our site!