1:1 비율1 [Android/Kotlin] 안드로이드 ConstraintLayout에서 1:1 비율로 뷰 설정하기 ConstraintLayout에서 layout_constraintDimensionRatio 사용법 ConstraintLayout은 매우 유연하고 강력한 레이아웃 시스템으로, layout_constraintDimensionRatio 속성을 사용하여 너비와 높이의 비율을 쉽게 설정할 수 있습니다.예를 들어, 너비와 높이를 1:1 비율로 설정하고 싶은 경우 다음과 같이 코드를 작성할 수 있습니다. 여기서 android:layout_width와 android:layout_height를 둘 다 0dp로 설정하고, app:layout_constraintDimensionRatio 속성을 1:1로 설정합니다.이 속성은 너비와 높이의 비율을 지정하는 것으로, 1:1은 너비와 높이가 동일하게 설정된다.. 2024. 6. 10. 이전 1 다음 반응형