如何用jetpack compose制作两个圆圈

Nul*_*ull 8 android android-jetpack-compose kotlin-android

我想用jetpack compose制作这个形状我该怎么做?在此输入图像描述

Gab*_*tti 10

你有不同的选择。
其中之一是简单BoxIcon

//external circle
Box( 
    contentAlignment= Alignment.Center,
    modifier = Modifier
        .size(32.dp)
        .border(
            width = 2.dp,
            color = Blue900,
            shape = CircleShape
        ),
){
    //internal circle with icon
    Icon(
        imageVector = Icons.Filled.Check,
        contentDescription = "contentDescription",
        modifier = Modifier
            .size(24.dp)
            .background(Blue900, CircleShape)
            .padding(2.dp),
        tint = Blue200
    )
}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述