4

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 padding in left and right of seekbar. how do i remove this padding?

enter image description here

Community
  • 1
  • 1

3 Answers3

13

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

musicSeekbar.setPadding(0,0,0,0);
Gary
  • 13,303
  • 18
  • 49
  • 71
3

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

android:paddingStart="0dp"
android:paddingEnd="0dp"
Destiner
  • 540
  • 4
  • 16
0

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

Aynoo
  • 38
  • 4