Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Collections Function
- Room
- multipart
- NumberPIcker
- 화면 회전
- kotlin
- json
- RecyclerView
- Load failed
- studywithme
- http
- Navigation
- 기기고유값
- DialogFragment
- log
- todo
- layout_constrainedWidth
- BottomSheetDialogFragment
- gradle plugin
- findNavController
- ThreeTen Backport
- WorkManager
- DataBinding
- SSAID
- layout_constrainedHeight
- Retrofit2
- 생명주기
- Popup menu background color
- Android
- Lifecycle
Archives
- Today
- Total
목록layout_constrainedWidth (1)
chacha's

ConstraintLayout을 사용할 때 layout_height = "wrap_content"로 지정하면 제약 조건에 맞게 알아서 설정될 줄 알았다. 하지만 아이템의 개수가 많아지면 버튼 아래 쪽으로 뷰가 넘어가는 문제가 발생하였습니다. 이 경우, layout_constrainedHeight="true" 속성을 사용하면 제약조건에 맞게 뷰가 넘어가지 않는 것을 확인할 수 있습니다. 📌 RecyclerView 외에도 TextView와 같이 길이가 변하는 뷰를 설정할 때, app:layout_constrainedWidth=”true”, app:layout_constrainedHeight=”true” 속성을 사용하여 제약조건에 맞게 뷰를 설정할 수 있습니다. END
Android/TIL
2021. 12. 24. 13:35