Android realizes infinite loop automatic playback of carousel figure view control with indicator based on viewpager
Recently, I used the rotation chart that requires unlimited rotation and automatic playback. I felt that there were such problems on the Internet, so I wrote a general control carouselfigureview.
characteristic:
1. You can define the rotation view by yourself, not necessarily if imageview2. The indicator is displayed by default, but can be hidden. 3. You can set the color, spacing and size of the indicator. 4. You can modify the code to change the position of the indicator, which should not be difficult. 5. You can turn on and off automatic rotation by yourself. When you turn on rotation, you can set the rotation time interval, Default 3000 ms
Let's take a look at the renderings:
Then let's look at the usage code
XML code
Activity code
The above is what Xiaobian introduced to you. Android realizes infinite loop automatic playback of carouselfigureview control with indicator based on viewpager. I hope it will be helpful to you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!