I am writing an Android library. The vast majority of the interface in the lbirary supports Android API level 10 or above. Some functionality, though, requires a higher API
I have recently done this on a custom view class, which needed special constructor for some api levels.
I have done it with the @TargetApi annotation.
@TargetApi
If a method is available only since api level 16:
@TargetApi(16) public void someMethod () {}
This should do the trick, including lint errors.