Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

match_parent compatibility

My application targets the v10 of the android Sdk but has the v6 for minSdkVersion. By default the "match_parent" propertie will be used for the width or height. Should i change it for fill_parent to ensure backwards compatibility of device with android under 2.2 ?

like image 979
grunk Avatar asked Jul 04 '11 08:07

grunk


2 Answers

yes, you should use fill_parent instead of match_parent to reduce the ambiguity as your min sdk version is V6.
fill_parent also works on android 2.2 .

like image 155
Dinesh Sharma Avatar answered Oct 07 '22 10:10

Dinesh Sharma


Use match_parent. Both FILL_PARENT and MATCH_PARENT constants are compiled to -1 and will work on any Android device.

like image 2
Eric Burke Avatar answered Oct 07 '22 09:10

Eric Burke