Giks91
Giks91

Reputation: 301

How to hide/show thumb in a SeekBar

I'm trying to hide the thumb of seekBar by default and show it if you touch the seekbar for the first time, but I can't make the thumb invisible. I tried:

How can I do that?

Upvotes: 1

Views: 1823

Answers (1)

H.P.
H.P.

Reputation: 1221

Try this way:(To remove gap)

seekbar.setSplitTrack(false);
seekbar.getThumb().mutate().setAlpha(0);

Or, You can add following In the seekbar's XML layout.

android:splitTrack="false"

Upvotes: 3

Related Questions