Parse references to resource entries with dots in their name
Styles can be defined in a notation similar to CSS to inherit attributes of a
"parent" style.
This happens to be accepted by aapt2 for other forms of resources (excluding
drawables) though there isn't an official support statement.
Closes
@@ -143,7 +143,7 @@ public class FullyQualifiedName implements DataKey {
}
static final Pattern QUALIFIED_REFERENCE =
- Pattern.compile("((?<package>[^:]+):)?(?<type>\\w+)/(?<name>\\w+)");
+ Pattern.compile("^((?<package>[^:]+):)?(?<type>\\w+)/(?<name>[A-Za-z0-9_.]+)$");
public static FullyQualifiedName fromReference(
String qualifiedReference, Optional<String> packageName) {
