简体   繁体   中英

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()));
        }
    });

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

你没有真正“点击”seekBar本身 - 尝试seekBar.setOnSeekbarChangeListener

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM