The Android Developer Challenge is back! Submit your idea before December 2.

androidx.annotation

Annotations

AnimatorRes

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

AnimRes

Denotes that an integer parameter, field or method return value is expected to be an anim 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. it is "thread safe".) If the annotated element is a class, then all methods in the class can be called from any thread.

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.

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.

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.

GuardedBy

Denotes that the annotated method or field can only be accessed when holding the referenced lock.

HalfFloat

Denotes that the annotated element represents a half-precision floating point value.

IdRes

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

InspectableProperty

Denotes that the annotated method is the getter for a resources-backed property that should be shown in Android Studio's inspection tools.

IntDef

Denotes that the annotated element of integer type, represents a logical type and that its value should be one of the explicitly named constants.

IntegerRes

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

InterpolatorRes

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

IntRange

Denotes that the annotated element should be an int or long in the given range

Keep

Denotes that the annotated element should not be removed when the code is minified at build time.

LayoutRes

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

LongDef

Denotes that the annotated long element represents a logical type and that its value should be one of the explicitly named constants.

MainThread

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

MenuRes

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

NavigationRes

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

NonNull

Denotes that a parameter, field or method return value can never be null.

Nullable

Denotes that a parameter, field or method return value can be null.

PluralsRes

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

Px

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

RawRes

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

RequiresApi

Denotes that the annotated element should only be called on the given API level or higher.

RequiresFeature

Denotes that the annotated element requires one or more features.

RequiresPermission

Denotes that the annotated element requires (or may require) one or more permissions.

RestrictTo

Denotes that the annotated element should only be accessed from within a specific scope (as defined by Scope).

Size

Denotes that the annotated element should have a given size or length.

StringDef

Denotes that the annotated String element, represents a logical type and that its value should be one of the explicitly named constants.

StringRes

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

StyleableRes

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

StyleRes

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

TransitionRes

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

UiThread

Denotes that the annotated method or constructor should only be called on the UI thread.

VisibleForTesting

Denotes that the class, method or field has its visibility relaxed, so that it is more widely visible than otherwise necessary to make code testable.

WorkerThread

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

XmlRes

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