@BindingAdapter("behavior_bottomSheetCallback") public static void bindBottomSheetCallback(final View view, final BottomSheetCallback callback) { final BottomSheetBehavior<View> behavior = BottomSheetBehavior.from(view); if (behavior == null) throw new IllegalArgumentException(view + " has no BottomSheetBehavior"); behavior.setBottomSheetCallback(callback); }