Reputation: 119
I'm developing an android app in eclipse. My ide shows a tip to generate this line.I added it to my code:
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
What does this code indicate? Will the app be restricted with the GINGERBREAD version alone?
Upvotes: 8
Views: 6394
Reputation: 1250
Indicates that Lint should treat this type as targeting a given API level, no matter what the project target is(It just suppress the Lint error)
via Android documentation
e.g. if Lint detects that you are using something newer than your android:minSdkVersion, but up to API Level GingerBread, Lint will not complain.
Upvotes: 5