A progress wheel for android, intended for use instead of the standard progress bar.

Overview

Project frozen Project unmaintained

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 library, consider the below options:

If, on the other hand, you'd like to take over maintinance of the project or modernise it, feel free to do so; just send me pull requests or an email (at [email protected]).

Progress Wheel

This is a custom component for Android intended for use instead of a progress bar.

Sample Image Sample Image 3 Sample Image 4

Compare it side by side with the Android 2x progress wheel:

Sample Image 5

A complete walkthrough of how to use this component in your app

XML:
To implement the view in your xml layout do the following:

  1. Add the following to your attrs.xml file (in res/values):
<declare-styleable name="ProgressWheel">
        <attr name="pwText" format="string" />
        <attr name="pwTextColor" format="color" />
        <attr name="pwTextSize" format="dimension" />
        <attr name="pwBarColor" format="color" />
        <attr name="pwRimColor" format="color" />
        <attr name="pwRimWidth" format="dimension" />
        <attr name="pwSpinSpeed" format="dimension" />
        <attr name="pwDelayMillis" format="integer" />
        <attr name="pwCircleColor" format="color" />
        <attr name="pwRadius" format="dimension" />
        <attr name="pwBarWidth" format="dimension" />
        <attr name="pwBarLength" format="dimension" />
        <attr name="pwContourColor" format="color"/>
        <attr name="pwContourSize" format="dimension"/>
</declare-styleable>
  1. Add the following code to the root view of your layout: xmlns:ProgressWheel="http://schemas.android.com/apk/res/com.visualdenim.schooltraq"

  2. Add the widget code in the appropriate place in your xml file. Here's a sample implementation:

<com.todddavies.components.progressbar.ProgressWheel   
    android:id="@+id/pw_spinner"     
    android:layout_width="200dp"    
    android:layout_height="200dp"   
    android:layout_centerInParent="true"   
    ProgressWheel:pwText="Authenticating..."    
    ProgressWheel:pwTextColor="#222"   
    ProgressWheel:pwTextSize="14sp"   
    ProgressWheel:pwRimColor="#330097D6"   
    ProgressWheel:pwBarLength="60dp"    
    ProgressWheel:pwBarColor="#0097D6"   
    ProgressWheel:pwBarWidth="5dp"   
    ProgressWheel:pwRimWidth="2dp" /> 

Java:
First you need to either get a ProgressWheel from a layout file, or initalise one. Do this by:

  • ProgressWheel pw = new ProgressWheel(myContext, myAttributes);
  • ProgressWheel pw = (ProgressWheel) findViewById(R.id.pw_spinner);

To spin the progress wheel, you just call .startSpinning() and to stop it spinning, you call .stopSpinning()

Incrementing the progress wheel is slightly more tricky, you call .incrementProgress(). However, this is out of 360,
(because a circle has 360 degrees), and will automatically reset once you get past 360. A percentage display is
automatically displayed.

Using as a dependency

Add this to your build.gradle:

	repositories {
	    maven { url "https://jitpack.io" }
	}
	
	dependencies {
	    compile 'com.github.Todd-Davies:ProgressWheel:1.2'
	}

Using as a library project

To use it as a library in Android Studio, please edit build.gradle.

Modify:

apply plugin: 'android'

Into:

apply plugin: 'android-library'

Since Android SDK Tools revision 17 (released March 2012), this component can be used as a library project. In this case, you do not need to copy anything into your project's attrs.xml, and you must use the following namespace URI, instead of the above:

xmlns:ProgressWheel="http://schemas.android.com/apk/res-auto"

Otherwise, usage should be the same.

Todd Davies - @Todd__Davies - 2012

