/ Refresh

Typewriter pull to refresh Android animation

Typewriter pull to refresh Android animation

Typewriter

Typewriter pull to refresh Android animation.

Typewriter

Usage

Add to your root build.gradle:

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

Add the dependency:

dependencies {
    compile 'com.github.Ilya-Gh:Typewriter:v1.0.0'
}

Supported Views

  • RecyclerView
  • ListView
  • ScrollView
  • NestedScrollView

How do I get set up?

Just wrap your view:

<com.github.ilyagh.TypewriterRefreshLayout
    android:id="@+id/pullToRefresh"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recyclerView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:divider="@null"
        android:dividerHeight="0dp"
        android:fadingEdge="none" />

</com.github.ilyagh.TypewriterRefreshLayout>

Animation

Just implement PullToRefreshView.OnRefreshListener:

pullToRefresh.setOnRefreshListener(new TypewriterRefreshLayout.OnRefreshListener() {
    @Override
    public void onRefresh() {
        //refresh your data here  
    }
});

To start or stop animation:

pullToRefresh.setRefreshing(isRefreshing)

GitHub