Loading tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java +14 −2 Original line number Diff line number Diff line Loading @@ -772,8 +772,20 @@ public final class BridgeTypedArray extends TypedArray { */ @Override public boolean getValue(int index, TypedValue outValue) { // TODO: more switch cases for other types. outValue.type = getType(index); switch (outValue.type) { case TYPE_NULL: return false; case TYPE_STRING: outValue.string = getString(index); return true; default: // For back-compatibility, parse as float. String s = getString(index); return s != null && ResourceHelper.parseFloatAttribute(mNames[index], s, outValue, false); return s != null && ResourceHelper.parseFloatAttribute(mNames[index], s, outValue, false); } } @Override Loading Loading
tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java +14 −2 Original line number Diff line number Diff line Loading @@ -772,8 +772,20 @@ public final class BridgeTypedArray extends TypedArray { */ @Override public boolean getValue(int index, TypedValue outValue) { // TODO: more switch cases for other types. outValue.type = getType(index); switch (outValue.type) { case TYPE_NULL: return false; case TYPE_STRING: outValue.string = getString(index); return true; default: // For back-compatibility, parse as float. String s = getString(index); return s != null && ResourceHelper.parseFloatAttribute(mNames[index], s, outValue, false); return s != null && ResourceHelper.parseFloatAttribute(mNames[index], s, outValue, false); } } @Override Loading