• Stars
    star
    164
  • Rank 223,076 (Top 5 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Radial ProgressBar inspired by Apple Watch OS. It is highly Customisable

alt text

Radial Progress Bar

Radial ProgressBar inspired by Apple Watch OS. It is highly Customisable

Preview of Radial Progress Bar

Mindorks Mindorks Community License

Getting Started

Step 1. Add the JitPack repository to your Add it in your root build.gradle at the end of repositories:
allprojects {
    repositories {
   	   maven { url 'https://jitpack.io' }
    }
}
Step 2. Add the dependency
dependencies {
	        implementation 'com.github.MindorksOpenSource:RadialProgressBar:v1.3'
	}
Step3. To use this in XML File, use
  <com.mindorks.RadialProgressBar
            android:layout_width="200dp"
            android:layout_height="200dp"
            android:id="@+id/progress_view"
            app:useRoundedCorner="true"
            app:innerMaxProgress="100"
            app:outerMaxProgress="100"
            app:centerMaxProgress="100"
            app:isAnimationOn="true"
            app:innerProgress="50"
            app:centerProgress="50"
	    app:hasTwoProgressView="false"
            app:hasOneProgressView="false"
   />

Step 4. Link the XML in Activity File using,
val radialProgressBar = findViewById(R.id.progress_view)

or

RadialProgressBar rpb = findViewById(R.id.progress_view) //if using Java

thats it and how you can use the RadialProgressView in your project.

To Customise it according to your need you can use,

Feature XML Activity (Java/Koltin) Default
Set Start Angle OuterView app:outerProgressStartAngle="angle" rpb.setStartAngleOuterView(angle) 270
Set Start Angle CenterView app:centerProgressStartAngle="angle" rpb.setStartAngleCenterView(angle) 270
Set Start Angle InnerView app:innerProgressStartAngle="angle" rpb.setStartAngleInnerView(angle) 270
Set EmptyProgressColorOuterView app:outerEmptyProgressColor="color" rpb.setEmptyProgressColorOuterView(color) #F5F5F5
Set EmptyProgressColorCenterView app:centerEmptyProgressColor="color" rpb.setEmptyProgressColorCenterView(color) #F5F5F5
Set EmptyProgressColorInnerView app:innerEmptyProgressColor="color" rpb.setEmptyProgressColorInnerView(color) #F5F5F5
Set MaxProgressOuterView app:outerMaxProgress="Integer" rpb.setMaxProgressOuterView(Integer) 100
Set MaxProgressCenterView app:centerMaxProgress="Integer" rpb.setMaxProgressCenterView(Integer) 100
Set MaxProgressInnerView app:innerMaxProgress="Integer" rpb.setMaxProgressInnerView(Integer) 100
Set OuterProgress app:outerProgress="Integer" rpb.setOuterProgress(Integer) 0
Set CenterProgress app:centerProgress="Integer" rpb.setCenterProgress(Integer) 0
Set InnerProgress app:innerProgress="Integer" rpb.setInnerProgress(Integer) 0
Set OuterProgressColor app:outerProgressColor="color" rpb.setOuterProgressColor(listOfColor) #f52e67
Set CenterProgressColor app:centerProgressColor="color" rpb.setCenterProgressColor(listOfColor) #c2ff07
Set InnerProgressColor app:innerProgressColor="color" rpb.setInnerProgressColor(listOfColor) #0dffab
Set Elevation app:hasElevation="true/false" rpb.hasElevation(true/false) false
Set EmptyProgressBar app:hasEmptyProgressBar="true/false" rpb.hasEmptyProgressBar(true/false) false
Set Animation app:isAnimationOn="true/false" rpb.setAnimationInProgressView(true/false) true
Set RoundedCorner app:useRoundedCorners="true/false" rpb.useRoundedCorners(true/false) true
Set ProgressValues ---- rpb.setProgressValues(int,int,int) ----
Set MaxProgressValues ---- rpb.setMaxProgressValues(int,int,int) ----
Set Only OuterProgress app:hasOneProgressView="true/false" rpb.setOneProgressView(true/false) false
Set Only Outer and CenterProgress app:hasTwoProgressView="true/false" rpb.setTwoProgressView(true/false) false
Set Circle Thickness*** app:circleThickness="float" rpb.setCircleThickness(float) 1f
Set Circle Padding app:circlePadding="float" rpb.setCirclePadding(float) 10f

**angle = 0/90/180/270

***circleThickness between 0f to 1f

You can also get value related to the RadialProgressView,

Feature Value
Get Outer Progress rpb.getOuterProgress()
Get Inner Progress rpb.getInnerProgress()
Get Center Progress rpb.getCenterProgress()
Get Start Angle OuterProgress rpb.getStartAngleOuterView()
Get Start Angle InnerProgress rpb.getStartAngleInnerView()
Get Start Angle CenterProgress rpb.getStartAngleCenterView()
Get Start Angle OuterProgress rpb.getMaxProgressOuterView()
Get Start Angle InnerProgress rpb.getMaxProgressInnerView()
Get Start Angle CenterProgress rpb.getMaxProgressCenterView()

For Gradient Shade,

 val outerColor = ArrayList<Int>()
        outerColor.add(Color.parseColor("#fbab00"))
        outerColor.add(Color.parseColor("#f5004b"))
        progress.setOuterProgressColor(outerColor)
        

Todo

- If using One progressbar, user can also have an option to display the value in text

If this library helps you in anyway, show your love ❀️ by putting a ⭐ on this project ✌️

Check out Mindorks awesome open source projects here

Contributor

More Repositories

1

Kotlin-Flow-Android-Examples

Kotlin
895
star
2

Jetpack-Compose-WhatsApp-Clone

An example project to demonstrate how to build WhatsApp using Jetpack Compose.
Kotlin
605
star
3

Dagger-Hilt-Tutorial

An example project to demonstrate how to use the Dagger-Hilt in Android.
Kotlin
486
star
4

Jetpack-Compose-Android-Examples

Learn Jetpack Compose for Android by Examples. Learn how to use Jetpack Compose for Android App Development. Android’s modern toolkit for building native UI.
Kotlin
441
star
5

CrashReporter

CrashReporter is a handy tool to capture app crashes and save them in a file.
Java
402
star
6

EditDrawableText

EditDrawableText - An EditText which makes your Drawable Clickable
Kotlin
301
star
7

Retrofit-Kotlin-Coroutines-Example

An example project to demonstrate how to use Retrofit with Kotlin Coroutines in Android
Kotlin
277
star
8

MVI-Architecture-Android-Beginners

This repository contains a beginner sample app that implements MVI architecture
Kotlin
224
star
9

Uber-Car-Animation-Android

An example project to demonstrate how to Add Uber Like Car Animation in Android App
Kotlin
210
star
10

Paging3-Android-Tutorial

An example project to demonstrate how to use the Paging-3 in Android.
Kotlin
145
star
11

Koin-Tutorial

Koin - step by step tutorial
Kotlin
113
star
12

Open-PDF-File-Android-Example

An example project to demonstrate how to open a PDF file in Android programmatically
Kotlin
69
star
13

screenshot

This library helps to take screenshot dynamically
Kotlin
67
star
14

ConcatAdapter-Android-Example

In this project, we have demonstrated how to use Concat Adapter in Android
Kotlin
57
star
15

gogeom

This is a Geometrical library for Go Language. Which includes multiple Geometrical calculations like Circle, Lines etc in different forms
Go
56
star
16

Dagger-Multi-Module-Android

Learn to use dagger for dependency management in a multi-module app
Kotlin
49
star
17

Fused-Location-API-Example

An example project to demonstrate how to use Fused Location API to fetch the current location in Android
Kotlin
47
star
18

ViewColorGenerator

A library to generate color palette for view, imageview and image from URL.
Kotlin
30
star
19

android-architecture-jetpack-components

Android Architecture Using Jetpack Components: Sample App
Kotlin
29
star
20

WAProfileImage

WAProfileImage - A library for Android for choosing and editing profile image like WhatsApp
Kotlin
29
star
21

Dagger-Dynamic-Feature-Module

Project for using dagger in dynamic feature module
Kotlin
23
star
22

Easy-Share-Android

Easy Share - A library for sharing in Android
Java
20
star
23

Go-Log

A Go logger package which provides utility on top of Go's normal Log package.
Go
19
star