在android中如何使用图像按钮滑动屏幕?

时间:2014-10-25 03:57:11

标签: android swipe

我想创建一个Android应用程序..我有3个xml文件。第一个是启动画面,第二个描述概述第三个是关于我...

My requirement is in the page there will be three circles in the bottom for 3 screens.
when i click to a screen(swipe) it will go to another screen and one of the circle will fill up a colour.other wise 
it will blank..

其实我想要:--- This image  这个图像有5个圆圈,5个屏幕..如果我们在第3页,那么第3个没有圆圈将填满其他人将会清空的颜色..

请给我一些建议。我可以这样做吗????

1 个答案:

答案 0 :(得分:0)

您可以使用ViewPager进行滑动,对于圆形指示器,您可以使用带有选择器背景的图像视图,并在onPageChangeListener中进行管理。
您可以在这里找到最好的标准解决方案/示例之一:
http://developer.android.com/training/animation/screen-slide.html

我用过这个并且工作正常。如果您有任何进一步的问题,请告诉我。

对于主屏幕xml你必须使用FrameLayout,因为图像(圆圈指示符)将位于屏幕的顶部。