Android loading or progress dialog widget library, provide efficient way to implement iOS like loading dialog and progress wheel

Overview

ACProgressLite

Build Status
English Version / 中文版本

An Android loading widget library. Lite and easy to use, strong customizability. Can be used to implement 'iOS' like loading dialog efficiently.

Similar to iOS MBProgressHUD

Keywords Progressbar, Progresswheel, HUD, Android, Loading

Minimum SDK Version: API 9 ( Android 2.3 )

Flower without text Flower with text Pie Custom

Sample APK download

Current Version

  • 1.2.1

Usage

  • gradle: compile 'cc.cloudist.acplibrary:library:1.2.1'

Sample Code

  • Flower
ACProgressFlower dialog = new ACProgressFlower.Builder(this)
                        .direction(ACProgressConstant.DIRECT_CLOCKWISE)
                        .themeColor(Color.WHITE)
                        .text("Title is here")
                        .fadeColor(Color.DKGRAY).build();
dialog.show();
  • Pie
ACProgressPie dialog = new ACProgressPie.Builder(this)
                     .ringColor(Color.WHITE)
                     .pieColor(Color.WHITE)
                     .updateType(ACProgressConstant.PIE_AUTO_UPDATE)
                     .build();
dialog.show();
  • Custom
ACProgressCustom dialog = new ACProgressCustom.Builder(this)
                        .useImages(R.drawable.p0, R.drawable.p1, R.drawable.p2, R.drawable.p3)
                        .build();
dialog.show();

Configuration

 3 types of dialog are avaliable now:

 Here are some general configurations:

  1. sizeRatio size of the background. The value is float and less than 1f. It means the ratio of "real size / the smaller edge length of the screen". aka:
    background length = the smaller edge length of the screen * sizeRatio

Pay attention to the situation of "Flower type with text", it will be explained int next scetion.

  1. bgColor Color of background, int value.
  2. bgAlpha Transparency of background. 0 is full transparency, 1 is opaque. All alpha configurations are similar.
  3. bgCornerRadius Radius of four corners of the background.

bgColor, bgAlpha, bgCornerRadius are not available for custom type

  • Flower
    Most commonly used type. Support adding text title.
Configuration Description
themeColor Start color of petals.
borderPadding Distance between outer edge of petals and edge of background / length of the edge of background. (length of the edge of background is based on sizeRatio)
centerPadding Distance between inner edge of petals and center of background / length of the edge of background. (length of the edge of background is based on sizeRatio)
fadeColor End color of petals.
petalCount Number of petals.
petalAlpha Transparency of petals.
petalThickness Thickness of petals.
direction Direction of petals' rotation, ACProgressConstant.DIRECT_CLOCKWISE or DIRECT_ANTI_CLOCKWISE.
speed Speed of petals' rotation, frames count in each second.
text Text, shown under petals.
textSize Text's size.
textColor Text's color.
textAlpha Text's transparency.
textMarginTop Distance between text and petals.
isTextExpandWidth Whether expand the background width to equal the height when a text title is set. If you set a text title, the background's height will become longer because of making room for text. If this value is true, the petals are still drawn by sizeRatio, but petals will be horizontally centered as the background's width is expanded to equal the height; if this value is false, the background will be rectangle with different width and height.
  • Pie
    Suitable for display progress. Manual-update and auto-update are supported.
Configuration Description
ringColor Color of ring.
ringAlpha Transparency of ring.
ringThickness Thickness of ring.
ringBorderPadding Distance between ring and edge of background / length of the edge of background.
pieColor Color of pie.
pieAlpha Transparency of pie.
pieRingDistance Distance between ring and pie / length of the edge of background.
updateType Update type. PIE_AUTO_UPDATE or PIE_MANUAL_UPDATE. Manually update with method setPiePercentage().
speed frames count in each second with auto-update type.
pieces pieces of pie with auto-update type.
  • Custom
    like GIF, support res/drawable resources ids array or image files array as data source.
