For so long im trying to understand the difference between match-parent and fill-parrent can any please explain it
Asked
Active
Viewed 111 times
3 Answers
2
They are identical. It was a result of a name change by Google as fill_parent was misleading. See here: What is the difference between match_parent and fill_parent?
1
After API 8, FILL_PARENT was renamed as MATCH_PARENT. So , both are one and the same.
Official doc : http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.htmlenter link description here
Prabhuraj
- 888
- 2
- 7
- 13
0
There isn't one. At least from an technical point of view.
The google simply renamed it because it didn't reflect what it actually did - to fill it's parent view. Matching it's parent bounds is more appropriate.
I recommended to use the new one "match_parent" because the old one could be dropped by google at any time (although it is deprecated for a long time now).
Brian Tompsett - 汤莱恩
- 5,438
- 68
- 55
- 126
Ionut Negru
- 5,862
- 4
- 47
- 73