Added in API level 16
TargetApi
@Target([AnnotationTarget.CLASS, AnnotationTarget.FILE, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FIELD]) class TargetApi
android.annotation.TargetApi |
Indicates that Lint should treat this type as targeting a given API level, no matter what the project target is.
Summary
Public constructors | |
---|---|
Indicates that Lint should treat this type as targeting a given API level, no matter what the project target is. |
Properties | |
---|---|
Int |
This sets the target api level for the type. |
Public constructors
TargetApi
Added in API level 16
TargetApi(value: Int)
Indicates that Lint should treat this type as targeting a given API level, no matter what the project target is.