added support for TYPE_DYNAMIC_REFERENCE

This commit is contained in:
Connor Tumbleson 2014-11-20 20:36:15 -06:00
parent fb67c0cd15
commit 554591a339
2 changed files with 7 additions and 1 deletions

View File

@ -51,7 +51,11 @@ public class TypedValue {
* container.
*/
public static final int TYPE_FRACTION = 0x06;
/**
* The <var>data</var> holds a dynamic res table reference, which needs to be
* resolved before it can be used like TYPE_REFERENCE
*/
public static final int TYPE_DYNAMIC_REFERENCE = 0x07;
/**
* 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

View File

@ -48,6 +48,8 @@ public class ResValueFactory {
return new ResFractionValue(value, rawValue);
case TypedValue.TYPE_INT_BOOLEAN:
return new ResBoolValue(value != 0, rawValue);
case TypedValue.TYPE_DYNAMIC_REFERENCE:
return newReference(value, rawValue);
}
if (type >= TypedValue.TYPE_FIRST_COLOR_INT