sourcerebels/swipe-refresh-progressview


Download


Step 1. Add the JitPack repository to your build file

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

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.sourcerebels:swipe-refresh-progressview:1.0.RC4'
	}
	dependencies {
		implementation("com.github.sourcerebels:swipe-refresh-progressview:1.0.RC4")
	}
	<dependency>
	    <groupId>com.github.sourcerebels</groupId>
	    <artifactId>swipe-refresh-progressview</artifactId>
	    <version>1.0.RC4</version>
	</dependency>

                            
    libraryDependencies += "com.github.sourcerebels" % "swipe-refresh-progressview" % "1.0.RC4"
        
        

                            
    :dependencies [[com.github.sourcerebels/swipe-refresh-progressview "1.0.RC4"]]
        
        

Readme


swipe-refresh-progress

View that I use in my projects that combines a ProgressBar for displaying progress, a TextView for displaying an error message and a SwipeRefreshLayout to refresh data when error occurs.

Demo Gif

Download

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

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

Add the dependency at your module's build.gradle:

dependencies {
    compile 'com.github.sourcerebels:swipe-refresh-progressview:1.0.RC4'
}

Usage

  • Layout XML
    <com.sourcerebels.swiperefreshprogressview.SwipeRefreshProgressView
        android:id="@+id/progress_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/white"
        android:textAppearance="@style/TextAppearance.AppCompat.Display1"/>
  • Custom error message style with android:textAppearance

  • Custom SwipeRefreshLayout indicator colors

progressView.setColorSchemeResources(R.color.red, R.color.green, R.color.blue);