I have a SeekBar in a RelativeLayout whose width is equal to the width of the screen.
I applied layout_width="match_parent" to the SeekBar , but there seems to be some free space on both sides of the SeekBar to accommodate the thumb.
I also tried using android:thumb="@null" The thumb is gone, but not with empty space on the sides.
I really need the SeekBar width SeekBar match the parent. Can someone help me with this? Perhaps I could create a custom SeekBar class and set the width to width of the parent in onMeasure (). If this is a possible solution, I don't know how to pass the parent width to the SeekBar class.
Any help is appreciated. Thanks.
source share