<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:andro>
    android:id="@+id/pager_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="false"
    android:layerType="software" >

    <android.support.v4.view.ViewPager
        android:id="@+id/view_pager"
        android:layout_width="250dp"
        android:layout_height="450dp"

android:layout_marginLeft="@dimen/size_30px"
android:clipChildren="false" /> </RelativeLayout>

发现上面的RelativeLayout(可以用其它layout替换)和ViewPager的android:clipChildren都设置为了false。

android:clipChildren表示是否限制子View在其范围内,默认为true。

    如此就可以 实现 两边 留边能看见视图的ViewPager

 

相关文章:

  • 2022-12-23
  • 2022-01-02
  • 2022-02-09
  • 2021-12-22
  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
猜你喜欢
  • 2021-09-27
  • 2022-02-09
  • 2021-11-15
  • 2022-02-09
相关资源
相似解决方案