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

Overview

Android Weekly Android Arsenal

MaterialLoadingProgressBar

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

ProgressBar

Usage

how to import?

add this into gradle

compile('com.lsjwzh:materialloadingprogressbar:0.5.8-RELEASE')

xml:

<com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar
        android:id="@+id/progressBar"
        android:layout_width="60dp"
        android:layout_height="60dp"/>

options:

<com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar
        android:id="@+id/progressBar"

        app:mlpb_show_arrow="true"
        app:mlpb_arrow_height="5dp"
        app:mlpb_arrow_width="10dp"
        app:mlpb_enable_circle_background="true"

        app:mlpb_progress_stoke_width="5dp"
        app:mlpb_progress_text_visibility="visible"
        android:layout_width="60dp"
        android:layout_height="60dp"/>

java api:

show arrow

'CircleProgressBar' will not show arrow by default. You can enable arrow drawing like this:

    circleProgressBar.setShowArrow(true);

Disable circle background

There is a white circle background on drawing 'CircleProgressBar' by default. If you need hide the circle background,you can add a xml item

    app:mlpb_enable_circle_background="false"

or set it by java code

   circleProgressBar.setCircleBackgroundEnabled(false);

release notes:

0.5.7:  fix bugs
0.5.6:  fix bugs
0.5.5:  fix bug: android:visibility XML attribute does not work #6

0.5.4:  fix bug: attr progress_color invalid;Restarting Progress bar does not animate #5

0.5.3: 	add default ring color;fix bug:NPE happens when ring color has never been setted.

0.5.2: 	support setColorSchemeColors.

0.5.1:  fix bug: arrow be putting into incorrect position.    

0.5.0: 	support enable/disable circle back ground.    

0.4.0:  fix bug:#1 :progressbar can not hide.    
    	fix bug:#2 :progressbar show full ring when running  too long.
    	
0.3.0:  add showArrow option.

License

