Profile

성빈이의 기록장

성빈이

[Compose] ConstraintLayout 사용시 주의할 점

728x90

Jetpack Compose에서 ConstraintLayout을 사용할 때 

.constrainAs(events) {
    top.linkTo(parent.top)
    bottom.linkTo(bottomBar.top)
    height = Dimension.fillToConstraints
}

위 코드처럼 height에 제약을 줬다면

 

height = Dimension.fillToConstraints

 

이런식으로 또 높이 설정을 해줘야 정상작동 한다.

width도 마찬가지.