Configuration Description
useImages resources ids array.
useFiles image files array.
speed frames count in each second.

Notice

  • Try to clean the project first when you come across any problem.
  • use setCanceledOnTouchOutside(true) in version 1.2.0+ when you want to dismiss the dialog when touch outside.
  • Most of the methods in Dialog are supported.
  • We strongly suggest you to use version above 1.2.0
  • If you use version before 1.1.0 (without 1.1.0),and gradle error occured, you can add tools:ignore="label under tag application in Manifest to solve it.
  • Don not try to use useImages and useFiles at the same time, or only the last calling is avaliable.
  • Default configuration can perform well under most situations. If you really want to do customization, please tweak carefully to get best visual performance.
  • I'm not a native English speaker, there may be some grammar mistakes in this file. Suggestions and corrections are welcome.

License

Comments
  • How to dismiss progress flower dialog programmatically?

    How to dismiss progress flower dialog programmatically?

    I am using this view on http communication in my activity.

    progressFlower = new ACProgressFlower.Builder(getActivity()) .direction(ACProgressConstant.DIRECT_CLOCKWISE) .themeColor(Color.WHITE) .text("Please wait...") .fadeColor(Color.DKGRAY).build(); progressFlower.show();

    After get response from server, then run progressFlower.dismiss(), App crashed.

    From my debugging, progressFlower is null.

    How to dismiss progress flower dialog programmatically?

    Best regards.

    opened by johndev8964 3
  • Crashlytics: ACProgressFlower.java line 54 cc.cloudist.acplibrary.ACProgressFlower$2.run

    Crashlytics: ACProgressFlower.java line 54 cc.cloudist.acplibrary.ACProgressFlower$2.run

    I faced too many crashes on this line. Can anyone help?

    Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void l1.b(int)' on a null object reference
           at cc.cloudist.acplibrary.ACProgressFlower$2.run(ACProgressFlower.java:54)
           at java.util.TimerThread.mainLoop(TimerThread.java:562)
           at java.util.TimerThread.run(TimerThread.java:512)
    

    Devices

    • Galaxy A8(2018)
    • Redmi Note 7 Pro
    • Galaxy S7
    • Galaxy S9
    • OnePlus HD1901
    • Galaxy S8
    • Pixel 2 XL
    • HUAWEI P8 lite 2017
    • ONEPLUS A3003

    at 0% background.

    opened by b9145 0
  • 空指针严重啊

    空指针严重啊

    Timer-8(193)

    java.lang.NullPointerException Attempt to invoke virtual method 'void cc.cloudist.acplibrary.views.FlowerView.updateFocusIndex(int)' on a null object reference

    opened by bikeming 0
  • 有一定的几率会有空指针的情况。

    有一定的几率会有空指针的情况。

    日志如下:Attempt to invoke virtual method 'void cc.cloudist.acplibrary.views.FlowerView.a(int)' on a null object reference

    cc.cloudist.acplibrary.ACProgressFlower$2.run(SourceFile:54)

    opened by VliceZ 0
  • 解决Nexus手机出现空指针的问题

    解决Nexus手机出现空指针的问题

    cc.cloudist.acplibrary.ACProgressFlower$2.run(ACProgressFlower.java:54) java.util.Timer$TimerImpl.run(Timer.java:284) 当调用dismiss之后,会把mFlowerView置空,但是置空之前scheduleAtFixedRate已经发出了一个TimerTask正在执行,这个时候就会使用mFlowerView,出现空指针异常

    opened by chenzhenlindx 1
  • Always leaking the window ? how to fix it properly

    Always leaking the window ? how to fix it properly

    Always leaking the window when i reuse the activity.

    ' E/WindowManager: android.view.WindowLeaked: Activity com.competetor.app.activities.Test has leaked window DecorView@e439a77[] that was originally added here at android.view.ViewRootImpl.(ViewRootImpl.java:424) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:331) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93) at android.app.Dialog.show(Dialog.java:316) at cc.cloudist.acplibrary.ACProgressFlower.show(ACProgressFlower.java:45) at com.competetor.app.activities.PhoneLogin$1.onClick(PhoneLogin.java:122) at android.view.View.performClick(View.java:5612) at android.view.View$PerformClick.run(View.java:22285) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6123) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757) '

    opened by rasheedk 0
