相信大家都很熟悉ViewPager的数据 今天我们来讲一讲他的兄弟控件ViewFlipper 这个现在很多软件上都有的使用的控件比如京东的APP
首先看一下官网的介绍
Simple ViewAnimator
that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested, can automatically flip between each child at a regular interval.
意思是说 它将在两个或多个已添加到其中的视图之间进行动画处理。一次只能展示一个孩子。如果需要,可以定期在每个孩子之间自动翻转。
具体的使用也是非常简单啦 首先在我们的xml中写一下这个控件
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
andr