Skip to content
淘宝、京东、蘑菇街类商品详情页,可嵌套ListView、WebView、ViewPager、FragmentTabhost等
Branch: master
Clone or download
Latest commit eaa162d Mar 24, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app 过滤一些问题 Mar 24, 2017
gradle/wrapper perfect Aug 19, 2016
video update Aug 22, 2016
.gitignore 商品详情模仿淘宝京东 Aug 18, 2016
README.md Update README.md Mar 24, 2017
build.gradle perfect Aug 19, 2016
gradle.properties perfect Aug 19, 2016
gradlew 商品详情模仿淘宝京东 Aug 18, 2016
gradlew.bat perfect Aug 19, 2016
settings.gradle perfect Aug 19, 2016

README.md

DragScrollDetailsLayout

使用时候注意FragmentPagerAdapter 继承DragDetailFragmentPagerAdapter

模仿淘宝、京东、蘑菇街商品详情页,可嵌套ListView、WebView、ViewPager、FragmentTabhost等

1、支持ScrollView+Webview

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

3、支持支持ScrollView+listview

等等

使用说明

FragmentPagerAdapter请继承DragDetailFragmentPagerAdapter

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">

                <TextView                    android:layout_width="match_parent" android:layout_height="100dp" android:background="#98ff0000" android:text="pull up to show more"/>

        <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">

                <TextView                    android:layout_width="match_parent" android:layout_height="100dp" android:background="#98ff0000" android:text="pull up to show more"/>

        <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>
You can’t perform that action at this time.