support loading BitmapDrawables from XML

This commit is contained in:
Julian Winkler
2023-12-30 17:31:56 +01:00
parent 493cb8284a
commit b393a6bf1d
2 changed files with 26 additions and 0 deletions

View File

@@ -123,6 +123,10 @@ public class Drawable {
return drawable;
} else if ("shape".equals(parser.getName())) {
return new GradientDrawable();
} else if ("bitmap".equals(parser.getName())) {
BitmapDrawable drawable = new BitmapDrawable();
drawable.inflate(resources, parser, parser, null);
return drawable;
}
return null;
}