Configure ShapeDrawable from xml

  • Thread starter Thread starter Android Central Question
  • Start date Start date
A

Android Central Question

I was wondering whether there exists an easy way to construct a ShapeDrawable object in Java from XML drawable resource for use in a Canvas (or custom view)?

I know there is an "inflate" function but as far as I've understood, one have to implement a new XMLParser and this seems like a lot of work to get a simple object on screen.
 
I moved this to the Software Development forum for more specific traffic.