Giter Site home page Giter Site logo

wfqliuchao / dragscrolldetailslayout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from happylishang/dragscrolldetailslayout

0.0 2.0 0.0 56.98 MB

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

Java 100.00%

dragscrolldetailslayout's Introduction

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>

dragscrolldetailslayout's People

Contributors

happylishang avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.