Skip to content
Pull down to refreshing with wave animation
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
image
library
.gitignore
LICENSE Initial commit Dec 26, 2016
README.md
build.gradle add project files Dec 26, 2016
gradle.properties
gradlew
gradlew.bat add project files Dec 26, 2016
settings.gradle

README.md

DxWaveRefresh

Pull down to refreshing with wave animation

Demo

Usage

layout:

<scrollView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:background="@drawable/image"
        android:id="@+id/scrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <com.dx.waverefresh.lib.WaveRefreshLayout
            android:id="@+id/contentLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:wr_topImageHeight="@dimen/defaultTopImageHeight"
            app:wr_waveAmplitude="10dp"
            app:wr_angle="10"
            app:wr_bgColor="@color/colorWhite"
            app:wr_speed="6"
            app:wr_gravity="right">
	    
	    ...
	    
    </com.dx.waverefresh.lib.WaveRefreshLayout>
</scrollView>    

then process pull down to refresh gesture in scrollView.

pulling down:

waveRefreshLayout.setBackgroundOffset(p);

touch up:

//start refreshing
waveRefreshLayout.startLoadingAnimation();
//not trigger refreshing
waveRefreshLayout.restoreBackground();

stop wave Animation:

waveRefreshLayout.stopLoading();

more usage and information see demo.

Dependency

Add it in your root build.gradle at the end of repositories:

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

Add the dependency:

dependencies {
    compile 'com.github.StevenDXC:DxWaveRefresh:1.0'
}


#Swift version

You can’t perform that action at this time.