由网友(万能青年)分享简介:有没有一种方法来切换视图在ViewFlipper就像在主屏幕上,在那里我们有小点在屏幕的底部和点击他们,我们可以切换视图。Is there a way to switch views in a ViewFlipper just like on Home screen, where we have small dots...
有没有一种方法来切换视图在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
相关推荐
最新文章