mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 05:47:46 +01:00
fixing bad color
This commit is contained in:
parent
026b394db4
commit
5c31f4de8e
@ -16,22 +16,16 @@
|
|||||||
|
|
||||||
package brut.androlib.res.data.value;
|
package brut.androlib.res.data.value;
|
||||||
|
|
||||||
import android.util.TypedValue;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
|
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
|
||||||
*/
|
*/
|
||||||
public class ResColorValue extends ResIntValue {
|
public class ResColorValue extends ResIntValue {
|
||||||
private int type;
|
public ResColorValue(int value, String rawValue) {
|
||||||
|
|
||||||
public ResColorValue(int value, String rawValue, int type) {
|
|
||||||
super(value, rawValue, "color");
|
super(value, rawValue, "color");
|
||||||
this.type = type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String encodeAsResXml() {
|
protected String encodeAsResXml() {
|
||||||
return TypedValue.coerceToString(type, mValue);
|
return String.format("#%08x", mValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -52,7 +52,7 @@ public class ResValueFactory {
|
|||||||
|
|
||||||
if (type >= TypedValue.TYPE_FIRST_COLOR_INT
|
if (type >= TypedValue.TYPE_FIRST_COLOR_INT
|
||||||
&& type <= TypedValue.TYPE_LAST_COLOR_INT) {
|
&& type <= TypedValue.TYPE_LAST_COLOR_INT) {
|
||||||
return new ResColorValue(value, rawValue, type);
|
return new ResColorValue(value, rawValue);
|
||||||
}
|
}
|
||||||
if (type >= TypedValue.TYPE_FIRST_INT
|
if (type >= TypedValue.TYPE_FIRST_INT
|
||||||
&& type <= TypedValue.TYPE_LAST_INT) {
|
&& type <= TypedValue.TYPE_LAST_INT) {
|
||||||
|
Loading…
Reference in New Issue
Block a user