How in my application can i handle different layout files for devices with target less than or equal to 2.1 and greater than 2.1.
Actually i have a gridview on which i have used fill-parent for both height and width. All works fine except when i run it on devices with target > 2.1, the scrollbars doesn’t work and gridview doesn’t scroll.
But, replacing fill-parent wid match_parent makes it work in those devices, but doesn’t even allow to compile when targeting devices <=2.1.
How can i handle this thing. its drivin’ me nuts!
plz help…
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
so use fill_parent it will work for all.