Skip to content

MamdouhRElNakeeb/SemiCircleArcProgressBar

 
 

Repository files navigation

SemiCircleArcProgressBar

A fully Customizable Semi Circle Arc Progress Bar. You can customize the the width and color of both progress and progress place holder from Java and XML. Also you can set the amount of progress bar with percentage from Java and XML. Additionally you can set percentage with a smooth filling animation.

demo.gif

Setting Percentage With Animation

Please note that if you set percentage with animation ".setPercentWithAnimation(10)" at the initial of your activity, set it with a delay to let the view to load and then animate.

Width to Height Ratio

Also for a better circular look, the width to height ratio is recommended to be 2:1 for example if your width is 100dp set your height to 50dp.

Installation

Add this repository to your Module build.gradle

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

And then add this dependency to your Project build.gradle

dependencies {
    implementation 'com.github.hadibtf:SemiCircleArcProgressBar:1.1.1'
}

Usage

//Java
progressBar.setPercent(40);
progressBar.setPercentWithAnimation(10);
        
progressBar.setProgressBarColor(0xffff00ff);
progressBar.setProgressPlaceHolderColor(0xff00ffff);
        
progressBar.setProgressBarWidth(10);
progressBar.setProgressPlaceHolderWidth(10);
//XML
<me.bastanfar.semicirclearcprogressbar.SemiCircleArcProgressBar
        android:layout_width="100dp"
        android:layout_height="50dp"
        app:percent="30"
        app:progressBarColor="#ff00ff"
        app:progressPlaceHolderColor="#00ffff"
        app:progressBarWidth="10"
        app:progressPlaceHolderWidth="10" />

1.png

2.png

3.png

About

A Semi Circle Arc Progress Bar

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%