1、具体步骤
说下大概实现步骤,一般我们有两种,一种是viewpager+作为游标的点 。另外一种是重写viewpager。
效果图:
1.1 布局,直接viewpager+一个viewgroup就好。
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.maxence.viewpager.MainActivity" >
android:layout_width="match_parent"
android:layout_height="220dp" >
android:id="@+id/vp_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:id="@+id/ll_container"
android:layout_width="match_parent"
android:layout_height="30dp"
android:gravity="center