I\'m opening a NestedScrollView in my app and so far it opens from the bottom of the screen. How do I make it open from the top?
I tried removing the following line:
I'm not sure this is what you want, but the following link is a 'top' version of BottomSheetBehavior.
https://github.com/ipuris/AndroidTopSheet/blob/master/library/src/main/java/com/github/techisfun/android/topsheet/TopSheetBehavior.java
Full code including example app: https://github.com/ipuris/AndroidTopSheet
Include the TopSheetBehavior
class to your project, then you can use it by changing the app:layout_behavior
value to TopSheetBehavior
instead of android.support.design.widget.BottomSheetBehavior
.
Above code is forked from the original repository, but I fixed some library dependencies (old android.support
library -> androidx
library) for latest version of Android.
(Maybe this answer is too late for @jernkuan, but I hope this answer can be helpful other developers.)