Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

await DisplayAlert pop up when I press back button on Android

$
0
0

Hi my friends.
This is my first thread, so have patience with me and with my poor english.
I've this situation in a ContentPage
var buttonLogout = new Button ();
buttonLogout.Text = "Logout";
buttonLogout.Clicked += async (sender, e) => {
var answer = await DisplayAlert("Logout", "Terminare il turno di lavoro?", "Si", "No");
// if(answer)
//
};

If I press "logout" button on my page, the "Terminare..." message appears.
If I press back button on Android Simulator (after the "logout" button), the "Terminare..." message appears again....
Why does it appear me twice?

Thanks
Alessandro


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>