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
- DataBinding
- recyclerview
- 알고리즘
- LiveData
- View
- CoordinatorLayout
- activity
- AppBarLayout
- 안드로이드
- 알림
- Algorithm
- lifecycle
- ViewModel
- onMeasure
- Behavior
- Coroutine
- CustomView
- 백준
- sqlite
- Navigation
- kotlin
- CollapsingToolbarLayout
- HTTP
- notification
- BOJ
- room
- 코틀린
- hilt
- onLayout
- Android
Archives
- Today
- Total
개발일지
삽질 - CoordinatorLayout RecyclerView 본문
CoordinatorLayout자식뷰들의 상호작용을 도와준다. 보통 자식뷰에 Behaviors를 지정하여 스크롤시 효과를 주기도 한다. ScrollView는 Behaviros를 못주지만 NestedScrollView와 RecyclerView는 줄 수 있다.
만약 CoordinatorLayoutAppbarLayout RecyclerView구조에서 RecyclerView에게 Behaviors를 주지 않는 경우 AppbarLayout에 RecyclerView가 겹쳐서 안보이고 상호작용을 할 수 없다.
해결코드
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
'삽질' 카테고리의 다른 글
삽질 - SQLite Add Foreign Key (0) | 2021.01.18 |
---|---|
삽질 - Android CoordinatorLayout Floating Action Button (0) | 2020.12.10 |
삽질 - Android CollapsingToolbarLayout Title (0) | 2020.12.09 |
삽질 - Android Scroll View Child View match_parent (0) | 2020.12.04 |
삽질 - Android ForegroundService (0) | 2020.11.29 |
Comments