第二步,新建图五中的help.xml布局文件,代码如下:
- <?xml version="1.0" encoding="utf-8"?>
- <FrameLayout xmlns:Android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
- <android.support.v4.view.ViewPager
- android:id="@+id/guidePages"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"/>
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
- <LinearLayout
- android:id="@+id/viewGroup"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="30dp"
- android:gravity="center_horizontal"
- android:orientation="horizontal" >
- </LinearLayout>
- </RelativeLayout>
- </FrameLayout>
第三步,新建图五中的item01-item06.xml,因为它们是用来放置你左右滑动的图片的,如效果图我们可以看到,我的这个滑动,是支持六张图片的左右滑动的,所以这边儿我新建了item01-item06.xml,因为每个item.xml布局除了图片不一样,其他都一样,所以这里我就偷下懒,放item01.xml的代码,其余的几个xml大家自己复制item01后,改变下图片就行了。
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
- <ImageView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="@drawable/feature_guide_1" >
- </ImageView>
- </LinearLayout>

