A little more fun for the pull-to-refresh interaction.

Overview

Pull-to-Refresh.Tours

Yalantis

This project aims to provide a simple and customizable pull to refresh implementation.

Check this [project on Behance] (https://www.behance.net/gallery/20411445/Mobile-Animations-Interactions)
Check this [project on Dribbble] (https://dribbble.com/shots/1623131-Pull-to-Refresh)

alt text

[Sample APK] (https://github.com/Yalantis/Taurus/blob/develop/sample-taurus.apk?raw=true)

#Usage

For a working implementation, Have a look at the Sample Project - sample

  1. Include the library as local library project.

  2. Include the PullToRefreshView widget in your layout.

    <com.yalantis.taurus.PullToRefreshView
        android:id="@+id/pull_to_refresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:type="sun">
    
        <ListView
            android:id="@+id/list_view"
            android:divider="@null"
            android:dividerHeight="0dp"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    
    </com.yalantis.taurus.PullToRefreshView>
  3. In your onCreate method refer to the View and setup OnRefreshListener.

    mPullToRefreshView = (PullToRefreshView) findViewById(R.id.pull_to_refresh);
    mPullToRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
        @Override
        public void onRefresh() {
            mPullToRefreshView.postDelayed(new Runnable() {
                @Override
                public void run() {
                    mPullToRefreshView.setRefreshing(false);
                }
            }, REFRESH_DELAY);
        }
     });

Misc

If you need to change progress state:

	mPullToRefreshView.setRefreshing(boolean isRefreshing)

##Installing with Gradle

compile 'com.github.yalantis:taurus:1.0.2'

#Compatibility

  • Android HONEYCOMB 3.0+

Changelog

Version: 1.0

  • Initial Build

Version: 1.0.2

  • Updated gradle version

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.

P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for Android (iOS) better than better. Stay tuned!

License

Copyright 2017, Yalantis

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.
Comments
  • How to set empty view to the list?

    How to set empty view to the list?

    As we can set empty or error view to the ListView/RecyclerView in case of no data or error respectively, how can we set this type of view inside com.yalantis.taurus.PullToRefreshView. Because com.yalantis.taurus.PullToRefreshView do not supports two children. So I can not do it like this...

    <com.yalantis.taurus.PullToRefreshView
        android:id="@+id/pull_to_refresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:type="sun">
    
        <ListView
            android:id="@+id/list_view"
            android:divider="@null"
            android:dividerHeight="0dp"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
        <TextView
            android:id="@+id/txt_empty_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </com.yalantis.taurus.PullToRefreshView>
    

    Even following is also not working properly...

    <com.yalantis.taurus.PullToRefreshView
        android:id="@+id/pull_to_refresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:type="sun">
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent" >
        <ListView
            android:id="@+id/list_view"
            android:divider="@null"
            android:dividerHeight="0dp"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
        <TextView
            android:id="@+id/txt_empty_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
        </FrameLayout>    
    </com.yalantis.taurus.PullToRefreshView>
    
    opened by khan-tm 3
  • how to include in gradle?

    how to include in gradle?

    I am trying to implement .

    • I tried by including pulltorefresh library in gradle..but it is not maintained til date.
    • also i tried by downloading the whole library and including it as module in my project, but it seems to have problems with that too. Can you please explain process to use this awesome library in my project ( PS: I am using android studio with gradle support)
    • Thanks
    opened by sijangurung 1
  • Update project

    Update project

    • Update gradle version
    • Fix gradle issues
    • Update mavenpush.gradle
    • Update compileSdkVersion
    • Update targetSdkVersion
    • Update buildToolsVersion
    • Migrate to AndroidX
    opened by dmytro1morozov 0
  • InflateException: Binary XML file line #11: Error inflating class com.yalantis.taurus.PullToRefreshView

    InflateException: Binary XML file line #11: Error inflating class com.yalantis.taurus.PullToRefreshView

    InflateException: Binary XML file line #11: Error inflating class com.yalantis.taurus.PullToRefreshView

    Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class com.yalantis.taurus.PullToRefreshView

    do you know why does this exception happens? thanks in advance.

    opened by JiangShuLiang 2
  • Gradle: Execution failed for task ':processDebugManifest'

    Gradle: Execution failed for task ':processDebugManifest'

    I am doing a projcet about airplane ticket,your pull-to-refresh of airplane is much suitable for my project. when I include your amazing pull-to-refresh into my bulid.gradle. then I got this error: Gradle: Execution failed for task ':processDebugManifest' It seems like I got to change my compileSdkVersion and buildToolsVersion to yours.It might be much troubleable for my project cause I got to change lots of codes. Counld you tell me that how can I fix it? much Thx in advance.

    opened by JiangShuLiang 1
  • RecyclerView in Fragment

    RecyclerView in Fragment

    I refer to the View and setup OnRefreshListener in onCreateView at Fragment , it's not working. However , your next repository "Phoenix" is working nice. Why?

    opened by lerendan 1
Owner
Yalantis
Knowledge is power and the way to get power is by sharing knowledge. We are open source because this is a smart way to live, work and play.
Yalantis
Phoenix Pull-to-Refresh

Phoenix Pull-to-Refresh This project aims to provide a simple and customizable pull to refresh implementation. Made in [Yalantis] (https://yalantis.co

Yalantis 4k Dec 30, 2022
a custom pull-to-refresh layout which contains a interesting animation

This is a project with custom pull-to-refresh layout which contains a interesting animation. And the animation is inspired by https://dribbble.com/sho

ZhangLei 1.8k Dec 27, 2022
A pull to refresh layout for android, the RecyclerRefreshLayout is based on the SwipeRefreshLayout. support all the views, highly customizable, code simplicity, etc. really a practical RefreshLayout!

RecyclerRefreshLayout English | 中文版 RecyclerRefreshLayout based on the {@link android.support.v4.widget.SwipeRefreshLayout} The RecyclerRefreshLayout

dinus_developer 1.7k Nov 10, 2022
A pull-down-to-refresh layout inspired by Lollipop overscrolled effects

JellyRefreshLayout A pull-down-to-refresh layout inspired by Lollipop overscrolled effects Preview Download Gradle: repositories { maven {

Y.Chen 628 Oct 26, 2022
A custom SwipeRefreshLayout to support the pull-to-refresh featrue.RecyclerView,ListView,GridView,NestedScrollView,ScrollView are supported.

SuperSwipeRefreshLayout A custom SwipeRefreshLayout to support the pull-to-refresh featrue.You can custom your header view and footer view. RecyclerVi

Zheng Haibo(莫川) 1.3k Dec 13, 2022
This component like SwipeRefreshLayout, it is more beautiful than SwipeRefreshLayout.

android-PullRefreshLayout This component like SwipeRefreshLayout, it is more beautiful than SwipeRefreshLayout. Demo Usage Add dependency. dependencie

星一 2.1k Dec 3, 2022
android custom listview,with interaction pattern load more and pull to refresh to load data dinamically

The first thing that i have to say is render thanks to johannilsson because all the part of pull to refresh listview is based in the code of his repos

Fabian Leon 447 Nov 15, 2022
Ultra Pull to Refresh for Android. Support all the views.

Welcome to follow me on GitHub or Twitter GitHub: https://github.com/liaohuqiu Twitter: https://twitter.com/liaohuqiu 中文版文档 Wanna auto-load-more? This

Huqiu Liao 9.6k Jan 5, 2023
Phoenix Pull-to-Refresh

Phoenix Pull-to-Refresh This project aims to provide a simple and customizable pull to refresh implementation. Made in [Yalantis] (https://yalantis.co

Yalantis 4k Dec 30, 2022
a custom pull-to-refresh layout which contains a interesting animation

This is a project with custom pull-to-refresh layout which contains a interesting animation. And the animation is inspired by https://dribbble.com/sho

ZhangLei 1.8k Dec 27, 2022
Phoenix Pull-to-Refresh

Phoenix Pull-to-Refresh This project aims to provide a simple and customizable pull to refresh implementation. Made in [Yalantis] (https://yalantis.co

Yalantis 4k Dec 30, 2022
This project aims to provide a reusable pull to refresh widget for Android.

Pull To Refresh for Android Note This library is deprecated, a swipe refresh layout is available in the v4 support library. This project aims to provi

Johan Berg 2.5k Jan 2, 2023
Android widget with pull to refresh for all the views,and support loadMore for ListView , RecyclerView, GridView and SwipeRefreshLayout.

CommonPullToRefresh Android widget with pull to refresh for all the views,and support loadMore for ListView,RecyclerView,GridView and SwipeRefreshLayo

null 1.1k Nov 10, 2022
A generic, customizable, open source Android ListView implementation that has 'Pull to Refresh' functionality.

Android 'Pull to Refresh' ListView library Demo video: http://www.youtube.com/watch?v=VjmdELnm3GI Project A generic, customizable, open source Android

Erik Wallentinsen 639 Nov 17, 2022
A pull to refresh layout for android, the RecyclerRefreshLayout is based on the SwipeRefreshLayout. support all the views, highly customizable, code simplicity, etc. really a practical RefreshLayout!

RecyclerRefreshLayout English | 中文版 RecyclerRefreshLayout based on the {@link android.support.v4.widget.SwipeRefreshLayout} The RecyclerRefreshLayout

dinus_developer 1.7k Nov 10, 2022
A pull-down-to-refresh layout inspired by Lollipop overscrolled effects

JellyRefreshLayout A pull-down-to-refresh layout inspired by Lollipop overscrolled effects Preview Download Gradle: repositories { maven {

Y.Chen 628 Oct 26, 2022
A custom SwipeRefreshLayout to support the pull-to-refresh featrue.RecyclerView,ListView,GridView,NestedScrollView,ScrollView are supported.

SuperSwipeRefreshLayout A custom SwipeRefreshLayout to support the pull-to-refresh featrue.You can custom your header view and footer view. RecyclerVi

Zheng Haibo(莫川) 1.3k Dec 13, 2022
Little utilities for more pleasant immutable data in Kotlin

What can KopyKat do? Mutable copy Nested mutation Nested collections Mapping copyMap copy for sealed hierarchies copy from supertypes copy for type al

KopyKat 193 Dec 19, 2022
Navigation tab strip with smooth interaction.

NavigationTabStrip Navigation tab strip with smooth interaction. You can check the sample app here. Warn This library is not more supported. If you w

Devlight 2.2k Jan 2, 2023