描述
重写LinearLayout,仿淘宝商品详情页,上拉查看更多详情
预览
使用
- 布局:TwoPageLayout作为父布局,内部有且只能有两个子控件ScrollEndScrollView
<com.beiing.twopagelayout.widget.twopagelayout android:layout_width="match_parent" android:layout_height="match_parent">
<com.beiing.twopagelayout.widget.scrollendscrollview android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="visible">
<linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m1"></imageview>
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m2"></imageview>
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m3"></imageview>
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m4"></imageview>
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m8"></imageview>
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m9"></imageview>
<textview android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="30dp" android:background="#2888" android:gravity="center" android:text="继续拖动,查看更多美女"></textview>
</linearlayout>
</com.beiing.twopagelayout.widget.scrollendscrollview>
<com.beiing.twopagelayout.widget.scrollendscrollview android:layout_width="match_parent" android:layout_height="wrap_content">
<linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m5"></imageview>
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m6"></imageview>
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m7"></imageview>
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m10"></imageview>
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/m11"></imageview>
<imageview android:layout_width="match_parent" android:scaletype="centerCrop" android:layout_height="200dp" android:background="@mipmap/ruhua"></imageview>
<textview android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="30dp" android:background="#2888" android:gravity="center" android:text="已经到底了"></textview>
</linearlayout>
</com.beiing.twopagelayout.widget.scrollendscrollview>
</com.beiing.twopagelayout.widget.twopagelayout>
下载
开源
项目地址: https://github.com/LineChen/TwoPageLayout 项目分类: Android 提 交 者 : 李金山 授权协议 : Apache-2.0