diff options
author | Adam Lesinski <adamlesinski@google.com> | 2015-11-06 18:25:04 -0800 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2015-11-06 18:25:04 -0800 |
commit | 27afb9e8894b512b21fcca6ce142f40f1ee16cbb (patch) | |
tree | a3980c54d8f44831bc342738cfaff1373f223a62 /tools/aapt2/ResourceParser.h | |
parent | b274e35abfbbd09e0fce983a215c11522c56cce2 (diff) |
AAPT2: Add support for clearer in-progress public attributes
Before, the ID assigned to a public resource without an explicitly set id
was more difficult to figure out. It would be the next available ID.
AAPT2 introduces a new way to specify public attributes in progress.
<public-group type="attr" first-id="0x0101047f">
<public name="foo" />
<public name="bar" />
...
</public-group>
The IDs assigned to each resource is auto-incremented starting from `first-id`.
This also keeps resource's with the same type grouped together so that
the auto-incrementing nature is evident.
Also, due to how AAPT2 was implemented, this is required :P
Change-Id: I95ea92ad0405e87ed0b1766879bb2f1d9d0b636e
Diffstat (limited to 'tools/aapt2/ResourceParser.h')
-rw-r--r-- | tools/aapt2/ResourceParser.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/aapt2/ResourceParser.h b/tools/aapt2/ResourceParser.h index 06b2581ceaff..18101ee111c9 100644 --- a/tools/aapt2/ResourceParser.h +++ b/tools/aapt2/ResourceParser.h @@ -83,6 +83,7 @@ private: bool parseColor(XmlPullParser* parser, ParsedResource* outResource); bool parsePrimitive(XmlPullParser* parser, ParsedResource* outResource); bool parsePublic(XmlPullParser* parser, ParsedResource* outResource); + bool parsePublicGroup(XmlPullParser* parser, ParsedResource* outResource); bool parseSymbol(XmlPullParser* parser, ParsedResource* outResource); bool parseAttr(XmlPullParser* parser, ParsedResource* outResource); bool parseAttrImpl(XmlPullParser* parser, ParsedResource* outResource, bool weak); |