Comments
  • ERROR: Failed to resolve: ProgressWheel 1.2

    ERROR: Failed to resolve: ProgressWheel 1.2

    Hi. Nice to meet you. I am Akio Please tell me, how can I fix this issue. And I have added in gradle : repositories { maven { url "https://jitpack.io" } } Thanks.

    opened by AkioAlex0817 12
  • Gradle dependency causes AndroidManifest errors

    Gradle dependency causes AndroidManifest errors

    After I install this dependency, I'm getting some AndroidManifest issues (Android 1.2.2 - Gradle tools 1.2.3).

    Error:(11, 9) Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:11:9 Error:(13, 9) Attribute application@theme value=(@style/AppTheme) from AndroidManifest.xml:13:9 is also present at com.github.Todd-Davies:ProgressWheel:1.0:14:9 value=(@android:style/Theme.NoTitleBar) Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:8:5 to override

    opened by sureshjoshi 8
  • Match parent width and height

    Match parent width and height

    The ProgressWheel control does not draw when I specify it as :

    <com.todddavies.components.progressbar.ProgressWheel android:id="@+id/dialProgressWheel" android:layout_width="match_parent" android:layout_height="match_parent" ProgressWheel:barColor="#FF0000" ProgressWheel:barLength="5dp" ProgressWheel:barWidth="5dp" ProgressWheel:rimColor="#000000" ProgressWheel:rimWidth="10dp" ProgressWheel:text="" ProgressWheel:textColor="#222" ProgressWheel:textSize="14sp" />

    opened by trant 7
  • Barcolor , rimcolor not applying from java side

    Barcolor , rimcolor not applying from java side

    Hi tried to apply barcolor to progress bar from java side using progreabr1.setbarcolor() method , but it's not giving any change.. the default color mentioned in library is applied..

    opened by mvnpavan 4
  • Potential memory leak?

    Potential memory leak?

    If we start spin it will forever post messages to handler (to update view). Since there are always messages in queue gc won't be able to collect this handler and therefore won't collect view and context it's attached to. So the only way to avoid leak is to call stop spin manually, which is troublesome in some situations. Maybe view should override onDetachedFromWindow to stop message posting to handler, but save state, so on the next attach it will start spinning again.

    opened by AwesomelyAmazing 3
  • Set attribute values programnatically won't change the visual of the progress wheel.

    Set attribute values programnatically won't change the visual of the progress wheel.

    For example, if I call setBarColor( Color.parseColor("#e3a712"); in code, the bar color of the progress wheel won't visually change. The fix is quite simple, at least from the way I see it. It is basically due to barPaint object in ProgressWheel.java hasn't been updated with the new color value when setBarColor() is called.

    opened by boyserk84 2
  • Linearlayout weight

    Linearlayout weight

    The ProgressWheel control is only drawn when I specify height and width. If I use a linear layout, and then specify layout_weight=1 and layout_width=0dp, It is not displayed.

    Example of xml : https://www.dropbox.com/s/xmxp36rbarllz5d/f.xml

    opened by trant 2
  • Progess wheel radius

    Progess wheel radius

    Hi Todd i am very much impressed with your work. but u didnt mentioned for specific radis of the circle. i want radius of 100dp progress circle in increment mode how to achieve it.

    i dont want any rim. i want plain circle in increment mode

    opened by shashidhar502 2
  • bar length

    bar length

    I am trying to tamper with bar length attribute but nothing seems to change. How does it work exactly? (thanks for the overall good work on this widget by the way)

    opened by pligor 2
  • Remove ic_launcher from library

    Remove ic_launcher from library

    Fix #56

    The problem was because Android libraries include resources, and this one included the ic_launcher. That resource should not be included, because almost every Android project has its own.

    opened by ghost 1
  • Why I can't use this library on eclipse

    Why I can't use this library on eclipse

    hello I tried to import this library in eclipse , I right click and import it as android project .On the properties , the "is library" is checked .

    The problem is ,in the main.java and ProgressWheel.java , every "R" has this error "R cannot be resolved to a variable" . For instance , this line has the problem "R.styleable.ProgressWheel" .

    What is the problem ?Why I can't import it ?

    Looking to hear from you King Regards

    opened by abc2005 1
  • Add to Home Widget

    Add to Home Widget

    Hi, Can anyone explain how to use this fantastic library in a home widget? I am having problem in adding this view to the remoteView in my AppWidgetProvider. Thanks in advance

    opened by hoseinit 0
  • readme's demo is wrong

    readme's demo is wrong

    1. Add the following to your attrs.xml file (in res/values):
    <declare-styleable name="ProgressWheel">   
            <attr name="pwText" format="string" />
            <attr name="pwTextColor" format="color" />
            <attr name="pwTextSize" format="dimension" />
            <attr name="pwBarColor" format="color" />
            <attr name="pwRimColor" format="color" />
            <attr name="pwRimWidth" format="dimension" />
            <attr name="pwSpinSpeed" format="dimension" />
            <attr name="pwDelayMillis" format="integer" />
            <attr name="pwCircleColor" format="color" />
            <attr name="pwRadius" format="dimension" />
            <attr name="pwBarWidth" format="dimension" />
            <attr name="pwBarLength" format="dimension" />
            <attr name="pwContourColor" format="color" />
            <attr name="pwContourSize" format="dimension" />
    </declare-styleable> 
    
    1. Add the following code to the root view of your layout: xmlns:ProgressWheel="http://schemas.android.com/apk/res/com.visualdenim.schooltraq"
    2. Add the widget code in the appropriate place in your xml file. Here's a sample implementation:
    <com.todddavies.components.progressbar.ProgressWheel   
        android:id="@+id/pw_spinner"     
        android:layout_width="200dp"    
        android:layout_height="200dp"   
        android:layout_centerInParent="true"   
        ProgressWheel:pwText="Authenticating..."    
        ProgressWheel:pwTextColor="#222"   
        ProgressWheel:pwTextSize="14sp"   
        ProgressWheel:pwRimColor="#330097D6"   
        ProgressWheel:pwBarLength="60dp"    
        ProgressWheel:pwBarColor="#0097D6"   
        ProgressWheel:pwBarWidth="5dp"   
        ProgressWheel:pwRimWidth="2dp" /> 
    
    opened by chenzhenlindx 2
  • AndroidStudio suggests different xmlns:ProgressWheel

    AndroidStudio suggests different xmlns:ProgressWheel

    AndroidStudio complains on xmlns:ProgressWheel="http://schemas.android.com/apk/res/com.visualdenim.schooltraq", says

    In Gradle projects, always use http://schemas.android.com/apk/res-auto for custom attributes.
    

    Upon accepting the suggestion it works fine.

    opened by dlazerka 3
  • Double application

    Double application

    After adding the project as a dependency, when I run my application in an Android device it installs two applications, one of them is the actual application and the other one is the sample app from Progress Wheel. I cant figure out how to solve this. device-2015-07-20-150843

    opened by mateobosco 15
  • Attribute

    Attribute "radius" has already been defined

    Hello. When I build gradle, it keeps showing me this error: "Attribute "radius" has already been defined". After a little research I discovered ViewPagerIndicator library also uses "radius" attribute. They conflict.

    So how can I successfully build both of them?

    opened by rocxteady 2
Releases(1.2)
Owner
Todd Davies
Todd Davies
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 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
: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
A customizable, animated progress bar that features rounded corners. This Android library is designed to look great and be simple to use 🎉

RoundedProgressBar Easy, Beautiful, Customizeable The RoundedProgressBar library gives you a wide range of customizable options for making progress ba

null 541 Jan 1, 2023
[Android] Round Corner Progress Bar Library for Android

RoundCornerProgressBar Round corner is cool. Let's make your progress bar to round corner Colorful progress bar with round corner on progress which yo

Akexorcist 2.3k Dec 31, 2022
[Android] Round Corner Progress Bar Library for Android

RoundCornerProgressBar Round corner is cool. Let's make your progress bar to round corner Colorful progress bar with round corner on progress which yo

Akexorcist 2.3k Jan 7, 2023
A wave view of android,can be used as progress bar.

WaveView ![Gitter](https://badges.gitter.im/Join Chat.svg) A wave view of android,can be used as progress bar. Screenshot APK demo.apk What can be use

Kai Wang 1.3k Dec 28, 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
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
Open source android library for different progress bar designs

MultiProgressBar A progress bar library for Android that provides customized progress bars. Built with ❤︎ by Aseem Khare ?? Installation Add this in y

Aseem Khare 124 Nov 15, 2022
An android library to easily add circular progress bar into your Jetpack Compose apps.

CircularProgressBar for Jetpack Compose An android library to easily add circular progress bar into your Jetpack Compose apps. Have a Look Usage Circu

Hitanshu Dhawan 38 Oct 30, 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
A customizable indeterminate progress bar

DilatingDotsProgressBar Installation compile 'com.github.justzak:dilatingdotsprogressbar:1.0.1' Usage <com.zl.reik.dilatingdotsprogressbar.DilatingDo

Zachary Reik 628 Sep 24, 2022
Arc pointer - simple customized progress bar in the form of an arch

ArcPointer Simple customized progress bar in the form of an arch Demo Quick start Step 1 Gradle: compile 'io.github.dvegasa:arcpointer:1.0.2' Maven:

Ed Khalturin 79 Nov 22, 2022
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
Progress Bar in the shape of regular polygon.

N-SidedProgressBar Progress Bar in the shape of regular polygon. Download The library is available on jcenter. Just add the dependency to your build.g

Kaishu Sahu 69 Jul 25, 2022
a circle progress bar with effect

RingProgress a circle progress bar with effect #Preview ##Usage xml <com.ldoublem.ringPregressLibrary.RingProgress android:id="@+id/ring_prog

ldoublem 629 Nov 14, 2022
An instagram-like segmented progress bar

An instagram-like segmented progress bar

Tiago Ornelas 286 Jan 6, 2023
A feature rich staged progress bar with modifiable steps in between its stages.

StageStepBar A staged progressbar that you can use if you want finer control of the steps in between its stages. You can customize: Number of steps be

Konstantinos Lountzis 19 Dec 30, 2022