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 guess it is not possible using google's design library, since by design this is meant to appear from the bottom.
https://material.io/guidelines/components/bottom-sheets.html
"Bottom sheets slide up from the bottom of the screen to reveal more content."
Trying using this modified version of flipboard's bottomsheet
https://github.com/jernkuan/bottomsheet
I have added an attr to control whether the bottomsheet should appear from the top.
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.)