Ted Murphy wrote:
> How do I dynamically add individual vertical colored lines to a seekbar's
> progress bar?
>
> I already have the progress.xml, progress_fill.xml and background_fill
> files created as individual drawables, allowing me to customize my seekbar
> to some extent. But the individual vertical lines may need to be drawn in
> many different colors and at any point on the seekbar, depending on the
> situation. They can't be set in the XML layout files.
>
> I guess I need to be programmatically writing little colored rects to the
> background_fill.xml drawable (my progress_fill has been set to mostly
> transparent).
>
> How do I do write those litte rects programmatically to my
> background_fill.xml drawable?
>
> I did something similar in a TextView, in that I used a
> SpannableStringBuilder and an ImageSpan to write the little rects into a
> TextView. But I don't see that as being available for the seekbar widget.
>
> Btw, I did ask this same question over at 
> stackoverflow<http://stackoverflow.com/questions/11997005/add-vertical-colored-lines-to-seekbar-background-drawable>,
> but no answer ....

just create your custom drawable like:

class MyDrawable extends Drawable {
...
}

and override onDraw method

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to