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.

Overview

LoadingDrawable: Android cool animation collection

前言    CircleRotate源码解析    Fish源码解析
Android Arsenal

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.

The following content show a brief overview of LoadingDrawable

  • It extends Drawable and implement the interface Animatable
  • it uses strategy mode
  • It can be used as the background of View or content of ImageView
  • It's constructor must be passed a LoadingRenderer
  • It interact with LoadingRenderer by the callback Callback
  • LoadingRenderer is used for measuring and drawing the LoadingDrawable. note: LoadingRenderer is the core
  • LoadingRenderer only can be created by their Builder.

Learn more about LoadingDrawable on the Wiki Home.

LoadingRenderer Style

ShapeChange

  • CircleBroodLoadingRenderer
  • CoolWaitLoadingRenderer

Goods

  • BalloonLoadingRenderer
  • WaterBottleLoadingRenderer

Animal

  • FishLoadingRenderer
  • GhostsEyeLoadingEyeRenderer

Scenery

  • ElectricFanLoadingRenderer
  • DayNightLoadingRenderer

Circle Jump

  • CollisionLoadingRenderer
  • SwapLoadingRenderer
  • GuardLoadingRenderer
  • DanceLoadingRenderer

Circle Rotate

  • WhorlLoadingRenderer
  • MaterialLoadingRenderer
  • GearLoadingRenderer
  • LevelLoadingRenderer

Usage

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());

TODO

When I feel less bugs enough, I will add a gradle dependency. So I hope you will make more Suggestions or Issues.

Misc

If you like LoadingDrawable or use it, could you please:

  • star this repo
  • send me some feedback. Thanks!

QQ Group: 342748245

License

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.
Comments
  • NullPointerException

    NullPointerException

    java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference

    在调用BalloonLoadingRenderer 的时候直接会空指针,而且还有我在Recycleview 配合Glide PlaceHolder调用的时候 只能显示静止的 不会动。

    opened by rogerou 6
  • Can I add this view to my activity programatically?

    Can I add this view to my activity programatically?

    public void showLoadingDialog(String message) {
        dismissDialog();
    
        if (mProgressDialog == null) {
            mProgressDialog = new ProgressDialog(this);
            mProgressDialog.setIndeterminate(true);
            mProgressDialog.setTitle("");
        }
    
        mProgressDialog.setMessage(message);
        mProgressDialog.show();
    }
    

    Like standard android ProgressDialog as above code. Thanks.

    opened by wonsuc 3
  •  analysis the Fish Animator

    analysis the Fish Animator

    opened by xsfelvis 2
  • view呈现问题,请教

    view呈现问题,请教

    当我打开一个Activity时,我想要先显示loading动画,后台线程执行网络请求逻辑 当请求结束时,loading动画消失,显示正常的layout. 请问如何实现这样的效果?

    目前我的方案是使用自定义ProgressDialog, 或许还可以通过FrameLayout嵌套progressBar和其他view,通过visibility属性来控制. 是否存在更好的解决方案? 新手问题,见笑了.

    opened by jesse920524 1
  • startActivity 跳转疑问

    startActivity 跳转疑问

    跳转Activity的跳转方式,是这样的。

    AnimalActivity.startActivity(this);

    public class AnimalActivity extends AppCompatActivity {
        public static void startActivity(Context context) {
            Intent intent = new Intent(context, AnimalActivity.class);
            context.startActivity(intent);
        }
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
           ......
        }
    }
    

    这种跳转方式跟普通的直接跳转有什么区别吗?

     Intent intent = new Intent(this, AnimalActivity.class);
     this.startActivity(intent);
    
    opened by Wing-Li 1
  • 无法适配RecyclerView

    无法适配RecyclerView

    LoadingDrawable + Fresco + RecyclerView 场景:RecyclerView 加载两列,每个Item使用Fresco自带的View; setProgressImage(LoadingDrawable);
    目标:使用LoadingDrawable,实现Fresco加载过程的动画,即:LoadingDrawable一直播放,指导Fresco加载完成,加载完图片

    问题:LoadingDrawable变形了。 分析可能原因:Fresco因为RecyclerView导致,给定LoadingDrawable的高度和宽度,比例变成了,2:1;导致LoadingDrawable变形了

    opened by yline 1
Owner
dinus_developer
blank
dinus_developer
Android fillable progress view working with SVG paths. This is a nice option too if you want to create an interesting branding logo for your app. Based on the iOS project: https://github.com/poolqf/FillableLoaders

Android FillableLoaders Android Open Source library providing an interesting fillable progress view working with SVG paths. This is a nice option too

