Skip to content

androidx.annotation:annotation

Official Description: The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs.

CommonsWare's Notes

This artifact provides the AndroidX editions of annotations that help Lint and other development tools to steer you in the right direction when it comes to using the annotated code. Examples include:

  • @NotNull and @Nullable to provide details over whether parameters or return values can be null, to help Kotlin consumers of annotated Java code know whether they need null-safety code (e.g., ?. safe calls)

  • @StringRes, @ColorRes, and other @...Res annotations to indicate that a parameter or return value should point to a particular type of resource

  • @CallSuper, to help ensure that subclasses overriding this function call through to the superclass implementation of the function

Documentation

Versions