I am trying to create A UI Components like below
As Part of this i split the task into two , the curved bump and the rectangle.
The curved bump code is below
@Composable
fun TriangularCurve() {
Box(
modifier = Modifier
.fillMaxSize()
.rotate(-90f),
contentAlignment = Alignment.Center
) {
val curvePath = createGaussianPath(0.5f, 0.65f, 0.44f)
Box(
modifier = Modifier
.fillMaxSize()
.background(onboardingSideBarColour, shape = curvePath),
contentAlignment = Alignment.Center
) {
ConcentricCircles(
innerRadius = 39.dp,
outerRadius = 44.dp,
innerColor = onboardingSideBarColour,
outerColor = Color.White
)
Icon(
painter = painterResource(id = R.drawable.arrowdouble),
contentDescription = stringResource(id = R.string.arrow_icon_description),
tint = Color.White,
modifier = Modifier
.size(50.dp)
.rotate(270f)
)
}
}
}
and it looks like this
then there is the rectangular component
@Composable
fun Rectangle() {
Box(
modifier = Modifier
.fillMaxHeight()
.width(20.dp)
.background(onboardingSideBarColour) // Background color for the rectangle
)
}
How can i combine them both side by side like the image at the very top?