Android Typedef Annotations edit

Combining constants with flags

Using the IntDef#flag() attribute set to true, multiple constants can be combined.

Using the same example in this topic:

public abstract class Car {

    //Define the list of accepted constants
    @IntDef(flag=true, value={MICROCAR, CONVERTIBLE, SUPERCAR, MINIVAN, SUV})

    //Tell the compiler not to store annotation data in the .class file
    @Retention(RetentionPolicy.SOURCE)

    .....

}

Users can combine the allowed constants with a flag (such as |, &, ^ ).


Table Of Contents
39 ACRA
64 Menu
112 Loader
115 Typedef Annotations
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close