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.
📱Android Library to implement animated, 😍beautiful, 🎨stylish Material Dialog in android apps easily.

Material Dialogs for Android ?? ?? Android Library to implement animated, ?? beautiful, ?? stylish Material Dialog in android apps easily. 1. Material

Shreyas Patil 875 Dec 28, 2022
Android widget for selecting a range of values.

MaterialRangeBar MaterialRangeBar is a fork from https://github.com/edmodo/range-bar that adds some basic material styling, as well as start and end v

null 1.7k Dec 30, 2022
Material style circular progress bar for Android

Material CircularProgressView Indeterminate Determinate Description This CircularProgressView is a (surprisingly) circular progress bar Android View t

Rahat Ahmed 760 Nov 30, 2022
:hourglass_flowing_sand: An android progress view developed after taking inspiration from Uber app.

A simple progress animation developed after taking inspiration from the Uber app. Demo Download Add this to your root build.gradle file allprojects {

Ishan Khanna 286 Dec 23, 2022
:hourglass_flowing_sand: An android progress view developed after taking inspiration from Uber app.

A simple progress animation developed after taking inspiration from the Uber app. Demo Download Add this to your root build.gradle file allprojects {

Ishan Khanna 286 Dec 23, 2022
A Gmail-like Material Drawer implementation

AdvancedMaterialDrawer A Gmail-like Material Drawer implementation Based on neokree's MaterialDrawer library, but they are not the same. I have made m

Marc Schäfers 200 Oct 27, 2022
Default colors and dimens per Material Design guidelines and Android Design guidelines inside one library.

Material Design Dimens Default colors and dimens per Material Design guidelines and Android Design guidelines inside one library. Dimens Pattern: R.di

Dmitry Malkovich 1.4k Jan 3, 2023
This is a library with components of Android L to you use in android 2.2

Material Design Android Library How to use Components Buttons Flat Button Rectangle Button Float Button Float small button Switches CheckBox Switch Pr

Ivan Navas 9.1k Jan 5, 2023
Material Shadows for android : A library for supporting convex material shadows

MaterialShadows A library for seamlessly integrating Material shadows. The library takes existing material shadows to next level by adding the followi

Harjot Singh Oberai 2.2k Dec 19, 2022
A library to bring fully animated Material Design components to pre-Lolipop Android.

Material MaterialLibrary is an Open Source Android library that back-port Material Design components to pre-Lolipop Android. MaterialLibrary's origina

Rey Pham 6k Dec 21, 2022
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.

MaterialDrawer ... the flexible, easy to use, all in one drawer library for your Android project. What's included ?? • Setup ??️ • Migration Guide ??

Mike Penz 11.6k Dec 27, 2022
An Android library aimed to get the beautiful CardViews that Google shows at its official design specifications

MaterialList Discontinued This library will not receive any updates, as I do not have the time or knowledge to improve it. If anyone forks it and want

null 1.6k Nov 29, 2022
[] Android Library that implements Snackbars from Google's Material Design documentation.

DEPRECATED This lib is deprecated in favor of Google's Design Support Library which includes a Snackbar and is no longer being developed. Thanks for a

null 1.5k Dec 16, 2022
A library support form with material design, construct same with Android UI Framework

SwingUI A slight Java Swing library support form with material design, construct same with Android UI Framework writen in Kotlin Supported: 1. Screen:

Cuong V. Nguyen 3 Jul 20, 2021
ToggleIconView is a collection library of animated two-stage toggle icons for Android.

ToggleIconView ToggleIconView is a collection library of animated two-stage toggle icons for Android. Installation JitPack repository // Project level

Özgür Görgülü 6 Sep 10, 2022
Library containing over 2000 material vector icons that can be easily used as Drawable or as a standalone View.

Material Icon Library A library containing over 2000 material vector icons that can be easily used as Drawable, a standalone View or inside menu resou

null 2.3k Dec 16, 2022
A Material Design ViewPager easy to use library

MaterialViewPager Material Design ViewPager easy to use library Sample And have a look on a sample Youtube Video : Youtube Link Download In your modul

Florent CHAMPIGNY 8.2k Jan 1, 2023
MaterialPickers-in-android - A simple android project that shows how to create material pickers for date and time

MaterialPickers-in-android A simple android project that shows how to create mat

Segun Francis 2 Apr 28, 2022
😍 A beautiful, fluid, and extensible dialogs API for Kotlin & Android.

Material Dialogs View Releases and Changelogs Modules The core module is the fundamental module that you need in order to use this library. The others

Aidan Follestad 19.5k Dec 31, 2022