Releases(1.2.1)
Owner
Cloudist Technology Co., Ltd.
Cloudist Technology Co., Ltd.
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
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
A material style progress wheel compatible with 2.3

![](https://img.shields.io/badge/Methods and size-106 | 12 KB-e91e63.svg) Material-ish Progress A material style progress wheel compatible with 2.3 Tr

Nico Hormazábal 2.5k Dec 28, 2022
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.

LoadingDrawable: Android cool animation collection 前言 CircleRotate源码解析 Fish源码解析 LoadingDrawable is some android animations implement of drawable: a li

dinus_developer 4.1k Dec 27, 2022
An implement of ProgressHUD for Android, similar to MBProgressHUD, SVProgressHUD for iOS.

KProgressHUD A progress HUD implementation for Android. Inspired by MBProgressHUD for iOS. Compatibility Android 2.3 and later Adding KProgressHUD to

Kaopiz Software Co., Ltd. 1.6k Dec 27, 2022
ColoringLoading 4.7 0.0 Java This project provide Coloring Loading View for Android. And this project is not using the image file!

ColoringLoading ![Release](https://img.shields.io/github/release/recruit-lifestyle/ColoringLoading.svg?label=maven version) This project provide Color

Recruit Lifestyle Co. Ltd. 379 Jul 25, 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 highly configurable library to do loading progress with animated balls

Loading Balls A highly configurable library to do loading progress with animated balls for Android How to use Custom attributes lib:path="triangle" Th

Adrián Lomas 930 Dec 7, 2022
DownloadProgressBar is an android library that delivers awesome custom progress bar. You can manipulate it's state in every way.

Download Progress Bar Android progress bar with cool animation, inspired by : https://dribbble.com/shots/2012292-Download-Animation ###Attributes Attr

Mariusz Brona 978 Nov 10, 2022
Progress Button is a android library for hanling different types state like active, finished, enabled, disabled and reset with a single line of code.

Progress Button is a android library for hanling different types state like active, finished, enabled, disabled and reset with a single line of code.

Sagar Khurana 38 Nov 15, 2022
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
: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
:seedling: A custom loading view for android, just like alipay.

#SmileyLoadingView A custom loading view, just like alipay. Usage Edit your layout XML: <cn.refactor.smileyloadingview.lib.SmileyLoadingView

null 411 Apr 24, 2022
Android library to display progress like google does in some of his services.

GoogleProgressBar This library is not maintained anymore and there will be no further releases Android library to display different kind of google rel

JPARDOGO 1.3k Dec 27, 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
Create & Show progress, data or error views, the easy way!

State Views for Android (BETA version) Create & Show progress, data or error views, the easy way! StateViews is based on ViewSwitcher mechanism and al

Mehdi Sakout 376 Dec 21, 2022
A simple lib to create a ring-like progress view with corner edges

ProgressRingView Installation Gradle: dependencies { compile 'com.github.flepsik:progress-ring-view:1.2.1' } Maven: <dependency> <groupId>com.g

null 71 Dec 5, 2021
MusicBar 2.1 0.0 Java view visualize progress bar for sound file like sound cloud

MusicBar Setup dependencies { implementation 'com.oze.music:MusicBar:1.0.5' } Usage Function Description setAnimationChangeListener(OnMusicBarAn

emad 74 Aug 26, 2022
Simple Progress View that you can compare things, like statistics of a Football match

Simple Progress View that you can compare things, like statistics of a Football match

Kostas Antoniou 29 Jun 8, 2022