0 votes
86 views

I have a seekbar control and whenever i seek the control the value is shown only after the seek is finished,i need to get the value as soon the control is touched.

The code on onStopTrackingTouch is given below :

textView.setText(progress + "/" + seekBar.getMax());

Seek bar control is shown below which display value only after seek completes

asked May 11, 2015 in Computer Science - IT by ppk | 86 views

1 Answer

0 votes
Selected Ans.
seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {       

@Override       
public void onStopTrackingTouch(SeekBar seekBar) {      
    // TODO Auto-generated method stub      
}       

@Override       
public void onStartTrackingTouch(SeekBar seekBar) {     
    // TODO Auto-generated method stub 
    textView.setText(progress + "/" + seekBar.getMax());     
}       

@Override       
public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser) {     


   textView.setText(progress + "/" + seekBar.getMax());

}       
});   
answered May 11, 2015 by ppk