Home > DeveloperSection > Forums > What is the difference between match_parent and fill_parent?
Royce Roy
Royce Roy

Total Post:149

Posted on    May-19-2015 1:43 AM

 Android Android  Android Layout 

 1 Reply(s)
 838  View(s)
Rate this:
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 them?

Mayank Tripathi
Mayank Tripathi

Total Post:397

Posted on    May-19-2015 6:52 AM

They're the same thing (in API Level 8+). Use match_parent.

FILL_PARENT (renamed MATCH_PARENT in API Level 8 and higher), which means that the view wants to be as big as its parent (minus padding)


fill_parent: The 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.

Don't want to miss updates? Please click the below button!

Follow MindStick