Skip to content

Commit

Permalink
Merge branch 'v4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Aug 11, 2015
2 parents eca2b11 + db6f78a commit 99918e5
Show file tree
Hide file tree
Showing 193 changed files with 26,052 additions and 7,378 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,6 @@ $RECYCLE.BIN/
*.lnk

src/Acr.UserDialogs.userprefs
/src/Samples/Sample.Uwp/project.lock.json
/src/Acr.UserDialogs.Uwp/project.lock.json
/src/.vs/config/applicationhost.config
12 changes: 8 additions & 4 deletions nuspec/Acr.MvvmCross.Plugins.UserDialogs.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Acr.MvvmCross.Plugins.UserDialogs</id>
<version>3.1.0</version>
<version>4.0.0</version>
<title>MvvmCross User Dialogs</title>
<authors>Allan Ritchie</authors>
<owners>Allan Ritchie</owners>
Expand All @@ -14,15 +14,19 @@
<dependencies>
<group>
<dependency id="MvvmCross.HotTuna.CrossCore" version="[3.5, 4.0)" />
<dependency id="Acr.UserDialogs" version="[3.4.1, 4.0)" />
<dependency id="Acr.UserDialogs" version="[4.0, 5.0)" />
</group>
<group targetFramework="wp8">
<dependency id="Acr.UserDialogs" version="[3.4.1, 4.0)" />
<dependency id="Acr.UserDialogs" version="[4.0, 5.0)" />
<dependency id="MvvmCross.HotTuna.CrossCore" version="[3.5, 4.0)" />
</group>
</dependencies>
<releaseNotes>
Update to Acr.UserDialogs 3.4.1
Update to Acr.UserDialogs 4.0
[android] Uses appcompat/material design out of the box
[feature] pretty toast windows powered by iOS-Messagebar and android support design snackbar
[feature] images and colours now powered by Splat
[breaking] android no longer supports anything less than API 15
</releaseNotes>
</metadata>
<files>
Expand Down
91 changes: 21 additions & 70 deletions nuspec/Acr.UserDialogs.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Acr.UserDialogs</id>
<version>3.4.2</version>
<version>4.0.0</version>
<title>ACR User Dialogs Plugin for Xamarin and Windows</title>
<summary>Allows for messagebox style dialogs to be called from your shared/PCL/MVVM code</summary>
<description>
Expand All @@ -16,10 +16,7 @@ Allows for messagebox style dialogs to be called from your shared/PCL/MVVM code
- Prompt
- Toast

Android Initialization
Android Xamarin Forms: UserDialogs.Init(() => (Activity)Forms.Context);
Android MvvmCross: UserDialogs.Init(() => Mvx.Resolve&lt;IMvxAndroidCurrentTopActivity&gt;.Activity);
Android Manually: UserDialogs.Init(Activity Factory Function);
In your platform project, make sure to call UserDialogs.Init() before using!
</description>
<authors>Allan Ritchie</authors>
<owners>Allan Ritchie</owners>
Expand All @@ -28,74 +25,26 @@ Android Manually: UserDialogs.Init(Activity Factory Function);
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>windows xamarin xam.pcl dialogs</tags>
<dependencies>
<group targetFramework="wp8">
<dependency id="WPtoolkit" version="[4.2013.08.16, 5.0)" />
<!--<dependency id="WPtoolkit.Kinnara" version="[4.2014.11.22, 5.0)" />-->
<group>
<dependency id="Splat" version="[1.6.2, 2.0)" />
</group>
<group targetFramework="monoandroid">
<dependency id="Xamarin.Android.Support.Design" version="[22.2.1.0, 23)" />
</group>
<!--<group targetFramework="win81">
<dependency id="WinRTXamlToolkit.Windows" version="[1.7.9.0, 2.0)" />
</group>-->
</dependencies>
<releaseNotes>
4.0
[feature] pretty toast windows powered by iOS-Messagebar and android support design snackbar
[feature] images and colours now powered by Splat
[feature] Universal windows platform support (beta - still not pretty)
[android] material design support (flag in Init)
[breaking] Init is gone from everything but android
[breaking] android no longer supports anything less than API 15

