androidx.annotation

Annotations

AnimRes

Denotes that an integer parameter, field or method return value is expected to be an anim resource reference (e.g.

AnimatorRes

Denotes that an integer parameter, field or method return value is expected to be an animator resource reference (e.g.

AnyRes

Denotes that an integer parameter, field or method return value is expected to be a resource reference of any type.

AnyThread

Denotes that the annotated method can be called from any thread (e.g.

ArrayRes

Denotes that an integer parameter, field or method return value is expected to be an array resource reference (e.g.

AttrRes

Denotes that an integer parameter, field or method return value is expected to be an attribute reference (e.g.

BinderThread

Denotes that the annotated method should only be called on the binder thread.

BoolRes

Denotes that an integer parameter, field or method return value is expected to be a boolean resource reference.

CallSuper

Denotes that any overriding methods should invoke this method as well.

CheckResult

Denotes that the annotated method returns a result that it typically is an error to ignore.

ChecksSdkIntAtLeast

Denotes that the annotated method checks if the SDK_INT API level is at least the given value, and either returns it or executes the given lambda in that case (or if it's a field, has the value true).

ColorInt

Denotes that the annotated element represents a packed color int, AARRGGBB.

ColorLong

Denotes that the annotated element represents a packed color long.

ColorRes

Denotes that an integer parameter, field or method return value is expected to be a color resource reference (e.g.

ContentView

Annotation that can be attached to a constructor with a single LayoutRes parameter to denote what layout the component intends to inflate and set as its content.

DimenRes

Denotes that an integer parameter, field or method return value is expected to be a dimension resource reference (e.g.

Dimension

Denotes that an integer parameter, field or method return value is expected to represent a dimension.

Discouraged

Denotes that the annotated element, while not disallowed or deprecated, is one that programmers are generally discouraged from using.

DisplayContext

Denotes a android.content.Context that is tied to a android.view.Display and can be used to obtain one via getDisplay.

DoNotInline

Denotes that the annotated method should not be inlined when the code is optimized at build time.

DrawableRes

Denotes that an integer parameter, field or method return value is expected to be a drawable resource reference (e.g.

FloatRange

Denotes that the annotated element should be a float or double in the given range

FontRes

Denotes that an integer parameter, field or method return value is expected to be a font resource reference (e.g.

FractionRes

Denotes that an integer parameter, field or method return value is expected to be a fraction resource reference.

GravityInt

Denotes that the annotated element represents a packed gravity int.