3

I have a bug after loading my seek bars. The thumb doesn't match with the progress value. After clicking the first time on the progress bar, the thumb moves correctly. Is there any solution for this problem? Thanks for help!

Screenshot:

tshepang
  • 12,111
  • 21
  • 91
  • 136
mariusz_witeczek
  • 115
  • 4
  • 11

2 Answers2

3

Check that your thumb offset in not set

android:thumbOffset="-10dp"
user182192
  • 729
  • 3
  • 14
  • 26
  • In my project I had to set android:thumbOffset="10dp" to place it correctly. Depends on how big your thumb drawable is. – Patrick Boos Feb 28 '14 at 06:35
2

You haven't provided much in the way of detail.

I've found with Android 2.3 and earlier that if I modify the thumb within my code I then need the following sequence:

int progress = getProgress();
setProgress(0);
setProgress(progress);

Otherwise, the thumb will not be in the correct position. You have to call setProgress(0) first because calling set setProgress() with the current position doesn't execute any useful code.

Doug Gerecht
  • 404
  • 4
  • 9