Android Support Annotations

Source: Internet
Author: User

The annotation explanation @animatorres indicates that the parameter, field, or function return value should be a Animator type resource @animres represents the parameter, the word The segment or function return value should be a resource of type Anim @anyres means that the parameter, field, or function return value should be an arbitrary type of resource @anythred means that the annotated method can be  Calling @arrayres means that the parameter, field, or function return value should be a resource of type Array @attrres means that the parameter, field, or function return value should be a attribute A resource of type @binderthread means that the annotated method can be called only in the bound thread @boolres indicates that the parameter, field, or function return value should be a Boolean type of resource @callsupe R means that any overridden method must call this method of the parent class @checkresult means that the return value of the annotated method cannot be ignored @colorint represents the parameter, the field or the function return value should be a color value instead of a color resource reference, such as an integer value that should be a aarrggbb. @ColorRes indicates that the parameter, field, or function return value should be a color-type resource, not a colour value. Note the difference between colorint and @dimenres means that the parameter, field, or function return value should be a dimension type of resource @dimension represents the callout's shaping parameters, the field Or the return value is a dimension type @drawableres indicates that the parameter, field, or function return value should be a drawable type of resource @floatrange the annotated element must be in a given range    The float or double value of @fractionres             Indicates that the parameter, field, or function return value should be a resource of type fraction @idres indicates that the parameter, field, or function return value should be the ID type of a resource @integerres             Indicates that the parameter, field, or function return value should be an integer type of resource @intrange indicates that the annotated element must be a long or int value in a given range @interpolatorres                   Indicates that the parameter, field, or function return value should be a resource of type Interpolator @keep indicates that the annotated element will not be deleted or shrunk when the build is confused, and the original field will remain @layoutres A resource indicating that the parameter, field, or function return value should be a layout file type @mainthread indicates that the annotated method can only be called @menures on the main thread. The parameter, field, or function return value should be a menu-type resource @nonnull represents the annotated parameter, the field or return value cannot be empty @nullable represents the annotated parameter, the field or return value can be considered                      An empty @pluralsres indicates that the parameter, field, or function return value should be a resource of type plurals @px represents this shaping parameter, the field or return value is a pixel size @rawres Indicates that the parameter, field, or function return value should be a raw type of resource @requiresapi indicates that the annotated element can only be run at a given API level or later @requirespermiss                Ion indicates that the annotated element needs (or may need) one or more permissions @requirespermission.read specify the need to allow Read permission @requirespermission.write Specifies that permission to write is required @size Indicates that the annotated element must have aA given size or length @stringdef indicates that the annotated element represents a logical type and its value must be a display-named constant @stringres means that the parameter, field, or function return value should be a string-type resource @styleab           Leres indicates that the parameter, field, or function return value should be a resource of type styleable @styleres means that the parameter, field, or function return value should be a style type of resource @transitionres Indicates that the parameter, field, or function return value should be a resource of type transition @uithread represents the annotated method or constructor method that is used only in the UI thread call @visiblefortesting Test aspect, the usefulness is very few, the flag function @workerthread means that the annotated method or the construction method can only be called by the worker thread @xmlres to indicate that the parameter, field, or function return value should be an XML type of resource

Android Support Annotations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.