Is there a way to switch views in a ViewFlipper just like on Home screen, where we have small dots at the bottom of the screen and on clicking on them we can switch vie开发者_Python百科ws.
Thanks, Farha
Step #1: Create a graphic with a dot
Step #2: Put copies of that graphic in the Views of your ViewFlipper
via ImageView
widgets, for however many dots you want
Step #3: Add an OnClickListener
to each ImageView
widget
Step #4: In onClick()
, switch the ViewFlipper
as desired
Actually, there is a better thing these days =) flowview by Patrik Åkerfeldt. See here:
https://github.com/pakerfeldt/android-viewflow
精彩评论