Tries to resolve reference resource names instead of its data.

Example: @16974751 can be resolved to android:style/TextApperance.Material.

Bug: 17446752
Change-Id: I3ffede3ecc8689badd646a27d50a7a73ce45cf86
This commit is contained in:
Jon Miranda
2014-09-09 17:06:31 -07:00
parent 042ad633bc
commit 7c744bdbf3

View File

@@ -875,6 +875,11 @@ public class ViewDebug {
data[i + 1] = theme.resolveAttribute(attributeId, outValue, true) ?
outValue.coerceToString().toString() : nullString;
i += 2;
// attempt to replace reference data with its name
if (outValue.type == TypedValue.TYPE_REFERENCE) {
data[i - 1] = resources.getResourceName(outValue.resourceId);
}
} catch (Resources.NotFoundException e) {
// ignore resources we can't resolve
}