Lines Matching refs:ResourceType
27 * This class gives access to the bidirectional relationship between {@link ResourceType} and
32 private final static Map<ResourceType, List<ResourceFolderType>> mTypeToFolderMap =
33 new HashMap<ResourceType, List<ResourceFolderType>>();
35 private final static Map<ResourceFolderType, List<ResourceType>> mFolderToTypeMap =
36 new HashMap<ResourceFolderType, List<ResourceType>>();
40 add(ResourceType.ANIM, ResourceFolderType.ANIM);
41 add(ResourceType.ANIMATOR, ResourceFolderType.ANIMATOR);
42 add(ResourceType.ARRAY, ResourceFolderType.VALUES);
43 add(ResourceType.ATTR, ResourceFolderType.VALUES);
44 add(ResourceType.BOOL, ResourceFolderType.VALUES);
45 add(ResourceType.COLOR, ResourceFolderType.VALUES);
46 add(ResourceType.COLOR, ResourceFolderType.COLOR);
47 add(ResourceType.DECLARE_STYLEABLE, ResourceFolderType.VALUES);
48 add(ResourceType.DIMEN, ResourceFolderType.VALUES);
49 add(ResourceType.DRAWABLE, ResourceFolderType.VALUES);
50 add(ResourceType.DRAWABLE, ResourceFolderType.DRAWABLE);
51 add(ResourceType.FRACTION, ResourceFolderType.VALUES);
52 add(ResourceType.ID, ResourceFolderType.VALUES);
53 add(ResourceType.INTEGER, ResourceFolderType.VALUES);
54 add(ResourceType.INTERPOLATOR, ResourceFolderType.INTERPOLATOR);
55 add(ResourceType.LAYOUT, ResourceFolderType.LAYOUT);
56 add(ResourceType.ID, ResourceFolderType.LAYOUT);
57 add(ResourceType.MENU, ResourceFolderType.MENU);
58 add(ResourceType.ID, ResourceFolderType.MENU);
59 add(ResourceType.MIPMAP, ResourceFolderType.MIPMAP);
60 add(ResourceType.PLURALS, ResourceFolderType.VALUES);
61 add(ResourceType.PUBLIC, ResourceFolderType.VALUES);
62 add(ResourceType.RAW, ResourceFolderType.RAW);
63 add(ResourceType.STRING, ResourceFolderType.VALUES);
64 add(ResourceType.STYLE, ResourceFolderType.VALUES);
65 add(ResourceType.STYLEABLE, ResourceFolderType.VALUES);
66 add(ResourceType.XML, ResourceFolderType.XML);
72 * Returns a list of {@link ResourceType}s that can be generated from files inside a folder
75 * @return a list of {@link ResourceType}, possibly empty but never null.
77 public static List<ResourceType> getRelatedResourceTypes(ResourceFolderType folderType) {
78 List<ResourceType> list = mFolderToTypeMap.get(folderType);
92 public static List<ResourceFolderType> getRelatedFolders(ResourceType resType) {
102 * Returns true if the {@link ResourceType} and the {@link ResourceFolderType} values match.
106 * could generate a resource of the specified {@link ResourceType}
108 public static boolean match(ResourceType resType, ResourceFolderType folderType) {
119 * Adds a {@link ResourceType} - {@link ResourceFolderType} relationship. this indicates that
121 * @param type The resourceType
124 private static void add(ResourceType type, ResourceFolderType folder) {
136 List<ResourceType> typeList = mFolderToTypeMap.get(folder);
138 typeList = new ArrayList<ResourceType>();
150 for (ResourceType type : ResourceType.values()) {
159 List<ResourceType> list = mFolderToTypeMap.get(folder);