I’m trying to toggle a SeekBar between the the two modes to display the state of streaming media.
I’ve established that the correct graphics show when defining the android:indeterminate tag in XML:
<SeekBar
android:id="@+id/seekBar1"
android:indeterminate="false"
android:progressDrawable="@android:drawable/progress_horizontal"
android:indeterminateDrawable="@android:drawable/progress_indeterminate_horizontal"
android:indeterminateBehavior="cycle"
android:indeterminateOnly="false"
android:progress="33"
android:secondaryProgress="66"
android:layout_height="wrap_content"
android:layout_width="match_parent"></SeekBar>

The trouble is, when trying to switch by calling setIndeterminate(true), the drawables don’t appear to change properly. In the case of indeterminate->determinate, the animation stops, and from determinate->indeterminate, nothing happens.
What am I doing wrong?
The SeekBar onSizeChanged() initializes only the current selected background drawable, and it is called once when the SeekBar is initialized.
So a fix might be:
And in the layout xml use
<yourpackage.CorrectedSeekBar ...This doesnt look nice, other workarounds might be possible but I think this is the main problem (bug?).