Git Product home page Git Product logo

scrollablelayout's Introduction

ScrollableLayout

j.s ๐Ÿ‡จ๐Ÿ‡ณ

easy to add a headview for any view and supports sticking the navigator on the top when ItemView scrolls.

fork and change on https://github.com/cpoopc/ScrollableLayout

scrolling is not smooth, especially on some models .

another choice ใ€Œ w446108264/StickHeaderLayout ใ€

Features

  • API > 11
  • Support ViewPager, RecyclerView, ScrollView, ListView, WebView
  • Support pulltoRefresh and loadmore
  • Support dynamic headview
  • Easy to add a headview for any view

Art

Screen Recrod

Samples

You can download a sample APK

Gradle Dependency

Users of your library will need add the jitpack.io repository:

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

and:

dependencies { 
   compile 'com.github.w446108264:ScrollableLayout:1.0.3'
}

Sample Usage

      <com.scrollablelayout.ScrollableLayout
        android:id="@+id/sl_root"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <!--the frist childview will follow the scrollview scroll.-->
        <TextView
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:background="#345"
            android:gravity="center"
            android:textColor="#fff"
            android:text="header" />

        <!--the second childview will be a navigator.
        it will be sticking on the top when ItemView scrolls, 
        it's not necessary to add if you don't want-->
        <TextView
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="#235"
            android:gravity="center"
            android:textColor="#fff"
            android:text="navigationbar" />

        <!--ScrollView support ViewPager, RecyclerView, ScrollView, ListView, WebView-->
        <ListView
            android:id="@+id/vp_scroll"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#f1f1f1" />

    </com.scrollablelayout.ScrollableLayout>
    // please see the demo
    sl_root = (ScrollableLayout) findViewById(R.id.sl_root);
    listview = (ListView) findViewById(R.id.vp_scroll); 
    sl_root.getHelper().setCurrentScrollableContainer(listview);

Contact & Help

Please fell free to contact me if there is any problem when using the library.

scrollablelayout's People

Contributors

w446108264 avatar

Watchers

 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.