I would like to add text to a layer-list xml file that is used as a drawable background for a Switch element. The problem is the text in the switch element changes before th
With the new api21 you can use VectorDrawables to do something like you want. Here is an example:
-
That will use a drawable vector like the following:
This will generate a list-layer drawable like the following:
Most image tools (gimp, photoshop, illustrator, etc.) give you the ability to export the path that can be used for the vector graphic.
Checkout the gist at github!