How to draw a similar shape in xml. And is it worth drawing it, or is it better to use png (it will be used as a button and will be further animated)

enter image description here

    1 answer 1

    Use 9-patch png . Add a frame of one pixel thickness to the image, which will contain information for stretching the image and placing content on it. here is an example

    And change the file extension to filename.9.png

    In the future, this image can be used as a background, which will stretch in the right places, in the same way different clouds are made for dialogues, etc.

    You can also convert using png to 9-patch services.