Copyright 2014 lsjwzh

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
  • animation control from action events

    animation control from action events

    is that possible to add an animation for the start and the end of the loading event. Like the transition from nothing to scaled back to the original size?

    enhancement 
    opened by jjhesk 6
  • i don't look the arrow

    i don't look the arrow

    img

    using this code <com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar android:id="@+id/progressBar"

        app:mlpb_show_arrow="true"
        app:mlpb_arrow_height="5dp"
        app:mlpb_arrow_width="10dp"
        app:mlpb_enable_circle_background="true"
    
        app:mlpb_progress_stoke_width="5dp"
        app:mlpb_progress_text_visibility="visible"
        android:layout_width="60dp"
        android:layout_height="60dp"/>
    

    and

    circleProgressBar.setShowArrow(true);

    opened by Thereisnospon 1
  • fix bug: if the view has animation, it can't be removed by parent actually.

    fix bug: if the view has animation, it can't be removed by parent actually.

    fix bug: if the view has animation, it can't be removed by parent actually.

    fix bug: if the CircleProgressBar has a container, if the container is removed by it's parent and add back again, the animation will nerver start again.

    opened by ashqal 1
  • Restarting Progress bar does not animate

    Restarting Progress bar does not animate

    CircleProgressBar.java - Line 365

        public void setVisibility(int visibility) {
            super.setVisibility(visibility);
            if (mProgressDrawable != null) {
                if(visibility!=VISIBLE) {
                    mProgressDrawable.stop();
                }else{
                 mProgressDrawable.start();
                 mProgressDrawable.setVisible(visibility == VISIBLE, false);
                }
            }
        }
    
    opened by AvinashSKaranth 1
  • If you keep it running too long..

    If you keep it running too long..

    If you keep it running too long, it breaks. I left it running in the emulator(for hours I guess), and now the circle stays filled for a few seconds on every spin.

    2015-02-17 17_11_05-5554_nexus_one_api_21

    enhancement 
    opened by tomdevdev 1
  • Hiding the progressbar

    Hiding the progressbar

    Hi

    Nice library! I'm having trouble making it go away :)

            progressBar.getVisibility(); //value is 0, it's visible
            progressBar.setVisibility(View.GONE);
            progressBar.getVisibility(); //value is 8, still visible!
    

    I'm loading my stuff in an asynctask, and in onProgressUpdate, I want to make the progress indicator go away. But it's still visible.

    bug 
    opened by tomdevdev 1
  • android:visibility XML attribute does not work

    android:visibility XML attribute does not work

    Maybe I'm missing something, but when I do something like:

    My build.gradle file:

    compile('com.lsjwzh:materialloadingprogressbar:0.5.4-RELEASE')
    

    My XML

    <com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar
                    android:id="@+id/ticket_loading_spinner"
                    android:visibility="invisible"
                    android:layout_width="60dp"
                    android:layout_height="60dp"
                    android:layout_gravity="center_horizontal|center_vertical"
                    app:mlpb_enable_circle_background="true"
                    app:mlpb_progress_color="@color/amber_700"
                    app:mlpb_progress_stoke_width="5dp"
                    app:mlpb_progress_text_visibility="invisible"
                    app:mlpb_show_arrow="false" />
    

    My java source

    public class TicketActivity {
    
        // More injections...
        @InjectView(R.id.ticket_loading_spinner) CircleProgressBar mProgress;
        /// ...and more injections...
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.the_layout);
            ButterKnife.inject(this);
            prepareUI();
        }
    
        // More methods...
    }
    

    The CircleProgressBar is showing despite the visibility attribute.

    bug 
    opened by SergioLuis 0
  • animation not work

    animation not work

    i write a simple animation with 500 ms duration and set it to progress bar but it disappear immediately without duration effect.

    AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
    fadeOut.setDuration(500);
    circularProgress.startAnimation(fadeOut);
    
    opened by Blaster-777 0
  • A gray dot appeared when

    A gray dot appeared when "android:layout_width" less than 30.

                android:id="@+id/progressBar"
                app:mlpb_progress_stoke_width="2dp"
                app:mlpb_progress_color="@color/loginFocusedBorder"
                app:mlpb_background_color="@color/white"
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:layout_marginTop="-3dp"
                android:layout_marginRight="-3dp"
                android:visibility="gone"
                android:layout_gravity="right"/>
    
    A gray dot appeared In the upper left corner.
    
    opened by iboying 0
  • Circle seems to be growing each time I change visibility (android 4.2.1)

    Circle seems to be growing each time I change visibility (android 4.2.1)

    Hello,

    So i'm testing on a Samsung Galaxy Nexus running 4.2.1

    I have a weird issue: I'm using a loading progress bar at the bottom of my listview. I show it when i'm loading more item to the listview, and hide it when i'm finish loading.

    Problem is, each time I call setVisibility(View.GONE) and setVisibility(View.VISIBLE), it seems like the loading circle grows.

    See attached screenshot for an example of the circle after 5 or 6 times. screen shot 2015-12-17 at 5 42 59 pm

    (I don't see the issue on my Nexus 5 running Lollipop)

    opened by Mathbl 2
  •  OpenGLRenderer is out of memory OR too many open files error

    OpenGLRenderer is out of memory OR too many open files error

    I am testing on a Samsung GT-S6012 "Duos" device running Android 4.04 API 15 GSM arena link http://www.gsmarena.com/samsung_galaxy_music_duos_s6012-5027.php

    And I am getting this after the spinner runs for some time.... The application stops without an error dialog.. and the following is shown in the log...

    This log is of my app using the spinner, although I did another test running the demo for a while and gives me the same type of error. ( the spinners actually become graphically corrupt.. one a black square rotating and the other a red square rotating after some time has elapsed. 20 seconds or so)

    some link on the internet suggest that there are too many Async tasks running, could it be that there are too many Animations.. or perhaps a memory leak. (Not a nice bug to have though)

    D/OpenGLRenderer: GL error from OpenGLRenderer: 0x505 E/OpenGLRenderer: OpenGLRenderer is out of memory! E/RHEA_BRALLOC: PMEM open failed with error Too many open files E/RHEA_BRALLOC: MEM allocation failed with error Too many open files E/RHEA_BRALLOC: PMEM open failed with error Too many open files E/RHEA_BRALLOC: MEM allocation failed with error Too many open files D/OpenGLRenderer: GL error from OpenGLRenderer: 0x505 E/OpenGLRenderer: OpenGLRenderer is out of memory! E/RHEA_BRALLOC: PMEM open failed with error Too many open files E/RHEA_BRALLOC: MEM allocation failed with error Too many open files E/RHEA_BRALLOC: PMEM open failed with error Too many open files E/RHEA_BRALLOC: MEM allocation failed with error Too many open files D/OpenGLRenderer: GL error from OpenGLRenderer: 0x505 E/OpenGLRenderer: OpenGLRenderer is out of memory! E/RHEA_BRALLOC: PMEM open failed with error Too many open files E/RHEA_BRALLOC: MEM allocation failed with error Too many open files E/RHEA_BRALLOC: PMEM open failed with error Too many open files E/RHEA_BRALLOC: MEM allocation failed with error Too many open files D/OpenGLRenderer: GL error from OpenGLRenderer: 0x505 E/OpenGLRenderer: OpenGLRenderer is out of memory! D/BRCM_EGL: eglMakeCurrent(NULL) Thread: 6509 D/BRCM_EGL: eglDestroySurface() surface: 0x38c8c8, android window 0x26c6a0, Thread: 6509 D/BRCM_EGL: eglCreateWindowSurface() surface: 0x38c8c8, VC surface: 18, Thread: 6509 D/BRCM_EGL: eglMakeCurrent(0x23baf8, 0x38c8c8, 0x38c8c8) Thread: 6509 E/BRCM_EGL: surface_dequeue_buffer surf:0x38c8c8 buffer=0x3e028c handle:0x0 tid=6509 E/BRCM_EGL: Cancelling buffers E/BRCM_EGL: surface_dequeue_buffer surf:0x38c8c8 buffer=0x3e028c handle:0x0 tid=6509 E/rhea.gralloc: invalid gralloc handle (at 0x0) A/libc: Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1)

    opened by wayneforrest 3
  • Can't change progress color

    Can't change progress color

    Thank you for the library!

    I can't change progress color.

        <com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar
        android:id="@+id/mv_file_progressbar"
        app:mlpb_show_arrow="false"
        app:mlpb_enable_circle_background="true"
        app:mlpb_progress_stoke_width="4dp"
        app:mlpb_progress_text_visibility="visible"
        app:mlpb_progress_color="#566da9"
        app:mlpb_background_color="@android:color/white"
        android:layout_width="40dp"
        android:layout_height="40dp" />
    

    I set progress color, but it still black color. Android studio 1.2 beta. Dependencies:

        compile 'com.android.support:support-v13:21.0.3'
        compile 'com.lsjwzh:materialloadingprogressbar:0.5.3-RELEASE'
    
    opened by AnDrOiD-73 4
