From 24aad163bc88cb10d2275385e9afc3de7f342d65 Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Fri, 24 Apr 2015 19:19:30 -0700 Subject: Add namespace handling in attribute values Previously, you could only reference namespace prefixes in attribute names: tryParseReference(const StringPiece16& str, - const StringPiece16& defaultPackage, bool* outCreate); /* @@ -127,20 +125,18 @@ public: */ static std::unique_ptr tryParseFlagSymbol(const Attribute& enumAttr, const StringPiece16& str); - /* * Try to convert a string to an Item for the given attribute. The attribute will * restrict what values the string can be converted to. - * The defaultPackage is used when the string is a reference with no defined package. * The callback function onCreateReference is called when the parsed item is a * reference to an ID that must be created (@+id/foo). */ static std::unique_ptr parseItemForAttribute( - const StringPiece16& value, const Attribute& attr, const StringPiece16& defaultPackage, + const StringPiece16& value, const Attribute& attr, std::function onCreateReference = {}); static std::unique_ptr parseItemForAttribute( - const StringPiece16& value, uint32_t typeMask, const StringPiece16& defaultPackage, + const StringPiece16& value, uint32_t typeMask, std::function onCreateReference = {}); static uint32_t androidTypeToAttributeTypeMask(uint16_t type); -- cgit v1.2.3-59-g8ed1b