@Override
            public void onStateChanged(final @NonNull View bottomSheet, final int newState) {
                if (newState != BottomSheetBehavior.STATE_DRAGGING && closeOnRelease) {
                    dialog.dismiss();
                } else {
                    updateActionbarAfterStateChange(dialog, dialogView);
                }
            }
create a bottom sheet dialog with action bar
main/src/main/java/cgeo/geocaching/ui/dialog/Dialogs.java