A customizable, animated progress bar that features rounded corners. This Android library is designed to look great and be simple to use ๐ŸŽ‰

Overview

animated

RoundedProgressBar

Easy, Beautiful, Customizeable

The RoundedProgressBar library gives you a wide range of customizable options for making progress bars that have rounded edges. Below I've made a gif highlighting a few examples of different looking progress bars created with this library:


This demo app is included in this repository under the app directory

Gradle Setup โš™๏ธ

If you don't have this already, add it to your root build.gradle file:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Then you can add the dependency to your app build.gradle file:

dependencies {
    ...
    implementation 'com.github.MackHartley:RoundedProgressBar:1.0.1'
}

Features ๐ŸŒŸ

  1. Percentage complete text displayed
  2. Animaition

  1. Set foreground and background colors
  2. Separate text colors (depending on which background the text is drawn over)
  3. Bar Looks nice at low values (an occasional issue with rounded progress bar solutions)

  1. Any height or width can be set

Additionally, the RoundedProgressBar handles all state on config changes including situations where there are multiple progress bars:

Public Methods and Xml Attributes โŒจ๏ธ

These are the methods which can be called on the RoundedProgressBar class:

setProgressPercentage(progressPercentage: Double, shouldAnimate: Boolean = true)
getProgressPercentage(): Double

setProgressColor(colorRes: Int) // Sets the color of the 'progress' part of the progress bar
setProgressBgColor(colorRes: Int) // Sets the color of the progress bar background

setTextColor(colorRes: Int) // Sets text color for when it is drawn over the progress part of progress bar
setBgTextColor(colorRes: Int) // Sets text color for when it is drawn over the progress bar background
setTextSize(sizeInPixels: Float)
showProgressText(shouldShowProgressText: Boolean) // Hide or show the progress text

setAnimationLength(newAnimationLength: Long)

Each setter is accessible via xml as well. Here I've mapped each setter to its corresponding xml attribute:

Method Xml Attribute
setProgressPercentage(...) rpbProgress
setProgressColor(...) rpbProgressColor
setProgressBgColor(...) rpbProgressBgColor
setTextSize(...) rpbTextSize
setTextColor(...) rpbTextColor
setBgTextColor(...) rpbBgTextColor
showProgressText(...) rpbShowProgressText
setAnimationLength(...) rpbAnimationLength



This diagram shows which methods are responsible for setting the different colors of the progress bar

Why I Made This ๐Ÿ’ญ

A while back I was working on an Android app which relied heavily on having a few good looking progress bars. I found this library which was the best option in my opinion. However, as my project progressed I encountered the following issues with it:

  • No ability to set text color depending on where it's drawn
  • Occasional misplacement of text
  • Looks strange at low values (Common issue with rounded progress bars)
  • Doesn't have text animation

Unfortunately, these issues weren't acceptable for my use case, and that library was the best option I could find online. So not one to settle I decided to make something better suited for what I needed.

This is not to say that library is bad, it is quite good and has many more features than my library. However, my focus with this library was to make something simple that did a good job at just being a standard '0 - 100% style' progress bar.

Contributing ๐Ÿค

Feel free to open up issues on this repo to report bugs or request features.

Additionally if you'd like to contribute to the library feel free to open up a pull request! Just give me a heads up first though (via issues or comments) so we don't overwrite each other.

Special thanks to all those who have supported this repo thus far!



License ๐Ÿ“„

Copyright 2020 Mack Hartley

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.
You might also like...
An android library to easily add circular progress bar into your Jetpack Compose apps.
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

Android loading or progress dialog widget library, provide efficient way to implement iOS like loading dialog and progress wheel
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'

Android - An action bar item which acts both as a refresh button and as a progress indicator
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

A progress bar with animation, gradient and colorful shadow.
A progress bar with animation, gradient and colorful shadow.

Fancy Progressbar Android library providing a beautiful progressbar with colorful shadow, gradient and animation for Jetpack Compose. Download Add in

Android library for showing progress in a highly customizable pie.
Android library for showing progress in a highly customizable pie.

