http://blog.csdn.net/chen930724/article/details/50464069
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/view_pager_box"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="360dp"
android:layout_marginTop="30dp"
android:clipChildren="false"
>
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:clipChildren="false"
/>
</RelativeLayout>
再设置图片边距,就可以做成这样了。