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 | 31 |
Tags
- LiveData
- View
- 알고리즘
- BOJ
- room
- kotlin
- hilt
- Android
- 코틀린
- recyclerview
- CustomView
- Algorithm
- onMeasure
- onLayout
- CoordinatorLayout
- AppBarLayout
- 안드로이드
- sqlite
- Coroutine
- Navigation
- lifecycle
- 알림
- CollapsingToolbarLayout
- ViewModel
- 백준
- activity
- HTTP
- DataBinding
- notification
- Behavior
Archives
- Today
- Total
목록Space (1)
개발일지

StaggeredGridLayoutManager를 이용한 RecyclerView에서 ViewHolder에 Margin을 설정하면 배치가 이상해지는 오류가 발생했다. => gapStrategy를 설정하자 with(binding.recyclerView) { adapter = MovieAdapter() addItemDecoration(GridSpacingItemDecoration(2, 5.toDp())) layoutManager = StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL).apply { gapStrategy = StaggeredGridLayoutManager.GAP_HANDLING_NONE } }
삽질
2021. 1. 20. 20:48