开发者

Switching views in ViewFlipper

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