Home | History | Annotate | Download | only in aapt

Lines Matching refs:attr

270         String16 attr16("attr");
303 PendingAttribute attr(myPackage, in, block, inStyleable);
305 const String16 attr16("attr");
318 attr.ident = String16(block.getAttributeStringValue(identIdx, &len));
320 *outIdent = attr.ident;
323 attr.sourcePos.error("A 'name' attribute is required for <attr>\n");
324 attr.hasErrors = true;
327 attr.comment = String16(
333 attr.type = parse_flags(typeStr.string(), typeStr.size(), gFormatFlags);
334 if (attr.type == 0) {
335 attr.sourcePos.error("Tag <attr> 'format' attribute value \"%s\" not valid\n",
337 attr.hasErrors = true;
339 attr.createIfNeeded(outTable);
343 attr.createIfNeeded(outTable);
346 //printf("Attribute %s: type=0x%08x\n", String8(attr.ident).string(), attr.type);
352 attr.sourcePos.error("Tag <attr> 'min' attribute must be a number, not \"%s\"\n",
354 attr.hasErrors = true;
356 attr.createIfNeeded(outTable);
357 if (!attr.hasErrors) {
358 err = outTable->addBag(attr.sourcePos, myPackage, attr16, attr.ident,
361 attr.hasErrors = true;
370 attr.sourcePos.error("Tag <attr> 'max' attribute must be a number, not \"%s\"\n",
372 attr.hasErrors = true;
374 attr.createIfNeeded(outTable);
375 if (!attr.hasErrors) {
376 err = outTable->addBag(attr.sourcePos, myPackage, attr16, attr.ident,
378 attr.hasErrors = true;
382 if ((minIdx >= 0 || maxIdx >= 0) && (attr.type&ResTable_map::TYPE_INTEGER) == 0) {
383 attr.sourcePos.error("Tag <attr> must have format=integer attribute if using max or min\n");
384 attr.hasErrors = true;
393 attr.sourcePos.error("Tag <attr> 'localization' attribute value \"%s\" not valid\n",
395 attr.hasErrors = true;
397 attr.createIfNeeded(outTable);
398 if (!attr.hasErrors) {
401 err = outTable->addBag(attr.sourcePos, myPackage, attr16, attr.ident,
404 attr.hasErrors = true;
420 .error("Tag <%s> can not appear inside <attr>, only <enum> or <flag>\n",
425 attr.createIfNeeded(outTable);
427 if (attr.type == ResTable_map::TYPE_ANY) {
430 attr.type = 0;
433 if ((attr.type&(ResTable_map::TYPE_ENUM|ResTable_map::TYPE_FLAGS)) == 0) {
435 attr.type |= localType;
436 if (!attr.hasErrors) {
438 sprintf(numberStr, "%d", attr.type);
440 myPackage, attr16, attr.ident, String16(""),
443 attr.hasErrors = true;
446 } else if ((uint32_t)(attr.type&(ResTable_map::TYPE_ENUM|ResTable_map::TYPE_FLAGS)) != localType) {
450 attr.hasErrors = true;
454 attr.hasErrors = true;
465 attr.hasErrors = true;
475 attr.hasErrors = true;
477 if (!attr.hasErrors && !ResTable::stringToInt(value.string(), value.size(), NULL)) {
482 attr.hasErrors = true;
486 if (!attr.hasErrors && !outTable->hasBagOrEntry(itemIdent, &id16, &myPackage)) {
490 attr.hasErrors = true;
494 if (!attr.hasErrors) {
496 enumOrFlagsComment.append(mayOrMust(attr.type,
498 enumOrFlagsComment.append((attr.type&ResTable_map::TYPE_ENUM)
520 attr16, attr.ident, String16(""),
523 attr.hasErrors = true;
530 if ((attr.type&ResTable_map::TYPE_ENUM) != 0) {
548 if (!attr.hasErrors && attr.added) {
549 appendTypeInfo(outTable, myPackage, attr16, attr.ident, attr.type, gFormatFlags);
552 if (!attr.hasErrors && enumOrFlagsComment.size() > 0) {
554 outTable->appendTypeComment(myPackage, attr16, attr.ident, enumOrFlagsComment);
737 const String16 attr16("attr");
1146 "Tag <%s> can not appear inside <declare-styleable>, only <attr>\n",
1172 "Found tag </%s> where </attr> is expected\n",
1222 const uint16_t* attr = block.getAttributeName(i, &length);
1223 if (strcmp16(attr, name16.string()) == 0) {
1225 } else if (strcmp16(attr, translatable16.string()) == 0) {
1227 } else if (strcmp16(attr, formatted16.string()) == 0) {
1606 sp<Type> attr = getType(mAssetsPackage, String16("attr"), unknown);
2162 buf, ac->attr.string(), ac->value.string());
2305 sp<Type> attr = p->getType(String16("attr"), unknown);
2321 LOG_ALWAYS_FATAL_IF(ti == 0 && attr != t,
2322 "First type is not attr!");
3095 // one an attr and one an id, with the same name. Not something we
3130 const String16 attr16("attr");
3178 const String16 attr16("attr");