For example, there is an ImageView and you can try to stylize it through shape, but with the help of shapes it is not very convenient and there are too few options.
How can I cut any twist and give it a free form so that it can be programmatically changed its color later?

  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

Starting from API 21 and from revision 23.2 of the google support library, the class VectorDrawable added to support devices with API <21,

You can draw a rather complex background in SVG with the help of any vector editor, like Inkscape. Android Studio converts an SVG image to VectorDrawable using the built-in Vector Assets Studio tool , then you can use it as a background like any other graphic resource.

You can change the color of such an image using the android:tint and android:tintMode (programmatically setTint() , setTintMode() ), as well as the setColorFilter() method, depending on the desired result.

On creating an arbitrary form for any widget, see this answer.