Holo Circular ProgressBar

Overview

HoloCircularProgressBar

What is HoloCircularProgressBar

HoloCircularProgressBar is a Custom View implementation for Android you might know from the Android Clock App from Android 4.1

Usage

Sample Project

You can see the ProgressBar working in the sample application. Just check out the library and create a new "Android Project form Existing Code"

Use it in your own Code

Add the View in your Layout

<com.pascalwelsch.holocircularprogressbar.HoloCircularProgressBar
    android:id="@+id/holoCircularProgressBar"
    android:layout_width="300dp"
    android:layout_height="300dp"/>

Style

Don't forget to add a default style to your AppTheme

<style name="AppTheme" parent="android:Theme.Holo">
    <item name="circularProgressBarStyle">@style/CircularProgressBar</item>
</style>

I added two simple styles @style/CircularProgressBar and @style/CircularProgressBarLight to give you a quick start. You can see both styles in action in the sample Project

After you wrote your own style you have to rebuild your project in Android Studio (or restart your Eclipse. The ADT Plugin really has some troubles working with Android Libraries and Styles).

Of cause can you change the color at runtime. Here are some examples from the sample app:

Errors

There might be some error from your IDE. Most of them are simply solved after building the project.

Got this error?

The following classes could not be instantiated:
- de.passsy.holocircularprogressbar.HoloCircularProgressBar (Open Class, Show Error Log)
See the Error Log (Window > Show View) for more details.
Tip: Use View.isInEditMode() in your custom views to skip code when shown in Eclipse

If your Layout Editor can't draw the view, you have to restart Eclipse. There is a bug in the ADT Plugin

Got the next error?

Missing styles. Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.

Failed to find style 'circularProgressBarStyle' in current theme

You have to add a style for this View. see the Style section

Bugs

You found bugs? Report them or feel free to fix them by yourself and make a pull request. No one wants a buggy library

What's new (Changelog)

version 1.3 03.10.14
* new package name
* visible in `ScrollView`
* gradle and Android Studio support
version 1.2 22.05.14
* bugfixes for orientationchange
* layout bugs
version 1.1 12.10.13
* change color at runtime
* XML Attributes thumb_visible and marker_visible
* minSdkVersion decreased to 8 for the library
* avoid attr conflict with other library like HoloEverywhere
* fixed no animation from progress 0 to progress 1
* updated sample app with new test functions
version 1.0 10.03.13
* initial version of a holo themend circular progress bar 

License

Copyright 2013 Pascal Welsch

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.

Author: Pascal Welsch

