티스토리 뷰

300x250
300x250



RecyclerView 상단과 하단에 padding 이 있는 경우 스크롤 시 패딩 공간을 사용하지 못한다.

패딩 공간 까지 스크롤 영역으로 사용하고 싶다면 clipToPadding 옵션을 사용하면 된다.

 

참고로, 지난 포스팅 내용은 하단과 같다.

◼ ItemDecoration

[Android/UI] - RecyclerView (8) - RecyclerView 에 ItemDecoration 으로 구분선 및 여백 설정

 

◼ image + text 출력, click 처리, menu 출력, Item 삽입, 수정, 삭제, header, footer 달기

[Android/UI] - RecyclerView (7) - RecyclerView 에 header, footer 달기

[Android/UI] - RecyclerView (6) - RecyclerView item 추가, 수정, 삭제

[Android/UI] - RecyclerView (5) - RecyclerView item long click 시 popup menu 출력하기

[Android/UI] - RecyclerView (4) - RecyclerView item click 시 context menu 출력하기

[Android/UI] - RecyclerView (3) - RecyclerView item 의 click 처리하기

[Android/UI] - RecyclerView (2) - RecyclerView 에 image + text 출력하기



clipToPadding

clipToPadding 의 기본값은 true 이며 false 로 설정하면 패딩 공간을 스크롤 영역으로 사용한다.

 

하단은 stackoverflow 에서 발췌한 예시 그림이다.

 

◼ 출처

https://stackoverflow.com/questions/40953049/android-what-does-the-cliptopadding-attribute-do

 

Android what does the clipToPadding Attribute do?

I would like to know what the clipToPadding attribute does for ViewGroup in Android ? I've been through the docs and some websites but none I have come across actually explain what it does and wha...

stackoverflow.com



728x90
댓글