Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get current duration of seekbar when click on seekbar

I have a question is How to get current duration of seekbar when click on seekbar? Thanks!

I've already try this code but it's not work:

seekBar.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            // TODO Auto-generated method stub
            Log.i("debug", String.valueOf(seekBar.getProgress()));
        }
    });
like image 447
Han Tran Avatar asked Dec 31 '25 00:12

Han Tran


1 Answers

At any time, you can call SeekBar.getProgress() to get the current value. To do this when the seekbar is clicked, set an OnClickListener (SeekBar.setOnClickListener) and to do this when the value is updated, set an OnSeekbarChangeListener

like image 187
Rich Avatar answered Jan 02 '26 16:01

Rich



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!