Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

alyxe-code/progress-circle

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

kotlin sample.xml

Attributes

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

Events

interface OnProgressChangeListener
onProgressChange(Float, Int)

Properties

progress Float
progressBarWidth Float
progressChangeListener OnProgressChangeListener?
radius Float
isRenderOutlineCircle Boolean
outlineColor Int
primaryColor Int
secondaryColor Int
outlineColor Int
duration Int
time Int

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.