我想删除viewpager上的额外填充/边距。请参见附件https://www.dropbox.com/s/gsqzae28mvihy96/Screenshot_2015-07-22-17-59-30.png?dl=0
XML:
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/pager"
android:layout_width="fill_parent"
android:layout_height="match_parent"
tools:context="com.masterscroll.masterscroll.CommunityActivity2"
android:padding="0dp">
</android.support.v4.view.ViewPager>
答案 0 :(得分:1)
查看this个答案。您可以在ViewPager上尝试这些方法。
setPageMargin(int marginPixels)
setPageMarginDrawable(drawable d)
setPageMarginDrawable(int resId)