Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

zzice/AnimalLoadingView

Repository files navigation

Fork from https://github.com/Rogero0o/CatLoadingView

loadingview

dog_loading_original

Added compared to the original

Provide some methods

// set view custom background resource
setBgResId(@DrawableRes int bgResId)
// set loading text
setMsgText(CharSequence msgText) || setMsgResId(@StringRes int msgResId)

loading_view_google

Usage

Gradle

Step 1. Add the JitPack repository to your build file

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

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}
Step 2. Add the dependency
dependencies {
	compile 'com.github.zzice:AnimalLoadingView:0.0.1'
}

Maven

<repositories>
	<repository>
		<id>jitpack.io</id>
		<url>https://jitpack.io</url>
	</repository>
</repositories>
Add the dependency
<dependency>
	<groupId>com.github.zzice</groupId>
	<artifactId>AnimalLoadingView</artifactId>
	<version>0.0.1</version>
</dependency>

Use it in code

AnimalLoadingView loadingView = new AnimalLoadingView();
// config loadingview
// Example
// loadingView.setMsgText("Google大法好");
/**
 * @param FragmentManager manager
 * @param String tag
 */
loadingView.show(manager, tag);

TODO

  • custom animal loading view # add dog , cat and many more