Skip to content

Repository files navigation

Progress Circle

This is a progress bar implemented as circle. The inner area is editable and presented as RelativeLayout, so you can put anything inside.

kotlinsample.xml

Attributes

app:progress_bar_sizeFloat
app:radiusFloat
android:progressInteger
android:backgroundColor
app:primary_colorColor
app:secondary_colorColor
app:outlineBoolean
app:outline_colorColor

Events

interface OnProgressChangeListener
onProgressChange(Float, Int)

Properties

progressFloat
progressBarWidthFloat
progressChangeListenerOnProgressChangeListener?
radiusFloat
isRenderOutlineCircleBoolean
outlineColorInt
primaryColorInt
secondaryColorInt
outlineColorInt
durationInt
timeInt

Methods

reset(void)
setCustomShader(Shader)
translate(int)

Example

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val progressCircle: ProgressCircle = findViewById(R.id.progress_circular)
progressCircle.progressChangeListener = this
mediaPlayer = MediaPlayer()
mediaPlayer.setDataSource("audio.mp3")
progressCircle.duration = mediaPlayer.duration
}
override fun onProgressChange(progress: Float, time: Int) {
mediaPlayer.seekTo(time * 1000)
}

Gestures

Move (forward/backward)Move finger from (let-right) (right-left). The gesture acceleration effect move speed. So short quick swipe will move the progress more then long slow

About

Simple progress cirlce

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages