Is there a way I can remove the background bar image in the SeekBar android widget?
I just want it to show a slider with no progress bar behind it.
Any help?
Is there a way I can remove the background bar image in the SeekBar android widget?
I just want it to show a slider with no progress bar behind it.
Any help?
Have you tried
setBackgroundDrawable(null)
?Well I solved my own problem.
To remove the background, you have to create a blank drawable and set it to the progressDrawable:
Setting it to null doesn't seem to work.
create an xml file
seekbar_progress.xml
and place it indrawable
folder.Here stripes is an image,take an image and place it indrawable
folder.seekbar_progress.xml
Now in your
main xml
file that is having seekbar code, take an image and store indrawable
folder.here seekbar is an image.There is a simpler way that doesn't require creating a new drawable. Simply set the following in your xml definition
Or if you want to do it in your code:
One way to do this would be to change the color of the progress bar to the background color. You have to use a custom layout.
A custom layout is given below - play around with the colors :