Android Remove SeekBar Background

Kleptine picture Kleptine · Mar 17, 2010 · Viewed 13.6k times · Source

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.

Remove this

Any help?

Answer

Pooks picture Pooks · Sep 28, 2011

There is a simpler way that doesn't require creating a new drawable. Simply set the following in your xml definition

android:progressDrawable="@android:color/transparent"

Or if you want to do it in your code:

mySlider.setProgressDrawable(new ColorDrawable(android.R.color.transparent));