This is a progress bar implemented as circle. The inner area is editable and presented as RelativeLayout, so you can put anything inside.
app:progress_bar_size |
Float |
app:radius |
Float |
android:progress |
Integer |
android:background |
Color |
app:primary_color |
Color |
app:secondary_color |
Color |
app:outline |
Boolean |
app:outline_color |
Color |
interface OnProgressChangeListener
onProgressChange(Float, Int)
progress |
Float |
progressBarWidth |
Float |
progressChangeListener |
OnProgressChangeListener? |
radius |
Float |
isRenderOutlineCircle |
Boolean |
outlineColor |
Int |
primaryColor |
Int |
secondaryColor |
Int |
outlineColor |
Int |
duration |
Int |
time |
Int |
reset(void) |
setCustomShader(Shader) |
translate(int) |
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)
}
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 |