add support for TYPE_DYNAMIC_ATTRIBUTE

This commit is contained in:
Connor Tumbleson 2016-09-15 08:36:25 -04:00
parent 7801a4bbf2
commit bdfc28c20f
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75
2 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,11 @@ public class TypedValue {
* resolved before it can be used like TYPE_REFERENCE * resolved before it can be used like TYPE_REFERENCE
*/ */
public static final int TYPE_DYNAMIC_REFERENCE = 0x07; public static final int TYPE_DYNAMIC_REFERENCE = 0x07;
/**
* The <var>data</var> an attribute resource identifier, which needs to be resolved
* before it can be used like a TYPE_ATTRIBUTE.
*/
public static final int TYPE_DYNAMIC_ATTRIBUTE = 0x08;
/** /**
* Identifies the start of plain integer values. Any type value from this to * Identifies the start of plain integer values. Any type value from this to
* {@link #TYPE_LAST_INT} means the <var>data</var> field holds a generic * {@link #TYPE_LAST_INT} means the <var>data</var> field holds a generic

View File

@ -55,6 +55,7 @@ public class ResValueFactory {
case TypedValue.TYPE_INT_BOOLEAN: case TypedValue.TYPE_INT_BOOLEAN:
return new ResBoolValue(value != 0, value, rawValue); return new ResBoolValue(value != 0, value, rawValue);
case TypedValue.TYPE_DYNAMIC_REFERENCE: case TypedValue.TYPE_DYNAMIC_REFERENCE:
case TypedValue.TYPE_DYNAMIC_ATTRIBUTE:
return newReference(value, rawValue); return newReference(value, rawValue);
} }