您的位置:首页 > 大数据 > 人工智能

DragScrollDetailsLayout:模仿淘宝、京东、蘑菇街商品

2017-01-18 15:32 507 查看
模仿淘宝、京东、蘑菇街商品详情页,可嵌套ListView、WebView、ViewPager、FragmentTabhost等

1、支持ScrollView+Webview

2、支持scollView+viewpager(内不可以是listview或者webbiew)

3、支持支持ScrollView+listview

等等



 

 

 


使用说明

ScrollView+WebView

<com.snail.labaffinity.view.DragScrollDetailsLayout

android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="false">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="#98ff0000"
android:text="pull up to show more"/>
</LinearLayout>
</ScrollView>
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</com.snail.labaffinity.view.DragScrollDetailsLayout>

ScrollView+ViewPager

<com.snail.labaffinity.view.DragScrollDetailsLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">


               
<android.support.v4.app.FragmentTabHost
android:id="@+id/tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">

</android.support.v4.app.FragmentTabHost>

<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent">

</FrameLayout>
</LinearLayout>

</com.snail.labaffinity.view.DragScrollDetailsLayout>

ScrollView+FragmentTabHost

<com.snail.labaffinity.view.DragScrollDetailsLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">


               
<android.support.v4.app.FragmentTabHost
android:id="@+id/tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">

</android.support.v4.app.FragmentTabHost>

<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent">

</FrameLayout>
</LinearLayout>

</com.snail.labaffinity.view.DragScrollDetailsLayout>


本文由最三方开源平台(http://www.zuisanfang.com/archives/view-2048-1.html)原创,转载请保留版权和链接!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息