Jorge Castillo 2k Jan 1, 2023
Android loading or progress dialog widget library, provide efficient way to implement iOS like loading dialog and progress wheel

ACProgressLite English Version / 中文版本 An Android loading widget library. Lite and easy to use, strong customizability. Can be used to implement 'iOS'

Cloudist Technology Co., Ltd. 234 Nov 24, 2022
a simple loadingview for android with animation

LoadingView a simple loadingview for android with animation 简单的带有动画效果的加载控件 #Preview #Gradle compile 'com.ldoublem.loadingview:loadingviewlib:1.0' Id P

ldoublem 2.7k Jan 2, 2023
A Gorgeous LoadingView (一个绚丽的LoadingView )

GADownloading 中文文档 1 Creative prototype: The effect is shown below: Through the code to achieve the effect is as follows: State of success: State of f

GAStudio 933 Nov 21, 2022
A beautiful, slim Android ProgressBar.

Android NumberProgressBar The NumberProgressBar is a bar, slim and sexy (every man wants! ). I decided to do this because I was really tired of androi

代码家 6k Jan 7, 2023
MaterialLoadingProgressBar provide a styled ProgressBar which looks like SwipeRefreshLayout's loading indicator(support-v4 v21+)

MaterialLoadingProgressBar MaterialLoadingProgressBar provide a styled ProgressBar which looks like SwipeRefreshLayout's loading indicator(support-v4

lsjwzh 1.1k Nov 19, 2022
Loading layout is a container view that manages easy switching between loading, completed and other states of your screen with a single line.

Loading layout is a container view that manages easy switching between loading, completed and other states of your screen with a single line.

ValarTech 16 Jul 5, 2022
A wave-like loading drawable

#WaveLoading This library provides a wave loading animation as a Drawable. How to use Add dependency: compile 'com.race604.waveloading:library:1.1.1'

吴晶 1.4k Dec 5, 2022
This is beautiful color arc progress bar.

ColorArcProgressBar 中文版 This is a customizable circular progressbar.It can achieve the effect of the QQ health's arc progress with XML. What's more, w

PASSION 928 Dec 6, 2022
Beautiful progress bar with segments. Highly customizable. Fully written with Jetpack Compose

?? SegmentedProgressBar ?? Beautiful progress bar split into several segments. Highly customizable. Fully written with Jetpack Compose. Why this libra

Stephen Vinouze 90 Dec 15, 2022
An Android percentage chart that displays the progress of any single given task or information.

Percentage Chart View A Java-based easy to use and highly adjustable custom view that displays the progress of a single given task. Please feel free t

Rami Jemli 364 Dec 20, 2022
Material progress circle around any FloatingActionButton. 100% Guidelines.

FABProgressCircle Android library to provide a material progress circle around your FloatingActionButton. This component is compatible with any existe

Jorge Castillo 1.2k Nov 28, 2022
A progress wheel for android, intended for use instead of the standard progress bar.

Deprecation warning This project is no-longer maintained, and has not been maintained for a few years now. If you're looking for an alternative librar

Todd Davies 2.7k Dec 29, 2022
:barber: [Android Library] Stacked dual progress indicator progress-bar

StackedHorizontalProgressBar Specs Featured in Show some ❤️ Android library with ability to show two progress indicators in one horizontal progress ba

Nishant Srivastava 98 Nov 11, 2022
IOSProgressBar is a progress-bar lib for android. And the progress-bar looks like iOS system style

IOSProgressBar is a progress-bar lib for android. And the progress-bar looks like iOS system style

heyangyang 6 Aug 25, 2022
Now deprecated. A small Android library allowing you to have a smooth and customizable horizontal indeterminate ProgressBar

Description Small library allowing you to make a smooth indeterminate progress bar. You can either user your progress bars and set this drawable or us

Antoine Merle 4.4k Dec 30, 2022
An android library to display a progressbar that goes around an image.

android-square-progressbar First things first This library is setup to work with the Android Studio and Gradle. If you're using the Eclipse environmen

Yannick Signer 1.3k Nov 15, 2022
Android ProgressBar that "bends" under its own weight. Inspired by http://drbl.in/nwih

RopeProgressBar Android ProgressBar that "bends" under its own weight. Attributes Attribute Type Default Usage app:ropeMax integer 0 The max value of

Christian De Angelis 206 Dec 18, 2022
Android library to realize the various states and transitions in a ProgressBar.

StateProgressBar StateProgressBar is an Android library to realize the various states and transitions in a ProgressBar. Quick Start Get a feel of how

Kofi Gyan 1.5k Jan 9, 2023