In Android, Difference between fill_parent, match_parent

Below values are often used with android:layout_width and android:layout_height in XML Layout files

1. fill_parent equivalent integer value is -1. Specifies that view should be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by match_parent.
2. match_parent equivalent integer value is -1. Specifies that view should be as big as its parent (minus padding). Introduced in API Level 8. This has been introduced in API Level 8, to avoid confusion with the term fill_parent, though the behavior is exactly same.
3. wrap_content equivalent integer value is -2. Specifies that view should be only big enough to enclose its content (plus padding).

One thought on “In Android, Difference between fill_parent, match_parent”

Leave a Reply