Before the arrival of the match_parent
I used a lot fill_parent
to define the total width of the view
. I didn't quite understand why the Android development team went on to substitute one for the other. What is the difference between the match_parent
and the fill_parent
? Why fill_parent
was he replaced by match_parent
?
There is no marked difference between the two, both are used to define the size of the component (View) to be as large as the parent. It was only renamed from the
API 8
fill_parent
bymatch_parent
.The team at
Android
found that the developers were misunderstandingFILL_PARENT
that aView
could fill the remaining space of the parent element. That is why the constant was renamedMATCH_PARENT
to clarify its use.Reference
The difference is that
fill_parent
it is cataloged as obsolete, it is better to usematch_parent