Home | History | Annotate | Download | only in res

Lines Matching refs:resourceTable

15               PackageResourceTable resourceTable = new PackageResourceTable("android");
18 addRClassValues(resourceTable, resourcePath.getRClass());
19 addMissingStyleableAttributes(resourceTable, resourcePath.getRClass());
22 addRClassValues(resourceTable, resourcePath.getInternalRClass());
23 addMissingStyleableAttributes(resourceTable, resourcePath.getInternalRClass());
26 parseResourceFiles(resourcePath, resourceTable);
28 return resourceTable;
41 PackageResourceTable resourceTable = new PackageResourceTable(packageName);
45 addRClassValues(resourceTable, resourcePath.getRClass());
50 parseResourceFiles(resourcePath, resourceTable);
53 return resourceTable;
57 private void addRClassValues(PackageResourceTable resourceTable, Class<?> rClass) {
71 resourceTable.addResource(id, resourceType, resourceName);
82 private void addMissingStyleableAttributes(PackageResourceTable resourceTable, Class<?> rClass) {
100 resourceTable.addResource(attributeResId, "attr", attributeName);
110 private void parseResourceFiles(ResourcePath resourcePath, PackageResourceTable resourceTable) {
112 Logger.debug("No resources for %s", resourceTable.getPackageName());
116 Logger.debug("Loading resources for %s from %s...", resourceTable.getPackageName(), resourcePath.getResourceBase());
119 new StaxDocumentLoader(resourceTable.getPackageName(), resourcePath.getResourceBase(),
122 .addHandler("bool", new StaxValueLoader(resourceTable, "bool", ResType.BOOLEAN))
123 .addHandler("item[@type='bool']", new StaxValueLoader(resourceTable, "bool", ResType.BOOLEAN))
124 .addHandler("color", new StaxValueLoader(resourceTable, "color", ResType.COLOR))
125 .addHandler("item[@type='color']", new StaxValueLoader(resourceTable, "color", ResType.COLOR))
126 .addHandler("drawable", new StaxValueLoader(resourceTable, "drawable", ResType.DRAWABLE))
127 .addHandler("item[@type='drawable']", new StaxValueLoader(resourceTable, "drawable", ResType.DRAWABLE))
128 .addHandler("item[@type='mipmap']", new StaxValueLoader(resourceTable, "mipmap", ResType.DRAWABLE))
129 .addHandler("dimen", new StaxValueLoader(resourceTable, "dimen", ResType.DIMEN))
130 .addHandler("item[@type='dimen']", new StaxValueLoader(resourceTable, "dimen", ResType.DIMEN))
131 .addHandler("integer", new StaxValueLoader(resourceTable, "integer", ResType.INTEGER))
132 .addHandler("item[@type='integer']", new StaxValueLoader(resourceTable, "integer", ResType.INTEGER))
133 .addHandler("integer-array", new StaxArrayLoader(resourceTable, "array", ResType.INTEGER_ARRAY, ResType.INTEGER))
134 .addHandler("fraction", new StaxValueLoader(resourceTable, "fraction", ResType.FRACTION))
135 .addHandler("item[@type='fraction']", new StaxValueLoader(resourceTable, "fraction", ResType.FRACTION))
136 .addHandler("item[@type='layout']", new StaxValueLoader(resourceTable, "layout", ResType.LAYOUT))
137 .addHandler("plurals", new StaxPluralsLoader(resourceTable, "plurals", ResType.CHAR_SEQUENCE))
138 .addHandler("string", new StaxValueLoader(resourceTable, "string", ResType.CHAR_SEQUENCE))
139 .addHandler("item[@type='string']", new StaxValueLoader(resourceTable, "string", ResType.CHAR_SEQUENCE))
140 .addHandler("string-array", new StaxArrayLoader(resourceTable, "array", ResType.CHAR_SEQUENCE_ARRAY, ResType.CHAR_SEQUENCE))
141 .addHandler("array", new StaxArrayLoader(resourceTable, "array", ResType.TYPED_ARRAY, null))
142 .addHandler("id", new StaxValueLoader(resourceTable, "id", ResType.CHAR_SEQUENCE))
143 .addHandler("item[@type='id']", new StaxValueLoader(resourceTable, "id", ResType.CHAR_SEQUENCE))
144 .addHandler("attr", new StaxAttrLoader(resourceTable, "attr", ResType.ATTR_DATA))
146 .addHandler("attr", new StaxAttrLoader(resourceTable, "attr", ResType.ATTR_DATA))
148 .addHandler("style", new StaxStyleLoader(resourceTable, "style", ResType.STYLE))
151 loadOpaque(resourcePath, resourceTable, "layout", ResType.LAYOUT);
152 loadOpaque(resourcePath, resourceTable, "menu", ResType.LAYOUT);
153 loadOpaque(resourcePath, resourceTable, "drawable", ResType.DRAWABLE);
154 loadOpaque(resourcePath, resourceTable, "mipmap", ResType.DRAWABLE);
155 loadOpaque(resourcePath, resourceTable, "anim", ResType.LAYOUT);
156 loadOpaque(resourcePath, resourceTable, "animator", ResType.LAYOUT);
157 loadOpaque(resourcePath, resourceTable, "color", ResType.COLOR_STATE_LIST);
158 loadOpaque(resourcePath, resourceTable, "xml", ResType.LAYOUT);
159 loadOpaque(resourcePath, resourceTable, "transition", ResType.LAYOUT);
160 loadOpaque(resourcePath, resourceTable, "interpolator", ResType.LAYOUT);
162 new DrawableResourceLoader(resourceTable).findDrawableResources(resourcePath);
163 new RawResourceLoader(resourcePath).loadTo(resourceTable);
169 private void loadOpaque(ResourcePath resourcePath, final PackageResourceTable resourceTable, final String type, final ResType resType) {
170 new DocumentLoader(resourceTable.getPackageName(), resourcePath.getResourceBase()) {
173 resourceTable.addResource(type, xmlContext.getXmlFile().getBaseName(),