简体   繁体   中英

how to make two circles with jetpack compose

I want to make this shape with jetpack compose how can I do it? 在此处输入图像描述

You have different options.
One of them is a simple Box with an Icon :

//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
    )
}

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM