Android Disable drag at BottomSheet

사용 언어: Kotlin 1.7.20
사용 버전: Android Studio Dolphin 2021.3.1

안드로이드 Disable drag at BottomSheet를 알아보겠습니다.


BottomSheet는 기본적으로 사용자가 아래로 끌어내려서 사라지게 만들 수 있습니다.
이 기능을 비활성화해서 사라지지 않게 만들 겁니다.

아래는 기본 동작 화면입니다.







BottomSheetBehavior을 사용합니다.

BottomSheetBehavior.from()을 사용하여 가져올 BottomSheet의 BottomSheetBehavior를 불러옵니다.

여기에 isDraggable을 false로 설정하면 됩니다.







실행해 봅시다.






끝.



카테고리: Android


댓글

이 블로그의 인기 게시물

Python urllib.parse.quote()

Android Notification with Full Screen

KiCad 시작하기 4 (기존 회로도 수정 및 추가)

KiCad 시작하기 3 (새로운 소자 추가하기)

딩기 요트 명칭

tensorflow tf.expand_dims()

Android App architecture: State holders and UI state

Android Room database FTS

외동 휴게소(부산 방향) 추천 메뉴

KiCad 시작하기 2 (PCB 만들기)