Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get progress in onStopTrackingTouch not onProgressChanged in seekbar

I'm new to android development , I use onProgressChanged to get current progress as progress is a parameter of the function .

but I want to get only the final value of progress when user release the seekbar not the Immediate value.

Thanks in advance.

like image 249
Mahmoud Farahat Avatar asked Nov 18 '12 14:11

Mahmoud Farahat


People also ask

How do I start SeekBar on Android?

Step1: Create a new project. After that, you will have java and XML file. Step2: Open your xml file and add a SeekBar and TextView for message as shown below, max attribute in SeekBar define the maximum it can take. Assign ID to SeekBar And TextView.

How do I SeekBar progress?

In Android, SeekBar is an extension of ProgressBar that adds a draggable thumb, a user can touch the thumb and drag left or right to set the value for current progress.


1 Answers

The onStopTrackTouch method defined in OnSeekBarChangeListener is called when the user stops sliding the SeekBar (i.e., has finished the touch gesture) and provides the "final value".

like image 139
bobnoble Avatar answered Oct 06 '22 21:10

bobnoble