Coder Social home page Coder Social logo

flyrefresh's Introduction

FlyRefresh

The Android implementation of Replace, designed by Zee Youn. I implement this as a FlyRefresh layout. The content of the layout can be any NestedScrollingChild, such as a RecyclerView, NestedScrollView, VerticalGridView, etc. This library can also work with NestedScrollingParent as parent, such as CoordinatorLayout.

How it looks

flyrefresh

Features

How to use

Add Gradle dependency:

dependencies {
   compile 'com.race604.flyrefresh:library:2.0.0'
}

An example of basic usage in layout.xml:

<com.race604.flyrefresh.FlyRefreshLayout
  android:id="@+id/fly_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent">

    <android.support.v7.widget.RecyclerView
      android:id="@+id/list"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingTop="24dp"
      android:background="#FFFFFF"/>
</com.race604.flyrefresh.FlyRefreshLayout>

Or you can use PullHeaderLayout for more configurations, you can set custom attributes as shown below:

<declare-styleable name="PullHeaderLayout">
    <!-- hader size -->
    <attr name="phl_header_height" format="dimension" />
    <attr name="phl_header_expand_height" format="dimension" />
    <attr name="phl_header_shrink_height" format="dimension" />
    <!-- header view id -->
    <attr name="phl_header" format="reference" />
    <!-- content view id -->
    <attr name="phl_content" format="reference" />
    <!-- Float action button icon -->
    <attr name="phl_action" format="reference" />
</declare-styleable>

For more, please turn to the source code.

License

FlyRefresh is available under the MIT license.

flyrefresh's People

Contributors

race604 avatar victorvation 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.