Comments
  • easy production of maven artifact, bump to api 19, and cleanup.

    easy production of maven artifact, bump to api 19, and cleanup.

    bumped to api version 19, modified build.gradle for easy production of maven artifact, removed ic_launcher drawables and some other redundant or unused elements from the library project.

    opened by rhodey 6
  • Marker color doesn't change with background color

    Marker color doesn't change with background color

    When background color is changed via setProgressBackgroundColor, the marker color doesn't change, while when the background color is set via XML the marker one changes accordingly.

    To fix this, I simply added in function setProgressBackgroundColor

    updateMarkerColor();
    

    (Sorry, I'm new to Git and Github, I've no idea how to setup a branch and send a merge request)

    opened by AndreaVico 4
  • Setting a Duration

    Setting a Duration

    Although some people have asked this question all have eventually figured out how to set a duration (ex. 20000 milliseconds) before a published answer could be posted. How do I animate the holocircularprogressbar much like the countdown timer so that an input would show a smooth animation that lasts the length of the input?

    opened by codyjhsieh 3
  • Change stroke width from code,

    Change stroke width from code,

    Hi, I'm adding this view to my container layout from code. is it possible to set the stroke width not from xml but from code? , by the way it is a very good stuff you made. thanks for your answer, Peter

    opened by peterszucs 3
  • change color of bar in progress and setting different durations

    change color of bar in progress and setting different durations

    Hi There,

    I am looking for a similar solution in my app but i need to know if a few things are possible.

    1. Is it possible to change the color of the progress bar dynamically while in progress?
    2. Can i set the animation completion duration? e.g. draw a full circle in 60 seconds and stop
    opened by guyzk 2
  • Gradle support

    Gradle support

    Finally added gradle support for this lib. thanks @wuyingren for you initial commit. Thanks @wodka for the missing source folder hint in the build.gradle

    via https://github.com/passsy/android-HoloCircularProgressBar/pull/10

    The library is working. The sample is working.

    open TODOs before merge:

    • [x] simple Eclipse import for the library
    • [x] quick start with sample and lib in Eclipse
    • [x] simple Android Studio import for the library
    • [x] quick start with sample and lib in Android Studio
    opened by passsy 2
  • Fixed bug on configuration change and removed useless files from library

    Fixed bug on configuration change and removed useless files from library

    There was a bug where the marker and thumb enabled instance state was not saved/restored on configuration changes. This fixes that.

    In addition, the library directory had a load of unreferenced drawables and other resources. I've deleted those. And the library AndroidManifest.xml had an application tag, with a launcher icon set, which I've removed as well.

    opened by grodin 2
  • Can't use XML attuributes like

    Can't use XML attuributes like "app:stroke_width="20dp""

    if i add the attuributes like "app:stroke_width="20dp"" in a de.passsy.holocircularprogressbar.HoloCircularProgressBar, the application will crash because Error Inflating.

    opened by wheam 2
  • Going from 1.0 progress to 0 or any multiple of 1 does not change the status.

    Going from 1.0 progress to 0 or any multiple of 1 does not change the status.

    Due to line 426, mProgress = progress % 1.0f; This makes a progress of 1 save as mProgress = 0, so jumping from progress 1 to 0 fails, although this may be oddity with overdraw that I don't fully understand as well.

    bug 
    opened by mikedg1 2
  • Support for changing Thumb shape

    Support for changing Thumb shape

    These commits allow the user to change the shape of the thumb indicator, via thumb_shape attribute or setThumbShape.

    Currently adds a circle shape option, on top of the default square.

    opened by cfraz89 1
  • When I change the stroke width, it also adds more padding.

    When I change the stroke width, it also adds more padding.

    If I have a box of 100x100, when using a stroke width of 1dp, the circule will fill the whole box. If I increase the stroke, the circule gets smaller and smaller adding a padding.

    1dp circule stroke 1dp

    10dp circule stroke 10dp

    20dp circule stroke 20dp

    bug 
    opened by gomera 1
  • Error:(1) Attribute

    Error:(1) Attribute "progress" has already been defined

    /home/root/Desktop/Android/workspace-as/mobile/build/intermediates/exploded-aar/com.google.android.gms/play-services/6.5.87/res/values/wallet_colors.xml Error:(1) Attribute "progress" has already been defined

    opened by efecanbugday 0
  • Change thumb shape

    Change thumb shape

    These commits allow the user to change the shape of the thumb indicator, via thumb_shape attribute or setThumbShape.

    Currently adds a circle shape option, on top of the default square.

    opened by cfraz89 0
  • Animator Repeat Issue

    Animator Repeat Issue

    Hi, when I set the animator into repeat mode, I figure that there is a lag between each. The problem is the draw starts from about 300 not 270. I read the source code but I cannot find the solution.

    opened by gilbert1991 0
  • Fix view bounds

    Fix view bounds

    There is a a problem with how the view sets its dimensions in onMeasure. It's actually a simple one-liner that fixes that for me. Here are the before and after screenshots of the view's behaviour: before: circularprogressbar_boundsfixpr_before after: circularprogressbar_boundsfixpr_after

    the modified sample layout file (activity_home.xml) I've used: http://paste.kde.org/pfhl88x6e

    opened by mrmaffen 1
Owner
Pascal Welsch
Google Developer Expert for Flutter / CTO of phntm.xyz / Co-founder of @wiredashio / speaker / cat-lover
Pascal Welsch
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
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
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
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
Circular Slider UI Control for Android

Circular Slider What is this? Circular Slider is a custom-built Android View used for choosing numbers. It works similarly to the regular slider contr

Milos Marinkovic 309 Dec 7, 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
A lightweight circular indicator view library for Android

A lightweight circular indicator view library for Android

İbrahim Süren 241 Dec 30, 2022
A simple library for creating circular progressbars for Android

CircleProgressBar A simple library for creating circular progressbars for Android. Examples Installation Get it via gradle: implementation 'com.emreda

Emre 96 Nov 1, 2022
A circular android ProgressBar library which extends View, and the usage same as ProgressBar, It has solid,line and solid_line three styles. Besides, progress value can be freely customized.

CircleProgressBar 中文版文档 The CircleProgressBar extends View, It has both solid and line two styles. Besides, progress value can be freely customized. I

dinus_developer 1.2k Jan 3, 2023
[Deprecated] This project can make it easy to theme and custom Android's dialog. Also provides Holo and Material themes for old devices.

Deprecated Please use android.support.v7.app.AlertDialog of support-v7. AlertDialogPro Why AlertDialogPro? Theming Android's AlertDialog is not an eas

Feng Dai 468 Nov 10, 2022
Override the Holo EdgeEffect colors

EdgeEffectOverride EdgeEffectOverride is library designed to help override the blue overscroll_edge and overscroll_glow effects used by the the EdgeEf

Android Alliance 644 Sep 16, 2022
Twidere-Android Twidere is a powerful twitter client for Android 1.6+ 1 , which gives you a full Holo experience and nearly full Twitter's feature.

Twidere for Android Material Design ready and feature rich Twitter/Mastodon/Fanfou app for Android 4.1+. Enjoy Fediverse now! Twidere-Android is maint

Twidere Project 2.7k Jan 2, 2023
Material and Holo iconic fonts.

Android Icon Fonts Material and Holo iconic fonts. Source Material Extracted 433 Material Design icons from Google's Project Polymer website by Shreya

Evgeny Shishkin 223 Dec 27, 2022
An Android Holo themed colorpicker designed by Marie Schweiz

Android Holo ColorPicker Marie Schweiz http://marie-schweiz.de/ made a beautifull new design for the Holo ColorPicker which added a lot of new functio

Lars Werkman 1.4k Dec 21, 2022