I have the following in my Xamarin.Forms project:
`if (ShouldShowRequestPermissionRationale(permission))
{
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.SetTitle("Location permission needed");
alert.SetPositiveButton("Allow", (senderAlert, args) =>
{
RequestPermissions(PermissionsGroupLocation, RequestLocationId);
});
alert.SetNegativeButton("Cancel", (senderAlert, args) =>
{
Toast.MakeText(this, "Cancelled", ToastLength.Short).Show();
});
Dialog dialog = alert.Create();
dialog.Show();
return;
}`
I'd like to make it into a snackbar so it doesn't block the main page and dismisses itself after a few seconds
The main problem is that Snackbar.Make() takes a view as its first parameter but I'm using Xamarin Forms