I cant understand how i can make this shape with short bottom angle.button i need to do
I tried searching information about shapes and only found about rounded corners.
>Solution :
You can use CutCornerShape like this:
Button(
onClick = { /*TODO*/ },
shape = CutCornerShape(
topStart = 0f,
topEnd = 0f,
bottomEnd = 0f,
bottomStart = 100f
),
colors = ButtonDefaults.buttonColors(backgroundColor = Color.Green.copy(alpha = 0.25f)),
border = BorderStroke(width = 1.dp, Color.Green),
contentPadding = PaddingValues(horizontal = 64.dp)
) {
Text(
text = "Button",
color = Color.Green
)
}
The effect:
