3

Hi,

public static class TestDialogType {
            public static final int ITEM_TYPE_VALUE = 1;
            public static final int ITEM_TYPE_TWO = 2;
            public static final int ITEM_TYPE_THREE = 3;
            //and many other values

            @IntDef({ITEM_TYPE_VALUE, ITEM_TYPE_TWO, ITEM_TYPE_THREE,...})
            @interface Type {

            }
        }

I have huge list of values stored in my @intDef and want to loop through all the values and find the matching value.

enum has values() function through which you can access all the values.

Is there any work around to resolve this?

Saurabh
  • 975
  • 2
  • 12
  • 27

0 Answers0