I\'m a little confused about two XML properties: match_parent
and fill_parent
. It seems that both are the same. Is there any difference between the
match_parent, which means that the view wants to be as big as its parent (minus padding).
wrap_content, which means that the view wants to be just big enough to enclose its content (plus padding)
For sake of better illustration, I have created a sample layout that demonstrate this concept. To see it's effect, I added a border of each textView content.
In "Match parent" textView content, we can see it's layout width spread out of it's parent whole length.
But we can see in "Wrap Content" textView content, it's layout width wrapped in of it's content(Wrap Content) length.