3.4.2
[feature] ActionSheetAsync - the xamarin forms way of doing this. I still recommend ActionSheet for maximum flexibility
[ios][fix] More top viewcontroller fixes (around tab controllers) courtesy of @RTodorov

3.4
Split out interface library for proper abstraction
[ios][fix] actionsheet on ipads
[ios][fix] modal dialogs won't display any dialogs
[wp][fix] success and error will now show alerts

3.3.4
Update nuspec to profile 259 for the PCL

3.3.3
Init is required on all platforms again to prevent confusion, but less annoying about secondary init calls

3.3.2
Init only necessary in Android now

3.3.1
* NEW - Numeric Password (PIN) prompt input type

3.3
* NEW - Default text/mask values added as static properties in each dialog configuration class (great for multilingual apps)
* NEW - ShowSuccess/ShowError dialogs for iOS and Android - not ready for WP8 yet
Update to BTProgressHUD 1.16

3.2
Android and iOS now support mask type on loading/progress HUDs
Android and iOS now support mask type on toast windows
FIX: Wrap all iOS loading/progress HUDs in UI thread dispatch call

3.1
BREAKING ANDROID: Support old API 10+. There is no longer an Init(Activity) signature.
iOS7 - Fix some labelling defects with login dialog

3.0.5
AndHud dialog should be dismissed onclick even if user does not supply onclick argument
Android progress dialog should be using the same top activity factory as every other control

3.0.4
Several fixes for winphone. Unfortunately, placeholders will be removed for now.
Fix blank message in iOS8 actionsheet

3.0.3
Calling Init will throw an error if already initialized
Add additional keyboard types for prompt (Name, Phone, Url)

3.0.2
Remove network activity dialog. Too many issues with Android

3.0.1
Add ability to remove cancel from prompt
Add ability to have existing text in prompt
Fix iOS7 actionsheet

3.0
Bait and switch design
Add destructive and cancel buttons to actionsheets
</releaseNotes>
</metadata>
<files>
Expand All @@ -114,10 +63,12 @@ Add destructive and cancel buttons to actionsheets
<file src="..\src\Acr.UserDialogs.iOS\bin\iPhone\Release\BTProgressHUD.dll" target="lib\Xamarin.iOS10\BTProgressHUD.dll" />

<!-- winphone -->
<file src="..\src\Acr.UserDialogs.WindowsPhone\bin\Release\Acr.UserDialogs.dll" target="lib\wp8\Acr.UserDialogs.dll" />
<file src="..\src\Acr.UserDialogs.WindowsPhone\bin\Release\Acr.UserDialogs.Interface.dll" target="lib\wp8\Acr.UserDialogs.Interface.dll" />
<file src="..\src\Acr.UserDialogs.WP\bin\Release\Acr.UserDialogs.dll" target="lib\wpa81\Acr.UserDialogs.dll" />
<file src="..\src\Acr.UserDialogs.WP\bin\Release\Acr.UserDialogs.Interface.dll" target="lib\wpa81\Acr.UserDialogs.Interface.dll" />

<!-- winstore -->
<!--<file src="..\src\Acr.UserDialogs.WindowsStore\bin\Release\Acr.UserDialogs.dll" target="lib\wpa\Acr.UserDialogs.dll" />-->
<!-- uwp -->
<file src="..\src\Acr.UserDialogs.Uwp\bin\Release\Acr.UserDialogs.dll" target="lib\uap10.0\Acr.UserDialogs.dll" />
<file src="..\src\Acr.UserDialogs.Uwp\bin\Release\Acr.UserDialogs.Interface.dll" target="lib\uap10.0\Acr.UserDialogs.Interface.dll" />
<file src="..\src\Acr.UserDialogs.Uwp\Properties\Acr.UserDialogs.Uwp.rd.xml" target="lib\uap10.0\Acr.UserDialogs.Uwp.rd.xml" />
</files>
</package>
84 changes: 54 additions & 30 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
A cross platform library that allows you to call for standard user dialogs from a shared/portable library.
Supports Android, iOS, and Windows Phone 8



