Convert Figma logo to code with AI

ldoublem logoLoadingView

a simple loadingview for android with animation

2,727
465
2,727
20

Top Related Projects

Android loading animations

DEPRECATED

高仿新版58 加载动画

Some beautiful android loading drawable, can be combined with any view as the LoadingView or the ProgressBar. Besides, some Drawable can customize the loading progress too.

A 2d metaball loading

Quick Overview

LoadingView is an Android library that provides a collection of custom loading animations and progress indicators. It offers a variety of visually appealing and customizable loading views that can be easily integrated into Android applications to enhance user experience during data loading or processing operations.

Pros

  • Wide variety of loading animations and styles
  • Highly customizable with options for colors, sizes, and animation speeds
  • Easy to integrate into existing Android projects
  • Lightweight and efficient implementation

Cons

  • Limited documentation and usage examples
  • Some animations may be resource-intensive on older devices
  • Not actively maintained (last update was several years ago)
  • Lack of support for newer Android versions and Material Design guidelines

Code Examples

  1. Basic usage of a loading view:
LVCircularRing loadingView = new LVCircularRing(context);
loadingView.setViewColor(Color.parseColor("#1b82d2"));
loadingView.startAnim();
  1. Creating a custom loading dialog:
LVCircularCD loadingView = new LVCircularCD(context);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setView(loadingView);
AlertDialog dialog = builder.create();
dialog.show();
loadingView.startAnim();
  1. Customizing a loading view:
LVFinePoiStar loadingView = new LVFinePoiStar(context);
loadingView.setViewColor(Color.RED);
loadingView.setCircleColor(Color.BLUE);
loadingView.setDrawPath(true);
loadingView.startAnim(5000);

Getting Started

To use LoadingView in your Android project:

  1. Add the JitPack repository to your project's build.gradle file:
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  1. Add the dependency to your app's build.gradle file:
dependencies {
    implementation 'com.github.ldoublem:LoadingView:1.0'
}
  1. Sync your project with Gradle files.

  2. Use the loading views in your layout XML or create them programmatically in your Java/Kotlin code.

Competitor Comparisons

Android loading animations

Pros of Android-SpinKit

  • More diverse collection of loading animations (30+ styles)
  • Better documentation and usage examples
  • Higher number of stars and forks on GitHub, indicating wider adoption

Cons of Android-SpinKit

  • Larger library size due to more animations
  • May require more setup and configuration for custom styles

Code Comparison

LoadingView:

LVCircularRing loadingView = new LVCircularRing(this, null, 0);
loadingView.setViewColor(Color.rgb(255, 0, 0));
loadingView.startAnim();

Android-SpinKit:

SpinKitView spinKitView = new SpinKitView(this);
spinKitView.setColor(Color.RED);
Sprite doubleBounce = new DoubleBounce();
spinKitView.setIndeterminateDrawable(doubleBounce);

Both libraries offer easy-to-use APIs for implementing loading animations in Android applications. LoadingView provides a more straightforward approach with fewer options, while Android-SpinKit offers greater flexibility and customization at the cost of slightly more complex implementation.

Android-SpinKit's wider variety of animations and larger community support make it a more versatile choice for developers seeking diverse loading indicators. However, LoadingView's simplicity and smaller footprint may be preferable for projects with simpler requirements or size constraints.

DEPRECATED

Pros of AVLoadingIndicatorView

  • More extensive collection of loading animations (29 types)
  • Better documentation and usage examples
  • Higher number of stars and forks on GitHub, indicating wider adoption

Cons of AVLoadingIndicatorView

  • Less customization options for individual animations
  • Larger library size due to more animation types
  • Slightly more complex implementation for basic use cases

Code Comparison

AVLoadingIndicatorView:

AVLoadingIndicatorView avi = findViewById(R.id.avi);
avi.setIndicator("BallPulseIndicator");
avi.show();

LoadingView:

LVCircularRing loadingView = findViewById(R.id.lv_circularring);
loadingView.startAnim();

Summary

AVLoadingIndicatorView offers a wider variety of loading animations and has better community support, making it suitable for projects requiring diverse loading indicators. LoadingView, while having fewer animation types, provides simpler implementation for basic use cases and potentially smaller library size. The choice between the two depends on the specific project requirements and the desired balance between variety and simplicity.

高仿新版58 加载动画

Pros of android-shapeLoadingView

  • Offers a variety of shape-based loading animations (circle, rectangle, triangle)
  • Provides smooth transitions between different shapes
  • Allows customization of colors and animation speed

Cons of android-shapeLoadingView

  • Limited to predefined shape animations
  • Less flexibility in creating custom loading animations
  • Fewer options for text integration with loading animations

Code Comparison

LoadingView:

LVCircularRing loadingView = new LVCircularRing(this, null, 0);
loadingView.setViewColor(Color.rgb(255, 0, 0));
loadingView.setRoundColor(Color.rgb(0, 255, 0));
loadingView.startAnim();

android-shapeLoadingView:

ShapeLoadingDialog shapeLoadingDialog = new ShapeLoadingDialog(this);
shapeLoadingDialog.setLoadingText("Loading...");
shapeLoadingDialog.show();

Both libraries offer easy-to-use loading animations, but LoadingView provides more customization options and a wider variety of animation styles. android-shapeLoadingView focuses on shape-based animations and offers a simpler implementation, but with fewer customization options. LoadingView is more suitable for projects requiring diverse and highly customizable loading animations, while android-shapeLoadingView is ideal for quick implementation of shape-based loading indicators.

Some beautiful android loading drawable, can be combined with any view as the LoadingView or the ProgressBar. Besides, some Drawable can customize the loading progress too.

Pros of LoadingDrawable

  • More diverse and customizable loading animations
  • Better performance optimization for smoother animations
  • Extensive documentation and usage examples

Cons of LoadingDrawable

  • Slightly more complex implementation
  • Larger library size due to more features

Code Comparison

LoadingDrawable:

LoadingDrawable loadingDrawable = new CircularJumpLoadingRenderer.Builder(this)
    .setColor(Color.WHITE)
    .setStrokeWidth(8)
    .build();
imageView.setImageDrawable(loadingDrawable);
loadingDrawable.start();

LoadingView:

LVCircularRing loadingView = new LVCircularRing(this);
loadingView.setViewColor(Color.WHITE);
loadingView.setBarWidth(8);
loadingView.startAnim();

Key Differences

  • LoadingDrawable offers more customization options and animation types
  • LoadingView has a simpler API and is easier to implement quickly
  • LoadingDrawable focuses on performance optimization for smoother animations
  • LoadingView provides a more lightweight solution with fewer dependencies

Both libraries offer Android loading animations, but LoadingDrawable provides more advanced features and customization options at the cost of slightly increased complexity. LoadingView is simpler to use and more lightweight, making it suitable for projects with basic loading animation needs.

A 2d metaball loading

Pros of MetaballLoading

  • Focuses specifically on metaball-style loading animations, providing a unique and visually appealing effect
  • Implements a more advanced rendering technique using OpenGL ES for smoother animations
  • Offers a compact and specialized solution for developers seeking metaball animations

Cons of MetaballLoading

  • Limited to metaball-style animations, less versatile compared to LoadingView's variety of loading styles
  • May have a steeper learning curve due to its use of OpenGL ES for rendering
  • Less actively maintained, with fewer recent updates compared to LoadingView

Code Comparison

LoadingView:

mPaint = new Paint();
mPaint.setAntiAlias(true);
mPaint.setStyle(Paint.Style.FILL);
mPaint.setColor(Color.WHITE);

MetaballLoading:

private void initShaders() {
    mProgram = ShaderUtils.createProgram(getResources(), R.raw.vertex_shader, R.raw.fragment_shader);
    mPositionHandle = GLES20.glGetAttribLocation(mProgram, "vPosition");
    mColorHandle = GLES20.glGetUniformLocation(mProgram, "vColor");
}

The code snippets highlight the different approaches: LoadingView uses standard Android Canvas drawing, while MetaballLoading employs OpenGL ES shaders for more complex rendering.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

LoadingView

a simple loadingview for android with animation

简单的带有动画效果的加载控件

#Preview screen screen2 #Gradle compile 'com.ldoublem.loadingview:loadingviewlib:1.0'

IdPictureNameMethod
11LVCircularCDsetViewColor(int color)
startAnim(int time)
stopAnim()
22LVCircularRingsetViewColor(int color)
setBarColor(int color)
startAnim(int time)
stopAnim()
33LVCircularsetViewColor(int color)
setRoundColor(int color)
startAnim(int time)
stopAnim()
44LVFinePoiStarsetViewColor(int color)
setCircleColor(int color)
startAnim(int time)
stopAnim()
setDrawPath(boolean isDrawPath)
55LVCircularSmilesetViewColor(int color)
startAnim(int time)
stopAnim()
66LVGearssetViewColor(int color)
startAnim(int time)
stopAnim()
77LVGearsTwosetViewColor(int color)
startAnim(int time)
stopAnim()
88LVWifisetViewColor(int color)
startAnim(int time)
stopAnim()
99LVCircularJumpsetViewColor(int color)
startAnim(int time)
stopAnim()
1010LVCircularZoomsetViewColor(int color)
startAnim(int time)
stopAnim()
1111LVPlayBallsetViewColor(int color)
setBallColor(int color)
startAnim(int time)
stopAnim()
1212LVNewssetViewColor(int color)
startAnim(int time)
stopAnim()
1313LVLineWithTextsetViewColor(int color)
setTextColor(int color)
setValue(int value)//0-100
1414LVEatBeanssetViewColor(int color)
setEyeColor(int color)
startAnim(int time)
stopAnim()
1515LVChromeLogostartAnim(int time)
stopAnim()
1616LVRingProgresssetViewColor(int color)
setTextColor(int color)
setPorBarStartColor(int color)
setPorBarEndColor(int color)
startAnim(int time)
stopAnim()
1717LVBlocksetViewColor(int color)
isShadow(boolean boolean show)
setShadowColor(int color)
startAnim(int time)
stopAnim()
1818LVFunnyBarsetViewColor(int color)
startAnim(int time)
stopAnim()
1919LVGhostsetViewColor(int color)
setHandColor(int color)
startAnim(int time)
stopAnim()
2020LVBlazeWoodstartAnim(int time)
stopAnim()
2121LVBatterysetViewColor(int color)
setCellColor(int color)
setShowNum(boolean show)
setValue(int value)//0-100
startAnim(int time)
stopAnim()
2222LVSunSetViewsetSunendTime(String endtime)
setSunstartTime(String starttime)
startSunset()

About me

An android developer in Hangzhou.

If you want to make friends with me, You can email to me. my email :smiley:

License

The MIT License (MIT)

Copyright (c) 2016 ldoublem

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.