A simple library for creating circular progressbars for Android

Overview

CircleProgressBar

https://github.com/emre1512/CircleProgressBar https://github.com/emre1512/CircleProgressBar https://www.apache.org/licenses/LICENSE-2.0 https://github.com/emre1512/CircleProgressBar

A simple library for creating circular progressbars for Android.

Examples

Installation

  • Get it via gradle: implementation 'com.emredavarci:CircleProgressBar:1.0.8'

Usage

  1. Add CircleProgressBar to your layout
    <com.emredavarci.circleprogressbar.CircleProgressBar
    	xmlns:cpb="http://schemas.android.com/apk/res-auto"
        android:id="@+id/progressBar"
        android:layout_width="150dp"
        android:layout_height="150dp"
        cpb:progressColor="#e76130"
        cpb:backgroundColor="#e7b330"
        cpb:dimension="14"
        cpb:backgroundWidth="8"
        cpb:textSize="18sp"
        cpb:roundedCorners="true"
        cpb:suffix="%"
        cpb:prefix=""
        cpb:progressText="Loading..."
        cpb:maxValue="100"
        cpb:progressTextColor="#f9916b"/>
  1. Get it from your activity/fragment etc.
	CircleProgressBar progressBar = (CircleProgressBar) findViewById(R.id.progressBar);
	progressBar.setProgress(progress1);

You can modify it programmatically if you want

Setters

	progressBar.setProgress(progress); 		// set progress value
	progressBar.setMaxValue(100); 			// set progress max value
	progressBar.setStrokeWidthDimension(10); 		// set stroke width
	progressBar.setBackgroundWidth(10); 		// set progress background width
	progressBar.setProgressColor("#FF6FD99D"); 	// set progress color
	progressBar.setBackgroundColor("#FFF9916B"); 	// set progress backgorund color
	progressBar.setText(String.valueOf(progress)); 	// set progress text
	progressBar.setTextColor("#FF6FD99D"); 		// set text color
	progressBar.setSuffix("%"); 			// set suffix
	progressBar.setPrefix(""); 			// set prefix

Getters

	progressBar.getProgress();			// get progress value
	progressBar.getProgressPercentage();		// get progress percentage
	progressBar.getMaxValue();			// get progress max value
	progressBar.getStrokeWidthDimension();			// get stroke width
	progressBar.getBackgroundWidth();		// get progress background width
	progressBar.getProgressColor();			// get progress color
	progressBar.getBackgroundColor();		// get progress backgorund color
	progressBar.getText();  			// get progress text
	progressBar.getTextColor();			// get text color
	progressBar.getSuffix();			// get suffix
	progressBar.getPrefix();			// get prefix

LICENSE

Copyright 2017 M. Emre Davarci

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
  • error: duplicate value for resource 'attr/strokeWidth' with config ''

    error: duplicate value for resource 'attr/strokeWidth' with config ''

    Can't build the project, getting the following error

    java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed C:\Users\Yanay.gradle\caches\transforms-1\files-1.1\jetified-circleprogressbar-1.0.4.aar\0fe22733a8a04170d80035415cb5406a\res\values\values.xml:6:5-533: AAPT: error: duplicate value for resource 'attr/strokeWidth' with config ''.

    C:\Users\Yanay.gradle\caches\transforms-1\files-1.1\jetified-circleprogressbar-1.0.4.aar\0fe22733a8a04170d80035415cb5406a\res\values\values.xml:6:5-533: AAPT: error: resource previously defined here.

    bug 
    opened by Tsabary 20
  • Animation Support?

    Animation Support?

    Have you got any sample to animate the progress

    ObjectAnimator animation = ObjectAnimator.ofInt(progressBar, "progress", 0, currentValue); // see this max value coming back here, we animale towards that value animation.setDuration(1000); //in milliseconds animation.setInterpolator(new DecelerateInterpolator()); animation.start(); This doesn't work

    question 
    opened by nksaroj 2
  • Fix duplicate value for resource

    Fix duplicate value for resource

    This I believe should be the original fix for the duplicate value resource error that breaks compilation as noted in https://github.com/emre1512/CircleProgressBar/issues/8

    opened by allan-on 1
  • JCenter has been deprecated

    JCenter has been deprecated

    Could you please migrate the artifact for this project to a different host? https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

    opened by egrotowska 0
  • Reading the strokeWidthDimension attribute causes exception

    Reading the strokeWidthDimension attribute causes exception

    The line 68 in CircleProgressBar.java

    strokeWidthDimension = ta.getFloat(R.styleable.CircleProgressBar_strokeWidthDimension, 10);

    should be changed to:

    strokeWidthDimension = ta.getDimension(R.styleable.CircleProgressBar_strokeWidthDimension, 10);

    because the strokeWidthDimension is defined as a dimension.

    opened by BrunoBieri 0
  • Version 1.0.8 contains nothing

    Version 1.0.8 contains nothing

    Hi there,

    I ran accross the files because the class "CircleProgressBar" was not found and triggered that there is only one class in your library: "BuildConfig".

    Download the library by yourself to see: https://mvnrepository.com/artifact/com.emredavarci/CircleProgressBar/1.0.8

    opened by Flo354 4
Owner
Emre
Hobbyist Android App/Game Developer | Open Source Lover <3 | M.Sc.
Emre
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
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
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
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
A simple customizable NumberPicker plugin for Android

NumberPicker A simple customizable NumberPicker for Android. Installation via Gradle: compile 'com.github.travijuu:numberpicker:1.0.7' or Maven: <depe

Erkin Çakar 93 Nov 29, 2022
a simple loadingview for android with animation

LoadingView a simple loadingview for android with animation 简单的带有动画效果的加载控件 #Preview #Gradle compile 'com.ldoublem.loadingview:loadingviewlib:1.0' Id P

ldoublem 2.7k Jan 2, 2023
A simple progress loader inspired by Can you Code this UI? Volume 6! - https://stories.uplabs.com/can-you-code-this-ui-volume-6-7bd09fa6dd92#.nyh2zhpvb

SlidingSquaresLoader Sliding Square Loader - A simple progress loader inspired by Can you Code this UI? Volume 6! Gradle Step 1. Add the JitPack repos

Hamza Fetuga 151 Jul 26, 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
A simple lib to create a ring-like progress view with corner edges

ProgressRingView Installation Gradle: dependencies { compile 'com.github.flepsik:progress-ring-view:1.2.1' } Maven: <dependency> <groupId>com.g

null 71 Dec 5, 2021
A simple and flexible Fillable Progress Layout written in Kotlin

FillProgressLayout ?? A simple and flexible Fill Progress Layout written in Kotlin ?? Netflix button animation using FillProgressLayout Support Librar

null 78 Sep 20, 2022
Simple Progress View that you can compare things, like statistics of a Football match

Simple Progress View that you can compare things, like statistics of a Football match

Kostas Antoniou 29 Jun 8, 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
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
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
Android library to display progress like google does in some of his services.

GoogleProgressBar This library is not maintained anymore and there will be no further releases Android library to display different kind of google rel

JPARDOGO 1.3k Dec 27, 2022
An Android library providing to realize wave loading effect.

WaveLoadingView WaveLoadingView - An Android library that provides a realistic wave-loading effect. Sample Usage For a working implementation of this

Tang 1.7k Jan 2, 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