ResStringValue: added possibility to set type name.

This commit is contained in:
Ryszard Wiśniewski 2010-03-21 19:50:35 +01:00
parent 1441587bd7
commit 1d4d4e341c
2 changed files with 7 additions and 4 deletions

View File

@ -27,7 +27,11 @@ public class ResStringValue extends ResScalarValue
private final String mValue;
public ResStringValue(String value) {
super("string");
this(value, "string");
}
public ResStringValue(String value, String type) {
super(type);
this.mValue = value;
}

View File

@ -19,8 +19,6 @@ package brut.androlib.res.data.value;
import brut.androlib.AndrolibException;
import brut.androlib.res.data.ResPackage;
import brut.androlib.res.data.ResTable;
import brut.androlib.res.data.ResType;
import brut.androlib.res.jni.JniBagItem;
import brut.androlib.res.jni.JniEntry;
import java.util.LinkedHashMap;
@ -103,8 +101,9 @@ public class ResValueFactory {
return new ResFileValue(entry.strVal);
}
case TYPE_DIMENSION:
return new ResStringValue(entry.strVal, "dimen");
case TYPE_FRACTION:
return new ResStringValue(entry.strVal);
return new ResStringValue(entry.strVal, "fraction");
}
throw new AndrolibException(String.format(
"Unknown value type for %s/%s: ",