XF-Material-Library icon indicating copy to clipboard operation
XF-Material-Library copied to clipboard

Add IsDismissable Parameter in the constructor of MaterialDialog

Open ske66 opened this issue 4 years ago • 0 comments

🏗 Enhancement Proposal

Add an optional parameter to MaterialDialog constructor defining whether or not the dialog is dismissable, i.e does not allow the user to dismiss the dialog by tapping off screen.

Pitch

Users can accidently tapoff Dialog boxes, closing them. This can be problematic when dealing with input dialogs that require an answer from the user. By including an isDismissable option, this stops developers from writing clauses to catch null values being returned, decreasing total overall code required.

Additionally, key dialogs that require immediate attention can be constantly focused without having to include additional code to re-open dialogs on close (as is happening with my application).

proposed change;

MaterialDialog.Instance.ShowCustomContentAsync(view: new View(), message: "hello world", title: "title", isDismissable: false);

isDismissable should be set to true by default.

Platforms affected (mark all that apply)

  • [x] :iphone: iOS
  • [x] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [x] :monkey: Xamarin.Forms

ske66 avatar Apr 10 '20 08:04 ske66