jjNford jjNford - 1 year ago 276
Android Question

Android ProgressBar setIndeterminateDrawable()

I'm trying to change a progress bar's indeterminate drawable on an event. When calling


The progress has no background. The drawable is valid and works if I set it in XML. Any idea's on how to fix this issue?

Answer Source

Looking at the ProgressBar source code, it looks like setIndeterminateDrawable doesn't call updateDrawableBounds so you'll have to manually set the bounds on your new drawable.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download