Releases(0.5.2)
Owner
lsjwzh
lsjwzh
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
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
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
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 'Google Fit' like activity indicator for Android

WheelIndicatorView A 'Google Fit' like activity indicator for Android Screenshots Usage How to use: Add a "WheelIndicatorView" in the layout editor li

David Lázaro 396 Nov 25, 2022
Indicator like tachometer View Library for Android

Tachometer Android Indicator like tachometer View Library for Android GIF Sample Preview Setup Step 1. Add Jitpack repository to your project build.gr

null 1 Jul 28, 2022
Android - An action bar item which acts both as a refresh button and as a progress indicator

RefreshActionItem An action bar item that implements this common pattern: Initially it shows a refresh button. If the button is clicked, a background

Manuel Peinado Gallego 655 Nov 10, 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
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
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
Holo Circular ProgressBar

HoloCircularProgressBar What is HoloCircularProgressBar HoloCircularProgressBar is a Custom View implementation for Android you might know from the An

Pascal Welsch 957 Nov 15, 2022
Progressbar with whorl style

WhorlView 一个加载View 预览 使用 step1 添加gradle配置 dependencies { compile 'com.tt:whorlviewlibrary:1.0.3' } step2 在xml中添加WhorlView <com.tt.whorlviewli

AndroidKy 409 Dec 3, 2022
Material Design ProgressBar with consistent appearance

MaterialProgressBar Material Design ProgressBar with consistent appearance on Android 4.0+. Why MaterialProgressBar? Consistent appearance on Android

Hai Zhang 2.2k Jan 1, 2023
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
ArcProgressbar project let create Arc progressbar in android in simplest way.

Arc Progressbar In Android ArcProgressbar project let create Arc progressbar in android in simplest way. USAGE To make a Arc Progressbar add ArcProgre

Manish 40 Dec 11, 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
: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