Skip to content

The custom circular view to show progress in the form of pie-circle

License

Notifications You must be signed in to change notification settings

vipul-the-dev/CircularArcProgressView

Repository files navigation

CircularArcProgressView ❤

The custom circular view to show progress in the form of pie-circle 🟢

Demo 📱

Demo

Gradle setup 🛠️

  • Add below repository in your project level build.gradle
maven { url 'https://jitpack.io' }
  • Add below dependency in your app level build.gradle
implementation 'com.github.Vipul12Thawre:CircularArcProgressView:<latest-version>'

Usage ⌨️

  • Added below view in your required xml layout
 <com.vips.circulararcprogressview.CircularArcProgressView
       android:id="@+id/circularArcProgressView"
       android:layout_width="100dp"
       android:layout_height="100dp"
       android:layout_gravity="center"

       app:circleBackgroundColor="#FFFFFF"
       app:circleStrokeWidth="5"
       app:progress="70"
       app:progressColor="#0B783D"
       app:strokeColor="#25cd71" />
       

Properties

Everything is customizable 🥰

XML

  • app:circleBackgroundColor="@color/white" : set circle background color
  • app:circleStrokeWidth="5" : set circle stroke width
  • app:progress="70" : set circle progress
  • app:progressColor="@color/pinkFaded" : set progress color
  • app:strokeColor="@color/darkPink" : set circle stroke color

Kotlin

  • setCircleBackgroundColor(color:Int) : set circle background color
  • setCircleStrokeWidth(width:Int) : set circle stroke width
  • setProgress(progress:Int) : set circle progress
  • setProgressColor(color: Int) : set progress color
  • setStrokeColor(color: Int) : set circle stroke color

Sample Code

  • MainActivity.kt
class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        
        val circularArcProgressView = findViewById<CircularArcProgressView>(R.id.circularArcProgressView)

        circularArcProgressView.setStrokeColor(ContextCompat.getColor(this, R.color.colorBrown))
        circularArcProgressView.setCircleBackgroundColor(ContextCompat.getColor(this, R.color.colorWhite))
        circularArcProgressView.setProgressColor(ContextCompat.getColor(this, R.color.colorBrownFade))
        circularArcProgressView.setProgress(40)
        circularArcProgressView.setCircleStrokeWidth(7)
    }
    
 }


Social Handles

Vipul Thawre

Keep Coding 🤘

About

The custom circular view to show progress in the form of pie-circle

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages