You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android: Is there any way to allow touching outside the BottomSheet without closing the bottomsheet! Is it possible to behave like standard sheet and not like a modal sheet
#404
Open
Frizbi22 opened this issue
Nov 27, 2023
· 2 comments
I have tried this but no luck!!
var bottomSheetDialog = new BottomSheetDialog(Platform.CurrentActivity?.Window?.DecorView.FindViewById(Android.Resource.Id.Content)?.Context ?? throw new InvalidOperationException("Context is null"));
bottomSheetDialog.SetContentView(bottomSheetContent.ToPlatform(page.Handler?.MauiContext ?? throw new Exception("MauiContext is null")));
// Allow touches on the underlying page
bottomSheetDialog.Window?.ClearFlags(WindowManagerFlags.NotTouchable);
bottomSheetDialog.Window?.ClearFlags(WindowManagerFlags.DimBehind);
bottomSheetDialog.Window?.ClearFlags(WindowManagerFlags.NotFocusable);
// Set the behavior of the bottom sheet
bottomSheetDialog.Behavior.Hideable = true;
bottomSheetDialog.Behavior.FitToContents = true;
bottomSheetDialog.SetCancelable(true);
bottomSheetDialog.Behavior.HalfExpandedRatio = 0.5f;
bottomSheetDialog.Show();
return bottomSheetDialog;
on iOS is working as intended when using medium or large detents!
The text was updated successfully, but these errors were encountered:
Frizbi22
changed the title
Is there any way to allow touching outside the BottomSheet without closing the it!
Android: Is there any way to allow touching outside the BottomSheet without closing the bottomsheet!
Nov 27, 2023
Frizbi22
changed the title
Android: Is there any way to allow touching outside the BottomSheet without closing the bottomsheet!
Android: Is there any way to allow touching outside the BottomSheet without closing the bottomsheet! Is it possible to behave like standard sheet and not like a modal sheet
Nov 28, 2023
I have tried that but bottomSheetDialog.Behavior.Hideable is a property that determines whether the bottom sheet is responsive to drag gestures. Sadly i found no solution for it
The text was updated successfully, but these errors were encountered: