The Beautiful Future

bottom sheet 본문

Android

bottom sheet

Small Octopus 2019. 10. 2. 17:17

android bottom sheet 정리

바텀 시트에는 두종류가 있다.
persistendt bottom sheet 와 modal bottom sheet 가있다.
- Persistendt bottom sheet
인앱 컨테스츠를 표시한다. 앱의 일부를 보여주면서 바닥에서 생성된다.

- Modal bottom sheet
앱보다 우선 순위가 높다. 뒤에 있는 앱이 디스애이블 되는 형식인거 같다


xml 생성
app:layout_behavior: 에 android.support.design.widget.BottomSheetBehavior 을 지정해야 바텀시트로 동작한다.
app:behavior_peekHeight: 최소화 되었을때 높이를 지정할 수 있다.
app:behavior_hideable: 아래로 밀면 바텀시트가 숨겨진다.

바텀시트로 부터의 콜백 받을 때
sheetBehavior.setBottomSheetCallback(

바텀시트를 조작할때 
sheetBehavior.setState

Modal bottom sheet의 차이점은?
persistendt의 경우 레이아웃에 인클루드 되었지만 
modal은 BottomSheetDialog 또는 BottomSheetDialogFragment을 
이용해서 팝업한다.


'Android' 카테고리의 다른 글

camera  (0) 2019.10.02
BottomSheet  (0) 2019.07.16
jnu structure return  (0) 2019.05.20
Android OpenCL  (0) 2017.10.17
ubuntu 16.04에 설치하기  (0) 2017.06.14
Comments