本文实例讲述了Android开发实现的ViewPager引导页功能(动态加载指示器)。分享给大家供大家参考,具体如下:先看效果图咯~现在几乎每个App都会有引导页,是不是感觉很炫很厉害,所以就想做出来一个学习一下~让自己的App看起来更加的
本文实例讲述了Android开发实现的ViewPager引导页功能(动态加载指示器)。分享给大家供大家参考,具体如下:
先看效果图咯~
现在几乎每个App都会有引导页,是不是感觉很炫很厉害,所以就想做出来一个学习一下~让自己的App看起来更加的美观~
现在来分析一下:
这个引导页可以分为俩部分~
小红点--来提醒这是第几页了~
“开始体验”这个Button--可以进入主界面,但是要控制这个Button只能在最后一页出现
布局的话使用相对布局~
那现在来看看布局吧:
activity_main:
<RelativeLayout xmlns:android="Http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <android.support.v4.view.ViewPager android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="match_parent" /> <RelativeLayout android:id="@+id/rl" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginBottom="20dp"> <LinearLayout android:id="@+id/linear" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> </LinearLayout> </RelativeLayout> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/btn" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginBottom="50dp" android:visibility="invisible" android:text="开始体验"/></RelativeLayout>
--结束END--
本文标题: Android开发实现的ViewPager引导页功能(动态加载指示器)详解
本文链接: https://www.lsjlt.com/news/219907.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0