Languages

Menu
Sites
Language
How to use a bitmap for Slider’s bar?

Hi,

I need to use a bitmap as a bar of my Slider control. Is it possible? There is SetThumbBitmap() method for thumb of the Slider, but I have not found something similar for the bar. Thanks!

Responses

1 Replies

You need to create custom bar ...

create class extends panel implements TouchEventListener

use OnDraw() to draw the bar

use Touch moved event to move the thumb

inside onDraw -draw line for your custom color - and draw bitmap for your thumb

Find the moved  touch the point and draw the bitmap to that point .. change the color of the bar to that point if you wish by drawing another line

-----Line 2-------[Thumb]--------Line 1--------

 

It is not hard ..it is easy if you understand the concept