How to create this in compose?
# compose
j
How to create this in compose?
j
You most probably want to use Beizer curvers, like https://medium.com/@kezhang404/either-compose-is-elegant-or-if-you-want-to-draw-something-with-an-android-view-you-have-to-7ce00dc7cc1 You can draw on Canvas or using shapes paths as of example.
If want exact formula for that image can always send the input to ChatGpt or such and ask it for formula to be used for that image 🙂
m
It's easier to load it as an SVG
m
Isn’t this just the corner of a rotated, green rectangle with rounded corners clipped to another rectangle with a dark background. And why should loading this as an SVG be easier especially as Android does not directly support SVG, in contrast to all other compose platforms, and you have to create the SVG anyway which means having to apply the same logic just with some other tool.
m
@Michael Paus I'm not talking about this one specifically, but in general if I have a design and I need to implement something like this. It's always easier to export it as an svg and use it (AS will convert it to XML anyway)