android seekbar code example
Example 1: android java seekbar
final SeekBar SeekBarName = (SeekBar) findViewById(R.id.SeekBarId);
SeekBarName.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
Set Max: SeekBarName.setMax();
Set starting point: SeekBarName.setProgress();
Example 2: seekbar kotlin
seekBar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(p0: SeekBar?, currentValue: Int, p2: Boolean) {
Log.i("TAG" , currentValue)
}
override fun onStartTrackingTouch(p0: SeekBar?) {}
override fun onStopTrackingTouch(p0: SeekBar?) {}
})