Acr.UserDialogs is a plugin that makes it possible to use several standard user dialogs from code that are shared between platforms. To install and configure it, there are a few steps we need to follow:
- Install the Acr.UserDialogs NuGet package for the Chat-, Chat.iOS, and Chat.Android projects.
- In the MainActivity.cs file, add UserDialogs.Init(this) to the OnCreate method:
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
UserDialogs.Init(this);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
}