How do you implement the bottom sheet specficiation? http://www.google.com/design/spec/components/bottom-sheets.html
The new update to Google Drive shows this with
Following the blog post: http://android-developers.blogspot.com/2016/02/android-support-library-232.html
My xml ended up looking like this:
And in my onCreateView of my fragment:
coordinatorLayout = (CoordinatorLayout)v.findViewById(R.id.coordinator_layout);
View bottomSheet = coordinatorLayout.findViewById(R.id.bottom_sheet);
BottomSheetBehavior behavior = BottomSheetBehavior.from(bottomSheet);
behavior.setPeekHeight(100);
behavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
@Override
public void onStateChanged(@NonNull View bottomSheet, int newState) {
// React to state change
}
@Override
public void onSlide(@NonNull View bottomSheet, float slideOffset) {
// React to dragging events
}
});
The default of setPeekHeight is 0, so if you don't set it, you won't be able to see your view.