Skip to content Skip to sidebar Skip to footer

How To Make Android Seekbar Full Width In Api 17 Or Above?

I want to make seekbar full width with no padding. I've seen this answer How to make SeekBar take up full width of parent but in api 17 and above it doesn't work. there is a paddin

Solution 1:

I just set padding at run time and it's OK now!

musicSeekbar.setPadding(0,0,0,0);

Solution 2:

You can make it work using XML (API 17+):

android:paddingStart="0dp"android:paddingEnd="0dp"

Solution 3:

you can use a parent layout before your seekbar's layout and put your seekbar layout in another one so that you can fill_parent

Post a Comment for "How To Make Android Seekbar Full Width In Api 17 Or Above?"