GithubHelp home page GithubHelp logo

muhammadammad / liquidrefreshlayout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mukeshsolanki/liquidrefreshlayout

0.0 2.0 0.0 4.86 MB

Liquid Refresh Layout is a simple SwipeToRefresh library that helps you easily integrate SwipeToRefresh and performs simple clean liquid animation

License: Apache License 2.0

Kotlin 100.00%

liquidrefreshlayout's Introduction

Liquid Refresh Layout - Android



Liquid Refresh Layout is a simple SwipeToRefresh library that helps you easily integrate SwipeToRefresh and performs simple clean liquid animation.

Getting started

Its really simple to integrate Liquid Refresh Layout in android. All you need to do make the following change to you build gradle.

Step 1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
    implementation 'com.github.mukeshsolanki:liquidrefreshlayout:<latest-version>'
}

How to use Liquid Refresh Layout

Its fairly simple and straight forward to use Liquid Refresh Layout in you application. Just add the following in your layout where you want to display the Liquid Refresh Layout.

<com.madapps.liquid.LiquidRefreshLayout
    android:id="@+id/refreshLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:AniBackColor="@color/colorAccent"
    app:AniForeColor="@color/colorBackground"
    app:CircleSmaller="6"
    >
  <!--Add your views here for example we are using recyclerview-->
  <android.support.v7.widget.RecyclerView
      android:id="@+id/recyclerView"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:scrollbars="vertical"
      />
</com.madapps.liquid.LiquidRefreshLayout>

and implement LiquidRefreshLayout.OnRefreshListener it in your activity/fragment and assign the Liquid Refresh Layout like wise.

refreshLayout.setOnRefreshListener(object : LiquidRefreshLayout.OnRefreshListener {
      override fun completeRefresh() {
         //Called when you call refreshLayout.finishRefreshing()
      }

      override fun refreshing() {
        //TODO make api call here
      }
    })

to stop refreshing call refreshLayout.finishRefreshing()

Author

Maintained by Mukesh Solanki

Contribution

GitHub contributors

License

Copyright 2018 Mukesh Solanki

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

liquidrefreshlayout's People

Contributors

mukeshsolanki avatar

Watchers

 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.