From 921eae6b8d45f6f20b2452f2146cd0637544c8f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20Wi=C5=9Bniewski?= Date: Tue, 23 Mar 2010 23:58:06 +0100 Subject: [PATCH] ResReferenceValue.toResXmlFormat(): adding plus sign for references to ResIdValue. --- src/brut/androlib/res/data/value/ResReferenceValue.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/brut/androlib/res/data/value/ResReferenceValue.java b/src/brut/androlib/res/data/value/ResReferenceValue.java index 9f6942fa..e06834ea 100644 --- a/src/brut/androlib/res/data/value/ResReferenceValue.java +++ b/src/brut/androlib/res/data/value/ResReferenceValue.java @@ -44,9 +44,15 @@ public class ResReferenceValue extends ResIntValue { return "@null"; } + ResResSpec spec = getReferent(); + boolean newId = + spec.hasDefaultResource() && + spec.getDefaultResource().getValue() instanceof ResIdValue; + return (mTheme ? '?' : '@') + - getReferent().getFullName(mPackage, mTheme); + (newId ? "+" : "") + + spec.getFullName(mPackage, mTheme); } public ResResSpec getReferent() throws AndrolibException {