Reputation: 3797
So here is my declaration for my sdk settings:
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="17" />
As you can see, my min is lower than my target. Now, when I design my layouts, I use match_parent
instead of fill_parent
. Since match_parent
wasn't added until API level 8, what will happen on a device that has an SDK version of level 7 and they go to load the layout with a View that uses match_parent
? More importantly:
How can I make my app backwards compatible with API level 7, but still use features from higher APIs when they are available?
Upvotes: 0
Views: 71
Reputation: 199805
Both fill_parent
and match_parent
resolve to the value of -1, as per the documentation, so there is no compatibility issue with older versions of Android.
The Android SDK includes a tool, Lint, which can check for features that are only available in higher versions than your minimum API level. More details on how to run Lint can be found in the tool's guide.
Upvotes: 1