Convert Figma logo to code with AI

race604 logoWaveLoading

A wave-like loading drawable

1,447
173
1,447
9

Top Related Projects

This is a UI lib for Android. Effects like shining.

DEPRECATED

Android loading animations

a simple loadingview for android with animation

1,228

Android loading view

Quick Overview

WaveLoading is an Android library that provides a custom view for displaying a wave-like loading animation. It offers a visually appealing and customizable way to show progress or loading states in Android applications.

Pros

  • Smooth and attractive wave animation
  • Highly customizable with various attributes
  • Easy to integrate into existing Android projects
  • Supports both determinate and indeterminate loading states

Cons

  • Limited to circular shape only
  • May not be suitable for all app designs or themes
  • Requires additional setup compared to standard Android progress indicators
  • Not actively maintained (last update was in 2017)

Code Examples

  1. Basic usage in XML layout:
<com.race604.waveloading.WaveLoadingView
    android:id="@+id/waveLoadingView"
    android:layout_width="200dp"
    android:layout_height="200dp"
    app:wlv_borderColor="@color/colorAccent"
    app:wlv_borderWidth="3dp"
    app:wlv_progressValue="40"
    app:wlv_shapeType="circle"
    app:wlv_titleCenter="Center"
    app:wlv_titleCenterColor="@android:color/white"
    app:wlv_titleCenterSize="24sp"
    app:wlv_waveAmplitude="70"
    app:wlv_waveColor="@color/colorAccent" />
  1. Programmatically setting progress:
WaveLoadingView waveLoadingView = findViewById(R.id.waveLoadingView);
waveLoadingView.setProgressValue(75);
  1. Customizing wave properties:
waveLoadingView.setBorderWidth(10);
waveLoadingView.setAmplitudeRatio(60);
waveLoadingView.setWaveColor(Color.BLUE);
waveLoadingView.setTopTitle("Loading...");
waveLoadingView.setCenterTitleColor(Color.WHITE);

Getting Started

  1. Add the JitPack repository to your project's build.gradle:
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  1. Add the dependency to your app's build.gradle:
dependencies {
    implementation 'com.github.race604:WaveLoading:1.1.0'
}
  1. Use the WaveLoadingView in your XML layout or create it programmatically:
<com.race604.waveloading.WaveLoadingView
    android:id="@+id/waveLoadingView"
    android:layout_width="200dp"
    android:layout_height="200dp"
    app:wlv_progressValue="40"
    app:wlv_waveColor="@color/colorAccent" />
  1. Customize and control the view in your Activity or Fragment:
WaveLoadingView waveLoadingView = findViewById(R.id.waveLoadingView);
waveLoadingView.setProgressValue(75);
waveLoadingView.setTopTitle("Loading...");

Competitor Comparisons

This is a UI lib for Android. Effects like shining.

Pros of ShineButton

  • More versatile animation options, including shine effects and custom shapes
  • Higher star count and more recent updates, indicating active maintenance
  • Supports both Java and Kotlin for Android development

Cons of ShineButton

  • More complex implementation due to additional features
  • Larger library size, potentially impacting app performance
  • Steeper learning curve for developers new to custom animations

Code Comparison

WaveLoading:

WaveLoadingView mWaveLoadingView = (WaveLoadingView) findViewById(R.id.waveLoadingView);
mWaveLoadingView.setProgressValue(80);
mWaveLoadingView.setCenterTitle("Center Title");

ShineButton:

ShineButton shineButton = (ShineButton) findViewById(R.id.shine_button);
shineButton.init(activity);
shineButton.setChecked(true);
shineButton.setShineSize(0.5f);
shineButton.setShapeResource(R.raw.heart);

Summary

While WaveLoading focuses on a specific wave-like loading animation, ShineButton offers a broader range of customizable button animations. ShineButton provides more flexibility and options for developers but may require more effort to implement and optimize. WaveLoading, on the other hand, is simpler to use but limited in its animation capabilities. The choice between the two depends on the specific requirements of the project and the desired level of customization.

DEPRECATED

Pros of AVLoadingIndicatorView

  • Offers a wide variety of loading indicator styles (26 different types)
  • Supports both determinate and indeterminate progress indicators
  • Easy to customize colors and sizes of indicators

Cons of AVLoadingIndicatorView

  • More complex implementation due to the variety of options
  • Larger library size compared to WaveLoading
  • May require more system resources for some animations

Code Comparison

WaveLoading:

WaveLoadingView mWaveLoadingView = (WaveLoadingView) findViewById(R.id.waveLoadingView);
mWaveLoadingView.setProgressValue(80);
mWaveLoadingView.setBorderWidth(10);
mWaveLoadingView.setAmplitudeRatio(60);
mWaveLoadingView.setWaveColor(Color.BLUE);

AVLoadingIndicatorView:

