ComparingPerformanceBar

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

Dependency

Add the following to your app module build.gradle file

dependencies {
   implementation 'io.github.cliffgr:cpbar:<latest-version-number-here>'
}

Usage

 <com.cliff.comparingperformancebar.PercentageProgressBar
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:percentage="50"
        app:progressLeftColor="#77B9C1"
        app:progressRightColor="#45718B"
        app:textSize="18sp" />

You can set the value programmatically by calling the following method

 val progressBar: PercentageProgressBar = findViewById(R.id.percentageProgressBar)
 progressBar.setProgress(30.0f)

Next Tasks

  • Animations
  • Shadows

GitHub

https://github.com/cliffgr/ComparingPerformanceBar