-1

I have a seekbar, while moving it I want to change values from 0 to 5. I have a TextView, where I display those values while moving the seekbar. I tried using the following code but it just shows that the seekbar is progressed but it doesn't update the values of the progressed seek bar.

int yourProgress = 3;

ProgressBar pb = (ProgressBar) solo.getView(R.id.sbQuestionMarks);
pb.setProgress(yourProgress);

somebody give me a hint or an example how to do this in Robotium automation?

olyv
  • 3,699
  • 5
  • 37
  • 67
Abhijeet
  • 69
  • 7

1 Answers1

1

Assuming you have one SeekBar you can use solo.setProgressBar(0, 5);. Where 5 is your progress. It works for me for standard android SeekBar

olyv
  • 3,699
  • 5
  • 37
  • 67
  • This works for standard android SeekBar what if the SeekBar is customized? is there any other way – Abhijeet Apr 17 '15 at 07:35
  • If it doesn't work for your SeekNar let's look at your custom implementation. Can you provide it here? – olyv Apr 17 '15 at 07:38
  • hi got my problem fixed actually i had a TextView which had to be updated after the seek bar is progressed. – Abhijeet Apr 20 '15 at 13:07