ProgressPieView Android library for showing progress in a highly customizable pie. Choose from the broad spectre of styleable elements: ppvStrokeWidth

A wave view of android,can be used as progress bar.
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

This is beautiful color arc progress bar.
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

MusicBar 2.1 0.0 Java view visualize progress bar for sound file like sound cloud
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

Progress Bar in the shape of regular polygon.
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

Comments
  • Transparent background required.

    Transparent background required.

    Hi, it's a nice library but here's a situation I need to use a semi transparent background within progressbar, but afte I set rpbBackgroundColor it's a black background. Any change to support this function?

    bug 
    opened by xxxifan 8
  • Add ability to adjust text style

    Add ability to adjust text style

    Is your feature request related to a problem? Please describe. Right now there is no ability to make the progress overlay text bold or italic.

    Describe the solution you'd like It would be nice if the overlay text had the ability to be bold or italic.

    Additional context This should be available as an xml attribute and a public method

    enhancement 
    opened by MackHartley 1
  • Add Example: Macrotracker

    Add Example: Macrotracker

    This PR adds an example of how my app, Macrotracker, uses the RoundedProgressBar library.

    Note: If you want to add your app to the who_uses_rpb.md file, use this PR as an example.

    opened by MackHartley 0
  • Old attempt, Add Example: Macrotracker

    Old attempt, Add Example: Macrotracker

    This PR adds an example of my usage of the RoundedProgressBar library in my app, Macrotracker.

    Note: If you want to add your app to the who_uses_rpb.md file, use this PR as an example.

    opened by MackHartley 0
Releases(3.0.0)
  • 3.0.0(Mar 8, 2022)

    This version introduces new features which allows developers to customize what text is displayed to the user! Simply extend the ProgressTextFormatter class and declare what text you want shown to the user for a given progress value.

    These changes are not backwards compatible, so any developers who are upgrading from 2.x.x might have to make minor changes to their existing code.

    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Sep 5, 2021)

    This release includes a fix/improvement that allows transparent colors to be used for the ProgressDrawable and BackgroundDrawable. This fix was created in response to an issue created by a user of the library: https://github.com/MackHartley/RoundedProgressBar/issues/18

    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Apr 23, 2021)

    This release adds a new feature. Developers can now supply a custom font to the RoundedProgressBar. Font formats supported include .ttf and .otf.

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Apr 7, 2021)

    This release brings some big improvements to the RoundedProgressBar Library ๐ŸŽ‰

    The biggest change is that each corner can have a different corner radius value. This is a very useful feature because it allows the progress bar to appear "attached" to other views with rounded corners. So if you want a progress bar with an icon and rounded corners, you could make a custom image view and put it adjacent to your progress bar. The result would be a progress bar with an icon that looks like a single view. For an example of this, check out the progress bars on the README.

    Other notable improvements included in this release:

    • If desired, the progress bar will only show "0%" or "100%" if the current progress double value is exactly equal to 0.0 or 100.0. This is useful in cases where "0%" or "100%" is an important indicator to the user.
    • Text padding can be specified for the ProgressOverlayText

    Note: This release is not backwards compatible with 1.x.x versions. Upgrading from 1.x.x to 2.0.0 should be easy though. It's likely you'll just need to change some method and/or xml attribute names.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Sep 20, 2020)

    Minor improvement:

    ProgressTextOverlay class is now hidden. It is intended to be used internally by the library, so exposing it was potentially confusing to users of the library.

    Source code(tar.gz)
    Source code(zip)
  • v1.0(Aug 30, 2020)

    This library has been developed and dev tested on my personal computer. Now that I am satisfied with it's features and stability, I am releasing it here.

    Source code(tar.gz)
    Source code(zip)
Owner
null
A progress wheel for android, intended for use instead of the standard progress bar.

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 librar

Todd Davies 2.7k Dec 29, 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 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
Beautiful progress bar with segments. Highly customizable. Fully written with Jetpack Compose

?? SegmentedProgressBar ?? Beautiful progress bar split into several segments. Highly customizable. Fully written with Jetpack Compose. Why this libra

Stephen Vinouze 90 Dec 15, 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
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
[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
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
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