Skip to content

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

Notifications You must be signed in to change notification settings

happylishang/DragScrollDetailsLayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
李尚
May 26, 2021
59f739a · May 26, 2021

History

35 Commits
May 26, 2021
May 26, 2021
Aug 22, 2016
Aug 18, 2016
Mar 24, 2017
May 26, 2021
May 26, 2021
May 26, 2021
May 26, 2021
May 26, 2021

Repository files navigation

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>

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages