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.elmliu:loadingdrawable:1.0'
}
dependencies {
implementation("com.github.elmliu:loadingdrawable:1.0")
}
<dependency>
<groupId>com.github.elmliu</groupId>
<artifactId>loadingdrawable</artifactId>
<version>1.0</version>
</dependency>
libraryDependencies += "com.github.elmliu" % "loadingdrawable" % "1.0"
:dependencies [[com.github.elmliu/loadingdrawable "1.0"]]
前言
CircleRotate源码解析
Fish源码解析<br/>
LoadingDrawable is some android animations implement of drawable: a library can be used in the pull-down to refresh, the placeholders of image loading and the time-consuming tasks. This project idea is from the link.<br/>
The following content show a brief overview of LoadingDrawable
Drawable
and implement the interface Animatable
ImageView
LoadingRenderer
LoadingRenderer
by the callback Callback
LoadingRenderer
is used for measuring and drawing the LoadingDrawable
. note:
LoadingRenderer
is the coreLoadingRenderer
only can be created by their Builder
.Learn more about LoadingDrawable on the Wiki Home.
Define the LoadingView
in XML and specify the LoadingRenderer
style:
<app.dinus.com.loadingdrawable.LoadingView
android:id="@+id/level_view"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#fff1c02e"
app:loading_renderer="LevelLoadingRenderer"/>
Or specify the LoadingRenderer
style in Java
***LoadingRenderer.Builder builder = new ***LoadingRenderer.Builder(context);
LoadingView.setLoadingRenderer(builder.build());
When I feel less bugs enough, I will add a gradle dependency. So I hope you will make more Suggestions or Issues.
If you like LoadingDrawable or use it, could you please:
QQ Group: 342748245
Copyright 2015-2019 dinus
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.