i’d like to use a seekbar to show the current value and adjust the desired value. I managed to change the desired value via thumb (Progress) and the current value with the bar (SecondaryProgress). There is only one little bug/problem:
When SecondaryProgress becomes lower than Progress, the bar shows the same value as Progress, even the value of SecondaryProgress really becomes lower or even 0 (checked that in debugger).
What it should look like:
SecondaryProgress < Progress <-- doesnt work, shows:
(==== O ) (=======O )
SecondaryProgress == Progress <-- works
(=======O )
SecondaryProgress > Progress <-- works
(=======O== )
Is there a setting that enables me to adjust that? Or do I have to customize the seekbar? And if so, where should i start? For me this doesnt look like a thing i can do in Layout…
Thanks for your help
Might be a bit late, but the best solution I found to that problem is to customize the seekBar, and to use a secondary progress drawable that would use only a part of the height of the seekBar.
Let’s say, for instance, that we want to use the bottom of the draw for the secondary progress, and keep 10dip at the top of it for progress. We could use the code below as progress drawable for our seekBar :
The main tip is to put the secondary progress drawable after progress drawable in the layer list, so that it is drawn above it, and is always visible, and to use an inset so that it doesn’t take the whole SeekBar height.
In your example, you could get a result like this :
SecondaryProgress < Progress
(====—O )
SecondaryProgress == Progress
(=======O )
SecondaryProgress > Progress
(=======O– )