SoFunction
Updated on 2025-03-11

Android Support Annotations data sorting

Android Support Annotations

Here is the rightThe information about Android Support Annotations has been sorted out in detail. You can refer to it below:

annotation             explain
@AnimatorRes     Indicates this parameter、The return value of the field or function should be a Animator Types of resources
@AnimRes      Indicates this parameter、The return value of the field or function should be a Anim Types of resources
@AnyRes       Indicates this parameter、The return value of the field or function should be a任意Types of resources
@AnyThred          表示被annotation的方法可以在任何线程中被调用
@ArrayRes          Indicates this parameter、The return value of the field or function should be a Array Types of resources
@AttrRes           Indicates this parameter、The return value of the field or function should be a attribute Types of resources
@BinderThread        表示被annotation的方法只可以在被绑定的线程中被调用
@BoolRes           Indicates this parameter、The return value of the field or function should be a布尔Types of resources
@CallSuper          Indicates that any overridden method must call this method of the parent class
@CheckResult         表示不能忽视被annotation方法的返回value
@ColorInt          Indicates this parameter、The return value of the field or function should be a颜色value而不是颜色资源引用,For example, it should be a AARRGGBB integer value。
@ColorRes          Indicates this parameter、The return value of the field or function should be a color Types of resources,Instead of color values。Pay attention to and ColorInt the difference
@DimenRes          Indicates this parameter、The return value of the field or function should be a dimension Types of resources
@Dimension          表示被annotation的整形参数,A field or return value is a size type
@DrawableRes         Indicates this parameter、The return value of the field or function should be a drawable Types of resources
@FloatRange         表示被annotation的元素必须是在一个给定范围的floatordoublevalue
@FractionRes         Indicates this parameter、The return value of the field or function should be a fraction Types of resources
@IdRes            Indicates this parameter、The return value of the field or function should be a资源的 ID type
@IntegerRes         Indicates this parameter、The return value of the field or function should be a整数Types of resources
@IntRange          表示被annotation的元素必须是在一个给定范围的longorintvalue
@InterpolatorRes       Indicates this parameter、The return value of the field or function should be a interpolator Types of resources
@keep            表示被annotation的元素在构建混淆时不会被删除or缩小字段,Will keep the original field
@LayoutRes          Indicates this parameter、The return value of the field or function should be a layout 布局文件Types of resources
@MainThread         表示被annotation的方法只能在主Thread call
@MenuRes         Indicates this parameter、The return value of the field or function should be a menu Types of resources
@NonNull         表示被annotation的参数,字段or返回value不能为空
@Nullable         表示被annotation的参数,字段or返回value可以为空
@PluralsRes         Indicates this parameter、The return value of the field or function should be a plurals Types of resources
@Px          Parameters representing this plastic surgery,字段or返回value是一个像素尺寸
@RawRes           Indicates this parameter、The return value of the field or function should be a raw Types of resources
@RequiresApi         表示被annotation的元素只能在给定的api级别or更高版本上运行
@RequiresPermission     表示被annotation的元素需要(or可能需要)一个or多个权限
@   Specify that read permissions are required
@  Specify that write permissions are required
@Size  表示被annotation的元素必须有一个给定的大小or长度
@StringDef   表示被annotation的元素代表一个逻辑type并且它的value必须是显示命名的常量
@StringRes   Indicates this parameter、The return value of the field or function should be a字符串Types of resources
@StyleableRes   Indicates this parameter、The return value of the field or function should be a styleable Types of resources
@StyleRes    Indicates this parameter、The return value of the field or function should be a style Types of resources
@TransitionRes   Indicates this parameter、The return value of the field or function should be a transition Types of resources
@UiThread    表示被annotation的方法or构造方法只能在UIThread call
@VisibleForTesting  Mainly used in testing,Very few use,Sign effect
@WorkerThread   表示被annotation的方法or构造方法只能在工作Thread call
@XmlRes   Indicates this parameter、The return value of the field or function should be a XML Types of resources

Thank you for reading, I hope it can help you. Thank you for your support for this site!