本文介绍了交换意见ViewFlipper的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来切换视图在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 views.

谢谢,法哈

推荐答案

步骤#1:以点创建图形

Step #1: Create a graphic with a dot

第二步:通过的ImageView把该图形的副本在你的 ViewFlipper 视图窗口小部件,然而,对于你想多点

Step #2: Put copies of that graphic in the Views of your ViewFlipper via ImageView widgets, for however many dots you want

第三步:添加一个 OnClickListener 每个的ImageView 控件

Step #3: Add an OnClickListener to each ImageView widget

第四步:在的onClick(),切换 ViewFlipper 根据需要

Step #4: In onClick(), switch the ViewFlipper as desired

这篇关于交换意见ViewFlipper的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 07:38