Git Product home page Git Product logo

taurus's Introduction

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.

taurus's People

Contributors

apisov avatar chrismcmine avatar edbaev avatar teerawk avatar warko-san avatar

Stargazers

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

taurus's Issues

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>

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

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.

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?

RecyclerView

Is is possible to create such thing for recyclerview?

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.