简体   繁体   English

Jetpack Compose 中的 ConstraintLayout 剪辑不起作用

[英]Clip in ConstraintLayout in Jetpack Compose not working

I want to make corners of ConstraintLayout rounded without using CardView.我想在不使用 CardView 的情况下使 ConstraintLayout 的角变圆。 My current code is this but not working我当前的代码是这样的,但不起作用

ConstraintLayout(
    modifier
        .fillMaxWidth()
        .clip(RoundedCornerShape(100.dp))
        )
{...}

It is working guys, I just added background after clip() and it's working fine.它正在工作,我只是在 clip() 之后添加了背景并且它工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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