Giter VIP home page Giter VIP logo

particlesrefreshlayout-android's Introduction

Particles Refresh Layout Build StatusDownload library

Sample

Sample Particles Refresh Layout

Installation

Just use the Maven repository. Library is on jCenter and mavenCentral.

Gradle:

implementation 'com.tenclouds.particlesrefreshlayout:particles-refresh-layout:{last_release_version}'

SBT:

libraryDependencies += "com.tenclouds.particlesrefreshlayout" % "particles-refresh-layout" % "{last_release_version}"

Maven:

<dependency>
  <groupId>com.tenclouds.particlesrefreshlayout</groupId>
  <artifactId>particles-refresh-layout</artifactId>
  <version>{last_release_version}</version>
  <type>aar</type>
</dependency>

Usage

Wrap your View in ParticlesRefreshLayout in your layout:

<com.tenclouds.particlesrefreshlayout.ParticlesRefreshLayout
            android:id="@+id/particlesRefreshLayout"
            android:layout_height="wrap_content"
            android:layout_width="0dp">
            
        <android.support.v7.widget.RecyclerView
                android:id="@+id/recyclerView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"/>
                
</com.tenclouds.particlesrefreshlayout.ParticlesRefreshLayout>

then listen to start refresh actions:

particlesSwipeRefresh.onParticleRefreshListener = object : OnParticleRefreshListener {
            override fun onRefresh() {
                // do an action and stop refreshing after  
                particlesSwipeRefresh.stopRefreshing()
            }
        }

Application with example is in app folder

Customization

You can customize component from XML layout file, using attributes:

app:accentColor="@color/accentColor"
app:isSmallSize="true"

or from Java/Kotlin code:

particlesSwipeRefresh.accentColor = ContextCompat.getColor(this, R.color.accentColor)
particlesSwipeRefresh.isSmallSize = true

Library made by Jakub Jodełka

particlesrefreshlayout-android's People

Contributors

jakubjodelka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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