Hi everyone đ I would like to create a Composable that looks like the first picture : rounded corners (circle shape) only on the right side. Do do that I use
RoundedCornerShape(0.dp, 28.dp, 28.dp, 0.dp)
.
the problem is that I need to keep them same CornerSize even when the composable width is really small (see the second picture). RoundedCornerShape adapts the corner size (see the third picture in greyscale)
does anyone have a hint on how to achieve such rendering ? Many thanks !
@Tin Tran I think this would round corners from both sides.
l
Luis
08/25/2021, 11:45 AM
Thatâs it, RoundedCornerShape supports percentages, for individual corners as well
b
BenjO
08/25/2021, 12:20 PM
using percentages results in the same shape (see picture 3) when width is really small
BenjO
08/25/2021, 12:24 PM
it's because of CornerBasedShape internals. CornizerSize is adapted when width is less than what the CornerSize asks for.
I don't know if I need to dive into creating my Shape or looking for another way to render this
t
Tin Tran
08/25/2021, 12:30 PM
I think in this case youâll have to create your own shape