##Features

---
Expand All @@ -16,45 +18,67 @@ Supports Android, iOS, and Windows Phone 8
* Login
* Progress
* Prompt
* Toast
* Toasts

[examples](https://github.com/aritchie/userdialogs/blob/master/src/Samples/Samples/MainPage.cs)

* Android - Progress/Loading uses Redth's [AndHUD](https://github.com/Redth/AndHUD)
* iOS - Progress/Loading uses Nic Wise's [BTProgressHUD](https://github.com/nicwise/BTProgressHUD)
* WinPhone - All dialogs by [WPToolkit](http://coding4fun.codeplex.com/)


Powered By:

Android - Progress/Loading uses Redth's [AndHUD](https://github.com/Redth/AndHUD)
iOS - Progress/Loading uses Nic Wise's [BTProgressHUD](https://github.com/nicwise/BTProgressHUD)
iOS - Toasts powered by Xamarin-iOS-MessageBar
WinPhone - All dialogs by [WPToolkit](http://coding4fun.codeplex.com/)


###Themes/Defaults

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
- 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

##How To Setup

---

To use, simply reference the nuget package in each of your platform projects.

###iOS Initialization

public class AppDelegate : UIApplicationDelegate { // or your custom appdelegate inheritance (xamarin forms, mvvmcross)
public override bool FinishedLaunching(UIApplication app, NSDictionary options) {
UserDialogs.Init();
.. your init logic
return base.FinishedLaunching(app, options);
}
}

###Android Initialization (In your main activity)
UserDialogs.Init(this, useAppCompat); // pass true for appcompat/material design

// Xamarin Forms
UserDialogs.Init(() => (Activity)Forms.Context);

// MvvmCross
UserDialogs.Init(() => Mvx.Resolve<IMvxAndroidCurrentTopActivity>.Activity);

// Using your own activity provider (you need to manage what the top activity is)
UserDialogs.Init(Activity Factory Function);

###Windows Phone

// in your mainpage constructor
UserDialogs.Init();

###XAMARIN FORMS USERS: You must install NativeCode.Mobile.AppCompat on your android project for the material design support. This is only until xamarin updates forms to do this!
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<FileAlignment>512</FileAlignment>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<TargetFrameworkVersion>v2.3</TargetFrameworkVersion>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -34,18 +35,6 @@
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="Acr.UserDialogs, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Acr.UserDialogs.3.4.1\lib\MonoAndroid10\Acr.UserDialogs.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Acr.UserDialogs.Interface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Acr.UserDialogs.3.4.1\lib\MonoAndroid10\Acr.UserDialogs.Interface.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="AndHUD, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Acr.UserDialogs.3.4.1\lib\MonoAndroid10\AndHUD.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Cirrious.CrossCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e16445fd9b451819, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.HotTuna.CrossCore.3.5.1\lib\MonoAndroid\Cirrious.CrossCore.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -96,6 +85,14 @@
<Project>{fb69b463-0dd5-49d2-afed-6e3a31eb37a1}</Project>
<Name>Acr.MvvmCross.Plugins.UserDialogs</Name>
</ProjectReference>
<ProjectReference Include="..\Acr.UserDialogs.Android\Acr.UserDialogs.Android.csproj">
<Project>{4a67e27e-0e7f-4ef2-b3e6-2c24e18ef442}</Project>
<Name>Acr.UserDialogs.Android</Name>
</ProjectReference>
<ProjectReference Include="..\Acr.UserDialogs.Interface\Acr.UserDialogs.Interface.csproj">
<Project>{6a0ae941-711d-4c36-a311-960b65534b22}</Project>
<Name>Acr.UserDialogs.Interface</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\Values\" />
Expand Down
7 changes: 5 additions & 2 deletions src/Acr.MvvmCross.Plugins.UserDialogs.Droid/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
using Cirrious.CrossCore;
using Cirrious.CrossCore.Droid.Platform;
using Cirrious.CrossCore.Plugins;
using Acr.UserDialogs;


namespace Acr.MvvmCross.Plugins.UserDialogs.Droid {

public class Plugin : IMvxPlugin {

public void Load() {
Acr.UserDialogs.UserDialogs.Init(() => Mvx.Resolve<IMvxAndroidCurrentTopActivity>().Activity);
Mvx.RegisterSingleton(Acr.UserDialogs.UserDialogs.Instance);
Mvx.CallbackWhenRegistered<IMvxAndroidCurrentTopActivity>(x => {
Acr.UserDialogs.UserDialogs.Instance = new AppCompatUserDialogsImpl(() => Mvx.Resolve<IMvxAndroidCurrentTopActivity>().Activity);
Mvx.RegisterSingleton(Acr.UserDialogs.UserDialogs.Instance);
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

[assembly: AssemblyTitle("Acr.MvvmCross.Plugins.UserDialogs.Droid")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
9 changes: 3 additions & 6 deletions src/Acr.MvvmCross.Plugins.UserDialogs.Droid/packages.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Acr.UserDialogs" version="3.4.1" targetFramework="MonoAndroid23" />
<package id="MvvmCross.HotTuna.CrossCore" version="3.5.0" targetFramework="MonoAndroid23" />
<package id="MvvmCross.HotTuna.CrossCore" version="3.5.1" targetFramework="MonoAndroid23" />
<package id="MvvmCross.HotTuna.MvvmCrossLibraries" version="3.5.1" targetFramework="MonoAndroid23" />
<package id="MvvmCross.PortableSupport" version="3.5.0" targetFramework="MonoAndroid23" />
<package id="MvvmCross.PortableSupport" version="3.5.1" targetFramework="MonoAndroid23" />
<package id="MvvmCross.HotTuna.CrossCore" version="3.5.1" targetFramework="monoandroid23" />
<package id="MvvmCross.HotTuna.MvvmCrossLibraries" version="3.5.1" targetFramework="monoandroid23" />
<package id="MvvmCross.PortableSupport" version="3.5.1" targetFramework="monoandroid23" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Acr.UserDialogs, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Acr.UserDialogs.3.4.1\lib\Xamarin.iOS10\Acr.UserDialogs.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Acr.UserDialogs.Interface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Acr.UserDialogs.3.4.1\lib\Xamarin.iOS10\Acr.UserDialogs.Interface.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="BTProgressHUD, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Acr.UserDialogs.3.4.1\lib\Xamarin.iOS10\BTProgressHUD.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Cirrious.CrossCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e16445fd9b451819, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.HotTuna.CrossCore.3.5.1\lib\Xamarin.iOS10\Cirrious.CrossCore.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -86,6 +74,16 @@
<Project>{FB69B463-0DD5-49D2-AFED-6E3A31EB37A1}</Project>
<Name>Acr.MvvmCross.Plugins.UserDialogs</Name>
</ProjectReference>
<ProjectReference Include="..\Acr.UserDialogs.Interface\Acr.UserDialogs.Interface.csproj">
<Project>{6a0ae941-711d-4c36-a311-960b65534b22}</Project>
<Name>Acr.UserDialogs.Interface</Name>
</ProjectReference>
<ProjectReference Include="..\Acr.UserDialogs.iOS\Acr.UserDialogs.iOS.csproj">
<Project>{dfa982a2-f6f7-4ffd-9f86-a1af11f7c4a1}</Project>
<Name>Acr.UserDialogs.iOS</Name>
<IsAppExtension>false</IsAppExtension>
<IsWatchApp>false</IsWatchApp>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand Down
Loading

0 comments on commit 99918e5

Please sign in to comment.