【问题标题】:how to make two circles with jetpack compose如何使用 Jetpack Compose 制作两个圆圈
【发布时间】:2022-11-28 03:07:31
【问题描述】:

我想用jetpack compose做这个形状怎么办?

【问题讨论】:

    标签: android android-jetpack-compose kotlin-android android-compose-icon


    【解决方案1】:

    你有不同的选择。
    其中之一是一个简单的Box和一个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
        )
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-27
      • 2022-10-14
      • 1970-01-01
      • 2022-07-03
      • 1970-01-01
      • 2022-09-23
      • 2021-06-21
      • 1970-01-01
      相关资源
      最近更新 更多