AVLoadingIndicatorView avi = (AVLoadingIndicatorView) findViewById(R.id.avi);
avi.setIndicator("BallPulseIndicator");
avi.setIndicatorColor(Color.BLUE);
avi.show();
avi.hide();

Both libraries provide easy-to-use loading indicators for Android applications. WaveLoading focuses on a single, customizable wave-style loading animation, while AVLoadingIndicatorView offers a broader range of indicator styles. The choice between the two depends on the specific design requirements and the desired variety of loading animations in the application.

Android loading animations

Pros of Android-SpinKit

  • Offers a wider variety of loading animations (8 different styles)
  • Provides more customization options for each animation style
  • Has a higher number of stars and forks on GitHub, indicating greater popularity

Cons of Android-SpinKit

  • Requires more complex implementation due to multiple animation styles
  • May have a slightly higher performance impact due to more intricate animations

Code Comparison

WaveLoading:

<com.race604.waveloading.WaveLoadingView
    android:id="@+id/waveLoadingView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:wlv_borderColor="@color/colorAccent"
    app:wlv_borderWidth="3dp"
    app:wlv_progressValue="40"
    app:wlv_shapeType="circle"
    app:wlv_titleCenter="Center"
    app:wlv_titleCenterColor="@color/colorAccent"
    app:wlv_titleCenterSize="24sp"
    app:wlv_waveAmplitude="70"
    app:wlv_waveColor="@color/colorAccent" />

Android-SpinKit:

<com.github.ybq.android.spinkit.SpinKitView
    android:id="@+id/spin_kit"
    style="@style/SpinKitView.Large.Circle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    app:SpinKit_Color="@color/colorAccent" />

Both libraries offer easy-to-use loading animations, but Android-SpinKit provides more variety and customization options. WaveLoading focuses on a specific wave-like animation, which may be preferable for certain design requirements. The choice between the two depends on the desired visual style and the level of customization needed for the project.

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, sizes, and shapes
  • Includes additional features like progress indicators and text display

Cons of LoadingView

  • May have a steeper learning curve due to more complex API
  • Potentially higher resource usage with more elaborate animations
  • Less focused on the specific wave loading effect

Code Comparison

WaveLoading:

WaveLoadingView mWaveLoadingView = (WaveLoadingView) findViewById(R.id.waveLoadingView);
mWaveLoadingView.setProgressValue(80);
mWaveLoadingView.setBorderWidth(10);
mWaveLoadingView.setAmplitudeRatio(60);
mWaveLoadingView.setWaveColor(Color.BLUE);

LoadingView:

LVCircularRing mLVCircularRing = (LVCircularRing) findViewById(R.id.lv_circularring);
mLVCircularRing.setViewColor(Color.rgb(255, 0, 0));
mLVCircularRing.setBarWidth(5);
mLVCircularRing.startAnim();
mLVCircularRing.setTextSize(45);

Both repositories provide Android loading animations, but LoadingView offers a broader range of options and customizations. WaveLoading focuses specifically on wave-style loading animations, making it potentially easier to use for that particular effect. The code examples demonstrate the different approaches, with WaveLoading being more focused on wave properties and LoadingView offering more general customization options.

1,228

Android loading view

Pros of Loading

  • Offers a wider variety of loading animations, including circular and linear progress indicators
  • Provides more customization options for colors, sizes, and styles
  • Includes support for both determinate and indeterminate loading states

Cons of Loading

  • May have a steeper learning curve due to more complex API and configuration options
  • Potentially larger library size due to the inclusion of multiple animation types

Code Comparison

WaveLoading:

WaveLoadingView mWaveLoadingView = (WaveLoadingView) findViewById(R.id.waveLoadingView);
mWaveLoadingView.setProgressValue(80);
mWaveLoadingView.setCenterTitle("Center Title");

Loading:

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

Both libraries provide easy-to-use APIs for implementing loading animations in Android applications. WaveLoading focuses specifically on a wave-like loading animation, while Loading offers a broader range of animation styles. The code snippets demonstrate that both libraries allow for simple initialization and customization of their respective loading views.

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

#WaveLoading

This library provides a wave loading animation as a Drawable.

screenshot

How to use

Add dependency:

compile 'com.race604.waveloading:library:1.1.1'

Use in your project with only one line:

Drawable mWaveDrawable = new WaveDrawable(otherDrawable);

// Use as common drawable
imageView.setImageDrawable(mWaveDrawable);

Other configurable APIs:

  • public void setWaveAmplitude(int amplitude), set wave amplitude (in pixels)
  • public void setWaveLength(int length), set wave length (in pixels)
  • public void setWaveSpeed(int step), set wave move speed (in pixels)
  • public void setIndeterminate(boolean indeterminate), like progress bar, if run in indeterminate mode, it'll increase water level over and over again, otherwise, you can use boolean setLevel(int level) to set the water level, acting as loading progress.
  • public void setIndeterminateAnimator(ValueAnimator animator), set you customised animator for wave loading animation in indeterminate mode.

License

MIT