My Application requirement is custom progressbar.A Custom Progress Which have Multicolor Indication.For example Progress Smaller than 30 shown with Green Color .Progress Sma
Extend the Seekbar
class and override its onDraw()
method. There you can draw the thumb and progress background however you want.
Create a drawable progress background statically (easier than drawing in program.) and add to resources. You can set this as progress drawable in xml or in your custom class constructor.
class MySeekbar extends Seekbar {
// In Constructor load the thumb image into static members.
// override onDraw draw the thumb.
void onDraw(Canvas canvas) {
canvas.save();
canvas.drawBitmap(mThumb, left, top, right, bottom);
canvas.restore();
}
}