Skip to content
Advertisement

android Seekbar width “match_parent” not working

I’m creating a seekbar in a dialog fragment, and for some reason, the seekbar width is not taking the whole available width. I guess it has something to do with the dialogfragment somehow.

enter image description here

here is my xml file:

JavaScript

you can see that the seekbar width is set to “match parent” but it’s not working.

enter image description here

Although it’s look good in the preview.

Advertisement

Answer

Use RelativeLayout as root layout for dialog XML file like this…

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement