Top Related Projects
DEPRECATED
Android loading animations
a simple loadingview for android with animation
Android loading view
Quick Overview
AVLoadingIndicatorView is an Android library that provides a collection of smooth and customizable loading animations. It offers a variety of visually appealing loading indicators that can be easily integrated into Android applications to enhance user experience during data loading or processing tasks.
Pros
- Wide range of pre-built loading animations (30+ styles)
- Easy to implement and customize
- Lightweight and efficient
- Compatible with Android 2.3 (API 9) and above
Cons
- Limited to Android platform only
- Some animations may not be suitable for all app designs
- Lack of recent updates (last update was in 2018)
Code Examples
- Basic implementation of a loading indicator:
val avLoadingIndicatorView = findViewById<AVLoadingIndicatorView>(R.id.avi)
avLoadingIndicatorView.show()
// To hide the indicator
// avLoadingIndicatorView.hide()
- Customizing the indicator style:
val avLoadingIndicatorView = findViewById<AVLoadingIndicatorView>(R.id.avi)
avLoadingIndicatorView.setIndicator("BallPulseIndicator")
- Changing indicator color:
val avLoadingIndicatorView = findViewById<AVLoadingIndicatorView>(R.id.avi)
avLoadingIndicatorView.setIndicatorColor(Color.BLUE)
- Using the indicator in XML layout:
<com.wang.avi.AVLoadingIndicatorView
android:id="@+id/avi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:indicatorName="BallPulseIndicator"
app:indicatorColor="#FF0000" />
Getting Started
- Add the dependency to your app's
build.gradle
file:
dependencies {
implementation 'com.wang.avi:library:2.1.3'
}
- Add the AVLoadingIndicatorView to your layout XML:
<com.wang.avi.AVLoadingIndicatorView
android:id="@+id/avi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:indicatorName="BallPulseIndicator"
app:indicatorColor="#000000" />
- Control the indicator in your Activity or Fragment:
val avLoadingIndicatorView = findViewById<AVLoadingIndicatorView>(R.id.avi)
avLoadingIndicatorView.show() // Show the indicator
// avLoadingIndicatorView.hide() // Hide the indicator when done
Competitor Comparisons
DEPRECATED
Pros of AVLoadingIndicatorView
- Offers a wide variety of loading indicator styles
- Easy to implement and customize
- Lightweight and efficient
Cons of AVLoadingIndicatorView
- Limited to Android platform
- May require additional configuration for complex animations
Code Comparison
AVLoadingIndicatorView:
AVLoadingIndicatorView avi = findViewById(R.id.avi);
avi.setIndicator("BallPulseIndicator");
avi.show();
Since both repositories are the same, there is no difference in the code comparison. The usage remains identical for both.
Summary
AVLoadingIndicatorView is a popular library for adding loading indicators to Android applications. It provides a diverse set of pre-built indicators and allows for easy customization. The library is lightweight and efficient, making it a good choice for developers looking to enhance their app's user experience during loading states.
However, it's important to note that AVLoadingIndicatorView is limited to the Android platform. Developers working on cross-platform projects may need to find alternative solutions for other platforms. Additionally, while the library offers many built-in styles, creating complex custom animations may require additional configuration or coding.
Overall, AVLoadingIndicatorView is a solid choice for Android developers seeking a straightforward and feature-rich loading indicator library.
Android loading animations
Pros of Android-SpinKit
- More animation styles available (over 30 compared to 12 in AVLoadingIndicatorView)
- Better performance due to optimized drawing and animation techniques
- Supports both programmatic and XML-based implementation
Cons of Android-SpinKit
- Slightly larger library size
- Less frequent updates and maintenance compared to AVLoadingIndicatorView
- Some users report occasional rendering issues on certain devices
Code Comparison
AVLoadingIndicatorView:
AVLoadingIndicatorView avi = findViewById(R.id.avi);
avi.setIndicator("BallPulseIndicator");
avi.show();
Android-SpinKit:
ProgressBar progressBar = findViewById(R.id.spin_kit);
Sprite doubleBounce = new DoubleBounce();
progressBar.setIndeterminateDrawable(doubleBounce);
Both libraries offer simple implementation, but Android-SpinKit provides more flexibility in terms of customization and animation types. AVLoadingIndicatorView uses a string-based approach to set the indicator type, while Android-SpinKit allows direct instantiation of specific animation classes.
Overall, Android-SpinKit offers more features and animations, but AVLoadingIndicatorView may be preferable for simpler projects or those requiring a smaller library footprint. The choice between the two depends on the specific needs of your project and the desired level of customization.
a simple loadingview for android with animation
Pros of LoadingView
- Offers a wider variety of loading animations and styles
- Provides more customization options for colors and sizes
- Includes both 2D and 3D loading animations
Cons of LoadingView
- Less actively maintained (last update was in 2017)
- Documentation is primarily in Chinese, which may be challenging for non-Chinese speakers
- Fewer stars and forks on GitHub, indicating potentially less community support
Code Comparison
AVLoadingIndicatorView:
AVLoadingIndicatorView avi = findViewById(R.id.avi);
avi.show();
// To hide the indicator
avi.hide();
LoadingView:
LVCircularRing loadingView = new LVCircularRing(getContext(), LVCircularRing.BLUE);
loadingView.startAnim();
// To stop the animation
loadingView.stopAnim();
Both libraries offer simple implementation, but LoadingView requires creating specific view objects for each animation type, while AVLoadingIndicatorView uses a single view with different indicator types.
AVLoadingIndicatorView is more actively maintained and has broader community support, making it potentially more reliable for long-term use. However, LoadingView offers more diverse and customizable animations, which could be beneficial for projects requiring unique loading indicators.
Android loading view
Pros of Loading
- More customizable with various animation styles and options
- Supports both determinate and indeterminate progress indicators
- Includes a dialog-style loading view for easy implementation
Cons of Loading
- Less actively maintained (last update was several years ago)
- Fewer pre-built loading indicator styles compared to AVLoadingIndicatorView
- Limited documentation and examples
Code Comparison
Loading:
Loading loading = Loading.make(context)
.setDirection(Loading.DIRECTION_CLOCKWISE)
.setSpeed(10)
.setAnimationStyle(Loading.ANIMATION_INTERPOLATOR_ACCELERATE)
.setDimAmount(0.5f)
.setLoadingColor(Color.WHITE)
.setSize(100, 100);
loading.show();
AVLoadingIndicatorView:
AVLoadingIndicatorView avi = findViewById(R.id.avi);
avi.setIndicator("BallPulseIndicator");
avi.show();
The Loading library offers more customization options in a single method chain, while AVLoadingIndicatorView provides a simpler API for quick implementation. AVLoadingIndicatorView focuses on pre-built indicator styles, whereas Loading allows for more fine-tuned control over the animation properties.
Both libraries serve similar purposes, but Loading may be better suited for projects requiring extensive customization, while AVLoadingIndicatorView is ideal for rapid implementation of common loading indicator styles.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
PLEASE NOTE, THIS PROJECT IS NO LONGER BEING MAINTAINED
AVLoadingIndicatorView
Now AVLoadingIndicatorView was updated version to 2.X , If you have any question or suggestion with this library , welcome to tell me !
Introduction
AVLoadingIndicatorView is a collection of nice loading animations for Android.
You can also find iOS version of this here.
Demo
Usage
Step 1
Add dependencies in build.gradle.
dependencies {
compile 'com.wang.avi:library:2.1.3'
}
Step 2
Add the AVLoadingIndicatorView to your layout:
Simple
<com.wang.avi.AVLoadingIndicatorView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:indicatorName="BallPulseIndicator"
/>
Advance
<com.wang.avi.AVLoadingIndicatorView
android:id="@+id/avi"
android:layout_width="wrap_content" //or your custom size
android:layout_height="wrap_content" //or your custom size
style="@style/AVLoadingIndicatorView"// or AVLoadingIndicatorView.Large or AVLoadingIndicatorView.Small
android:visibility="visible" //visible or gone
app:indicatorName="BallPulseIndicator"//Indicator Name
app:indicatorColor="your color"
/>
Step 3
It's very simple use just like .
void startAnim(){
avi.show();
// or avi.smoothToShow();
}
void stopAnim(){
avi.hide();
// or avi.smoothToHide();
}
Custom Indicator
See MyCustomIndicator in Sample .
Proguard
When using proguard need add rules:
-keep class com.wang.avi.** { *; }
-keep class com.wang.avi.indicators.** { *; }
Indicators is load from class names, proguard may change it (rename).
Indicators
As seen above in the Demo, the indicators are as follows:
Row 1
BallPulseIndicator
BallGridPulseIndicator
BallClipRotateIndicator
BallClipRotatePulseIndicator
Row 2
SquareSpinIndicator
BallClipRotateMultipleIndicator
BallPulseRiseIndicator
BallRotateIndicator
Row 3
CubeTransitionIndicator
BallZigZagIndicator
BallZigZagDeflectIndicator
BallTrianglePathIndicator
Row 4
BallScaleIndicator
LineScaleIndicator
LineScalePartyIndicator
BallScaleMultipleIndicator
Row 5
BallPulseSyncIndicator
BallBeatIndicator
LineScalePulseOutIndicator
LineScalePulseOutRapidIndicator
Row 6
BallScaleRippleIndicator
BallScaleRippleMultipleIndicator
BallSpinFadeLoaderIndicator
LineSpinFadeLoaderIndicator
Row 7
TriangleSkewSpinIndicator
PacmanIndicator
BallGridBeatIndicator
SemiCircleSpinIndicator
Row 8
com.wang.avi.sample.MyCustomIndicator
Thanks
Contact me
If you have a better idea or way on this project, please let me know, thanks :)
License
Copyright 2015 jack wang
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.
Top Related Projects
DEPRECATED
Android loading animations
a simple loadingview for android with animation
Android loading view
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot