I
I
Ilya Pavlovsky2016-05-03 17:23:02
Android
Ilya Pavlovsky, 2016-05-03 17:23:02

XML Drawable from file - is it possible?

The android API contains such a magical class as Drawable, which has two methods:
1) createFromPath(String path)
2) createFromStream(InputStream is,String name)
So, the question is of this nature. When I try to load .png or nine-patch from local storage, everything is great, but everything is bad with compound XML, I constantly get null. Maybe there are ready-made solutions for parsing Drawable-XML from FS to get StateListDrawable/LevelListDrawable ? I don't want to turn this thing around by hand.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question