6

I have an app where I want to set the progress of a specific SeekBar based upon a value retrieved from a web service. However when I use SetProgress(int) only the "seeker" of the SeekBar gets set. The bar does not get "filled" out as expected.

This is what it looks like :

enter image description here

Any ideas on how to fix this issue ?

CodePrimate
  • 6,646
  • 13
  • 48
  • 86
  • I'm having the same issue on Android 2.3.5. Did you find a solution? I am calling setMax() before calling setProgress(). – jfritz42 Jan 04 '13 at 23:32

2 Answers2

5

Try to set max value first and then set the progress.

David
  • 66
  • 1
4

Turns out this is a bug in Android. See also:

http://code.google.com/p/android/issues/detail?id=12945

Android SeekBar doesn't refresh after dynamically setting max value with setMax

android progressBar does not update progress view/drawable

A workaround is to do something like setMax(0) followed by setMax(max) and then setProgress().

Community
  • 1
  • 1
jfritz42
  • 5,913
  • 5
  • 50
  • 66