A cross platform library that allows you to call for standard user dialogs from a shared/portable library. Supports Android, iOS, Windows Phone 8.0 (silverlight), and Unified Windows Platform (UWP, UAP)
- Action Sheet (multiple choice menu)
- Alert
- Confirm
- Loading
- Login
- Progress
- Prompt
- Toasts
- examples
To use, simply reference the nuget package in each of your platform projects.
Nothing is necessary any longer as of v4.x
UserDialogs.Init(this);
In your android project, use Acr.UserDialogs.Android.AppCompat from nuget instead of Acr.UserDialogs. Call the Init just like above. Xamarin Forms Users: DO NOT use appcompat unless you know how to use AppCompat. Please wait for Xamarin to update to this or use an open source alternative
All config objects contain static vars that contain defaults which are basically used as a poor man's stylesheet. These save you time of always have to pass what the text for OK should be. This is particularily useful for multilingual applications.
- ActionSheetConfig
- DefaultCancelText
- DefaultDestructiveText
- DefaultItemIcon
- AlertConfig
- DefaultOkText
- ConfirmConfig
- DefaultYes
- DefaultNo
- DefaultOkText
- DefaultCancelText
- LoginConfig
- DefaultTitle
- DefaultOkText
- DefaultCancelText
- DefaultLoginPlaceholder
- DefaultPasswordPlaceholder
- ProgressDialogConfig
- DefaultCancelText
- DefaultTitle
- DefaultMaskType
- PromptConfig
- DefaultOkText
- DefaultCancelText -ToastConfig
- InfoIcon
- InfoBackgroundColor
- InfoTextColor
- SuccessIcon
- SuccessBackgroundColor
- SuccessTextColor
- WarnIcon
- WarnBackgroundColor
- WarnTextColor
- ErrorIcon
- ErrorBackgroundColor
- ErrorTextColor
- DefaultDuration
-
I'm using Xamarin Forms and getting a nullreferenceexception when using loading
- This happens when you run loading (or almost any dialog) from the constructor of your page or viewmodel. The view hasn't been rendered yet, therefore there is nothing to render to.
-
Is Windows 8 Support?
- No. I never got around to this, but I'm going to support 10 as soon as I figure it out. It is in a very betaish mode now. I'm hoping someone will help in this area!!
-
Is AppCompat/Material Dialogs supported on Android?
- Yes. It a separate package. Please make sure to install Acr.UserDialogs to your PCL, but when installing on your android project.
-
A new release just came out and the MvvmCross plugin is broken
- I don't update the MvvmCross plugin right along side Acr.UserDialogs. I'm happy to take a PR
-
Do you take pull requests?
- Absolutely. I may not always accept them, but I do appreciate the help.
-
I'm getting "This is the PCL library, not the platform library. Did you include the nuget package in your main "executable" project?"
- Do exactly what it says
-
Navigating while inside of a loading/progress dialog causes exceptions or the progress no longer appears properly
- Hide the progress dialog before navigating
-
I don't like the way X method works on platform Y
- No problems. Override the implementation like below
on the platform public class MyCustomUserDialogs : Acr.UserDialogs.UserDialogImpl { public override .. }
in appdelegate or the starting activity UserDialogs.Instance = new MyCustomUserDialogs();
- Android - Progress/Loading uses Redth's AndHUD
- iOS - Progress/Loading uses Nic Wise's BTProgressHUD
- iOS - Toasts powered by Xamarin-iOS-MessageBar by @prashantvc (https://github.com/prashantvc/Xamarin.iOS-MessageBar)
- WinPhone - All dialogs by WPToolkit
- UWP - Coding4Fun Toolkit (http://coding4fun.codeplex.com)
- Splat - Provides a nice layer of xplat stuff by @paulcbetts (https://github.com/paulcbetts)