I have some custom class BitmapStorage, not attached to any View or whatever - an utility one. And I have born_animation.xml file which contains with
This could be used to load resources from the "xml" directory.
Drawable myDrawable; Resources res = getResources(); try { myDrawable = Drawable.createFromXml(res, res.getXml(R.xml.my_drawable)); } catch (Exception ex) { Log.e("Error", "Exception loading drawable"); }