diff --git a/LightBox/Droid/Assets/AboutAssets.txt b/LightBox/Droid/Assets/AboutAssets.txt new file mode 100644 index 0000000..a9b0638 --- /dev/null +++ b/LightBox/Droid/Assets/AboutAssets.txt @@ -0,0 +1,19 @@ +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories) and given a Build Action of "AndroidAsset". + +These files will be deployed with your package and will be accessible using Android's +AssetManager, like this: + +public class ReadAsset : Activity +{ + protected override void OnCreate (Bundle bundle) + { + base.OnCreate (bundle); + + InputStream input = Assets.Open ("my_asset.txt"); + } +} + +Additionally, some Android functions will automatically load asset files: + +Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); diff --git a/LightBox/Droid/LightBox.Droid.csproj b/LightBox/Droid/LightBox.Droid.csproj new file mode 100644 index 0000000..fa6092b --- /dev/null +++ b/LightBox/Droid/LightBox.Droid.csproj @@ -0,0 +1,93 @@ + + + + Debug + AnyCPU + {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {D32BBBAF-7217-4EFA-8F41-317077153C84} + Library + LightBox.Droid + Assets + Resources + Properties\AndroidManifest.xml + Resource + Resources\Resource.designer.cs + True + True + LightBox.Droid + v5.1 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + None + false + + + full + true + bin\Release + prompt + 4 + false + false + + + + + + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\MonoAndroid10\FormsViewGroup.dll + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\MonoAndroid10\Xamarin.Forms.Core.dll + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\MonoAndroid10\Xamarin.Forms.Platform.dll + + + ..\packages\Xamarin.Android.Support.v4.22.2.1.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll + + + + + {68034695-F6F2-499C-B979-07DC23CC6F23} + LightBox + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LightBox/Droid/MainActivity.cs b/LightBox/Droid/MainActivity.cs new file mode 100644 index 0000000..96865c7 --- /dev/null +++ b/LightBox/Droid/MainActivity.cs @@ -0,0 +1,26 @@ +using System; + +using Android.App; +using Android.Content; +using Android.Content.PM; +using Android.Runtime; +using Android.Views; +using Android.Widget; +using Android.OS; + +namespace LightBox.Droid +{ + [Activity (Label = "LightBox.Droid", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] + public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity + { + protected override void OnCreate (Bundle bundle) + { + base.OnCreate (bundle); + + global::Xamarin.Forms.Forms.Init (this, bundle); + + LoadApplication (new App ()); + } + } +} + diff --git a/LightBox/Droid/Properties/AndroidManifest.xml b/LightBox/Droid/Properties/AndroidManifest.xml new file mode 100644 index 0000000..42775f3 --- /dev/null +++ b/LightBox/Droid/Properties/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/LightBox/Droid/Properties/AssemblyInfo.cs b/LightBox/Droid/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9009562 --- /dev/null +++ b/LightBox/Droid/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using Android.App; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle ("LightBox.Droid")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("Wintellect, LLC")] +[assembly: AssemblyProduct ("")] +[assembly: AssemblyCopyright ("2015 Wintellect, LLC")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion ("1.0.0")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/LightBox/Droid/Resources/AboutResources.txt b/LightBox/Droid/Resources/AboutResources.txt new file mode 100644 index 0000000..10f52d4 --- /dev/null +++ b/LightBox/Droid/Resources/AboutResources.txt @@ -0,0 +1,44 @@ +Images, layout descriptions, binary blobs and string dictionaries can be included +in your application as resource files. Various Android APIs are designed to +operate on the resource IDs instead of dealing with images, strings or binary blobs +directly. + +For example, a sample Android app that contains a user interface layout (main.axml), +an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) +would keep its resources in the "Resources" directory of the application: + +Resources/ + drawable/ + icon.png + + layout/ + main.axml + + values/ + strings.xml + +In order to get the build system to recognize Android resources, set the build action to +"AndroidResource". The native Android APIs do not operate directly with filenames, but +instead operate on resource IDs. When you compile an Android application that uses resources, +the build system will package the resources for distribution and generate a class called "R" +(this is an Android convention) that contains the tokens for each one of the resources +included. For example, for the above Resources layout, this is what the R class would expose: + +public class R { + public class drawable { + public const int icon = 0x123; + } + + public class layout { + public const int main = 0x456; + } + + public class strings { + public const int first_string = 0xabc; + public const int second_string = 0xbcd; + } +} + +You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main +to reference the layout/main.axml file, or R.strings.first_string to reference the first +string in the dictionary file values/strings.xml. diff --git a/LightBox/Droid/Resources/Resource.designer.cs b/LightBox/Droid/Resources/Resource.designer.cs new file mode 100644 index 0000000..0472855 --- /dev/null +++ b/LightBox/Droid/Resources/Resource.designer.cs @@ -0,0 +1,61 @@ +#pragma warning disable 1591 +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Mono Runtime Version: 4.0.30319.17020 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +[assembly: Android.Runtime.ResourceDesignerAttribute("LightBox.Droid.Resource", IsApplication=true)] + +namespace LightBox.Droid +{ + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] + public partial class Resource + { + + static Resource() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + public static void UpdateIdValues() + { + } + + public partial class Attribute + { + + static Attribute() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Attribute() + { + } + } + + public partial class Drawable + { + + // aapt resource value: 0x7f020000 + public const int icon = 2130837504; + + static Drawable() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Drawable() + { + } + } + } +} +#pragma warning restore 1591 diff --git a/LightBox/Droid/Resources/drawable-hdpi/icon.png b/LightBox/Droid/Resources/drawable-hdpi/icon.png new file mode 100644 index 0000000..964f110 Binary files /dev/null and b/LightBox/Droid/Resources/drawable-hdpi/icon.png differ diff --git a/LightBox/Droid/Resources/drawable-xhdpi/icon.png b/LightBox/Droid/Resources/drawable-xhdpi/icon.png new file mode 100644 index 0000000..3c01e60 Binary files /dev/null and b/LightBox/Droid/Resources/drawable-xhdpi/icon.png differ diff --git a/LightBox/Droid/Resources/drawable-xxhdpi/icon.png b/LightBox/Droid/Resources/drawable-xxhdpi/icon.png new file mode 100644 index 0000000..0d8c1c5 Binary files /dev/null and b/LightBox/Droid/Resources/drawable-xxhdpi/icon.png differ diff --git a/LightBox/Droid/Resources/drawable/icon.png b/LightBox/Droid/Resources/drawable/icon.png new file mode 100644 index 0000000..b0ba715 Binary files /dev/null and b/LightBox/Droid/Resources/drawable/icon.png differ diff --git a/LightBox/Droid/packages.config b/LightBox/Droid/packages.config new file mode 100644 index 0000000..2e9e7a1 --- /dev/null +++ b/LightBox/Droid/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/LightBox/LightBox.sln b/LightBox/LightBox.sln new file mode 100644 index 0000000..9e7fc30 --- /dev/null +++ b/LightBox/LightBox.sln @@ -0,0 +1,71 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LightBox", "LightBox\LightBox.csproj", "{68034695-F6F2-499C-B979-07DC23CC6F23}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LightBox.iOS", "iOS\LightBox.iOS.csproj", "{7CB9AAD9-CE32-4A10-B642-D9DDF152280B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LightBox.Droid", "Droid\LightBox.Droid.csproj", "{D32BBBAF-7217-4EFA-8F41-317077153C84}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LightBox.UITests", "UITests\LightBox.UITests.csproj", "{9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Release|iPhone = Release|iPhone + Release|iPhoneSimulator = Release|iPhoneSimulator + Debug|iPhone = Debug|iPhone + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {68034695-F6F2-499C-B979-07DC23CC6F23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Debug|Any CPU.Build.0 = Debug|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Debug|iPhone.Build.0 = Debug|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Release|Any CPU.ActiveCfg = Release|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Release|Any CPU.Build.0 = Release|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Release|iPhone.ActiveCfg = Release|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Release|iPhone.Build.0 = Release|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {68034695-F6F2-499C-B979-07DC23CC6F23}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Debug|iPhone.ActiveCfg = Debug|iPhone + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Debug|iPhone.Build.0 = Debug|iPhone + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Release|Any CPU.ActiveCfg = Release|iPhone + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Release|Any CPU.Build.0 = Release|iPhone + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Release|iPhone.ActiveCfg = Release|iPhone + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Release|iPhone.Build.0 = Release|iPhone + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Debug|iPhone.Build.0 = Debug|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Release|Any CPU.Build.0 = Release|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Release|iPhone.ActiveCfg = Release|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Release|iPhone.Build.0 = Release|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Debug|iPhone.Build.0 = Debug|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Release|Any CPU.Build.0 = Release|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Release|iPhone.ActiveCfg = Release|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Release|iPhone.Build.0 = Release|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {D32BBBAF-7217-4EFA-8F41-317077153C84}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/LightBox/LightBox/LightBox.cs b/LightBox/LightBox/LightBox.cs new file mode 100644 index 0000000..699bfe3 --- /dev/null +++ b/LightBox/LightBox/LightBox.cs @@ -0,0 +1,31 @@ +using System; + +using Xamarin.Forms; + +namespace LightBox +{ + public class App : Application + { + public App () + { + // The root page of your application + MainPage = new LightBox.MainPage(); + } + + protected override void OnStart () + { + // Handle when your app starts + } + + protected override void OnSleep () + { + // Handle when your app sleeps + } + + protected override void OnResume () + { + // Handle when your app resumes + } + } +} + diff --git a/LightBox/LightBox/LightBox.csproj b/LightBox/LightBox/LightBox.csproj new file mode 100644 index 0000000..b88ac48 --- /dev/null +++ b/LightBox/LightBox/LightBox.csproj @@ -0,0 +1,60 @@ + + + + Debug + AnyCPU + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {68034695-F6F2-499C-B979-07DC23CC6F23} + Library + LightBox + LightBox + v4.5 + Profile78 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + MainPage.xaml + + + + + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll + + + + + + + + MSBuild:UpdateDesignTimeXaml + + + \ No newline at end of file diff --git a/LightBox/LightBox/MainPage.xaml b/LightBox/LightBox/MainPage.xaml new file mode 100644 index 0000000..4afb604 --- /dev/null +++ b/LightBox/LightBox/MainPage.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/LightBox/LightBox/MainPage.xaml.cs b/LightBox/LightBox/MainPage.xaml.cs new file mode 100644 index 0000000..d8b6a7d --- /dev/null +++ b/LightBox/LightBox/MainPage.xaml.cs @@ -0,0 +1,88 @@ +using System; +using Xamarin.Forms; +using System.Threading.Tasks; + +namespace LightBox +{ + public class ImageInfo + { + readonly string _baseUrl; + + public ImageInfo(string baseUrl) + { + _baseUrl = baseUrl; + } + + public string Text { + get { + return String.Format(_baseUrl, 320, 480); + } + } + + public string Thumbnail { + get { + return String.Format(_baseUrl, 50, 50); + } + } + } + + public partial class MainPage : ContentPage + { + public MainPage () + { + InitializeComponent (); + + var images = new[] { + new ImageInfo("http://lorempixel.com/{0}/{1}/abstract/1"), + new ImageInfo("http://lorempixel.com/{0}/{1}/abstract/2"), + new ImageInfo("http://lorempixel.com/{0}/{1}/abstract/3"), + new ImageInfo("http://lorempixel.com/{0}/{1}/abstract/4"), + new ImageInfo("http://lorempixel.com/{0}/{1}/abstract/5"), + new ImageInfo("http://lorempixel.com/{0}/{1}/abstract/6"), + new ImageInfo("http://lorempixel.com/{0}/{1}/abstract/7"), + new ImageInfo("http://lorempixel.com/{0}/{1}/abstract/8"), + new ImageInfo("http://lorempixel.com/{0}/{1}/abstract/9") + }; + ImagesList.ItemsSource = images; + } + + Image _lightbox; + Rectangle _origBounds; + + async void RowTapped (object sender, ItemTappedEventArgs e) + { + var item = e.Item as ImageInfo; + _lightbox = new Image { + WidthRequest = 100, + HeightRequest = 100, + HorizontalOptions = LayoutOptions.Center, + VerticalOptions = LayoutOptions.Center, + Opacity = 0, + Source = item.Text + }; + _lightbox.GestureRecognizers.Add (new TapGestureRecognizer { + NumberOfTapsRequired = 1, + Command = new Command (CloseLightBox) + }); + RootGrid.Children.Add (_lightbox); + RootGrid.ForceLayout (); + _origBounds = _lightbox.Bounds; + var fadeIn = _lightbox.FadeTo (1.0); + var zoomIn = _lightbox.LayoutTo (RootGrid.Bounds); + await Task.WhenAll (new[] { fadeIn, zoomIn }); + } + + void CloseLightBox() + { + var fadeOut = _lightbox.FadeTo (0.0); + var zoomOut = _lightbox.LayoutTo (_origBounds); + Task.WhenAll (new[] { fadeOut, zoomOut }).ContinueWith (task => { + Device.BeginInvokeOnMainThread (() => { + RootGrid.Children.Remove (_lightbox); + _lightbox = null; + }); + }); + } + } +} + diff --git a/LightBox/LightBox/Properties/AssemblyInfo.cs b/LightBox/LightBox/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..fb7d38f --- /dev/null +++ b/LightBox/LightBox/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle ("LightBox")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("Wintellect, LLC")] +[assembly: AssemblyProduct ("")] +[assembly: AssemblyCopyright ("2015 Wintellect, LLC")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion ("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/LightBox/LightBox/packages.config b/LightBox/LightBox/packages.config new file mode 100644 index 0000000..192ce41 --- /dev/null +++ b/LightBox/LightBox/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/LightBox/UITests/AppInitializer.cs b/LightBox/UITests/AppInitializer.cs new file mode 100644 index 0000000..5860b5c --- /dev/null +++ b/LightBox/UITests/AppInitializer.cs @@ -0,0 +1,21 @@ +using System; +using System.IO; +using System.Linq; +using Xamarin.UITest; +using Xamarin.UITest.Queries; + +namespace LightBox.UITests +{ + public class AppInitializer + { + public static IApp StartApp (Platform platform) + { + if (platform == Platform.Android) { + return ConfigureApp.Android.StartApp (); + } + + return ConfigureApp.iOS.StartApp (); + } + } +} + diff --git a/LightBox/UITests/LightBox.UITests.csproj b/LightBox/UITests/LightBox.UITests.csproj new file mode 100644 index 0000000..92d7476 --- /dev/null +++ b/LightBox/UITests/LightBox.UITests.csproj @@ -0,0 +1,61 @@ + + + + Debug + AnyCPU + {9B2578ED-AD8B-4DA9-9FD0-4A49EF933F1C} + Library + LightBox.UITests + LightBox.UITests + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + ..\packages\Xamarin.UITest.1.0.0\lib\Xamarin.UITest.dll + + + ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + + + + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B} + LightBox.iOS + False + False + + + {D32BBBAF-7217-4EFA-8F41-317077153C84} + LightBox.Droid + False + False + + + + + + + + + + + \ No newline at end of file diff --git a/LightBox/UITests/Tests.cs b/LightBox/UITests/Tests.cs new file mode 100644 index 0000000..2607ef9 --- /dev/null +++ b/LightBox/UITests/Tests.cs @@ -0,0 +1,38 @@ +using System; +using System.IO; +using System.Linq; +using NUnit.Framework; +using Xamarin.UITest; +using Xamarin.UITest.Queries; + +namespace LightBox.UITests +{ + [TestFixture (Platform.Android)] + [TestFixture (Platform.iOS)] + public class Tests + { + IApp app; + Platform platform; + + public Tests (Platform platform) + { + this.platform = platform; + } + + [SetUp] + public void BeforeEachTest () + { + app = AppInitializer.StartApp (platform); + } + + [Test] + public void WelcomeTextIsDisplayed () + { + AppResult[] results = app.WaitForElement (c => c.Marked ("Welcome to Xamarin Forms!")); + app.Screenshot ("Welcome screen."); + + Assert.IsTrue (results.Any ()); + } + } +} + diff --git a/LightBox/UITests/packages.config b/LightBox/UITests/packages.config new file mode 100644 index 0000000..4962ca5 --- /dev/null +++ b/LightBox/UITests/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/LightBox/iOS/AppDelegate.cs b/LightBox/iOS/AppDelegate.cs new file mode 100644 index 0000000..a7121ae --- /dev/null +++ b/LightBox/iOS/AppDelegate.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using Foundation; +using UIKit; + +namespace LightBox.iOS +{ + [Register ("AppDelegate")] + public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate + { + public override bool FinishedLaunching (UIApplication app, NSDictionary options) + { + global::Xamarin.Forms.Forms.Init (); + + // Code for starting up the Xamarin Test Cloud Agent + #if ENABLE_TEST_CLOUD + Xamarin.Calabash.Start(); + #endif + + LoadApplication (new App ()); + + return base.FinishedLaunching (app, options); + } + } +} + diff --git a/LightBox/iOS/Entitlements.plist b/LightBox/iOS/Entitlements.plist new file mode 100644 index 0000000..e9a3005 --- /dev/null +++ b/LightBox/iOS/Entitlements.plist @@ -0,0 +1,7 @@ + + + + + + + diff --git a/LightBox/iOS/ITunesArtwork b/LightBox/iOS/ITunesArtwork new file mode 100644 index 0000000..d0136ea Binary files /dev/null and b/LightBox/iOS/ITunesArtwork differ diff --git a/LightBox/iOS/ITunesArtwork@2x b/LightBox/iOS/ITunesArtwork@2x new file mode 100644 index 0000000..fa2ebf7 Binary files /dev/null and b/LightBox/iOS/ITunesArtwork@2x differ diff --git a/LightBox/iOS/Info.plist b/LightBox/iOS/Info.plist new file mode 100644 index 0000000..1a74588 --- /dev/null +++ b/LightBox/iOS/Info.plist @@ -0,0 +1,64 @@ + + + + + CFBundleDisplayName + LightBox + CFBundleIdentifier + com.wintellect.lightbox + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + MinimumOSVersion + 7.0 + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CFBundleIconFiles + + Icon-60@2x + Icon-60@3x + Icon-76 + Icon-76@2x + Default + Default@2x + Default-568h + Default-568h@2x + Default-Landscape + Default-Landscape@2x + Default-Portrait + Default-Portrait@2x + Icon-Small-40 + Icon-Small-40@2x + Icon-Small-40@3x + Icon-Small + Icon-Small@2x + Icon-Small@3x + + UILaunchStoryboardName + LaunchScreen + + + diff --git a/LightBox/iOS/LightBox.iOS.csproj b/LightBox/iOS/LightBox.iOS.csproj new file mode 100644 index 0000000..e6b9567 --- /dev/null +++ b/LightBox/iOS/LightBox.iOS.csproj @@ -0,0 +1,125 @@ + + + + Debug + iPhoneSimulator + {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {7CB9AAD9-CE32-4A10-B642-D9DDF152280B} + Exe + LightBox.iOS + Resources + LightBox.iOS + + + true + full + false + bin\iPhoneSimulator\Debug + DEBUG;ENABLE_TEST_CLOUD; + prompt + 4 + false + i386 + None + true + true + + + full + true + bin\iPhone\Release + prompt + 4 + Entitlements.plist + ARMv7, ARM64 + false + iPhone Developer + + + full + true + bin\iPhoneSimulator\Release + prompt + 4 + i386 + false + None + + + true + full + false + bin\iPhone\Debug + DEBUG;ENABLE_TEST_CLOUD; + prompt + 4 + false + ARMv7, ARM64 + Entitlements.plist + true + iPhone Developer + true + + + + + + + + ..\packages\Xamarin.TestCloud.Agent.0.14.3\lib\Xamarin.iOS10\Calabash.dll + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll + + + ..\packages\Xamarin.Forms.1.4.4.6392\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll + + + + + {68034695-F6F2-499C-B979-07DC23CC6F23} + LightBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LightBox/iOS/Main.cs b/LightBox/iOS/Main.cs new file mode 100644 index 0000000..9c11a31 --- /dev/null +++ b/LightBox/iOS/Main.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using Foundation; +using UIKit; + +namespace LightBox.iOS +{ + public class Application + { + // This is the main entry point of the application. + static void Main (string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main (args, null, "AppDelegate"); + } + } +} + diff --git a/LightBox/iOS/Resources/Default-568h@2x.png b/LightBox/iOS/Resources/Default-568h@2x.png new file mode 100644 index 0000000..26c6461 Binary files /dev/null and b/LightBox/iOS/Resources/Default-568h@2x.png differ diff --git a/LightBox/iOS/Resources/Default-Portrait.png b/LightBox/iOS/Resources/Default-Portrait.png new file mode 100644 index 0000000..5d0d1ab Binary files /dev/null and b/LightBox/iOS/Resources/Default-Portrait.png differ diff --git a/LightBox/iOS/Resources/Default-Portrait@2x.png b/LightBox/iOS/Resources/Default-Portrait@2x.png new file mode 100644 index 0000000..0ee2688 Binary files /dev/null and b/LightBox/iOS/Resources/Default-Portrait@2x.png differ diff --git a/LightBox/iOS/Resources/Default.png b/LightBox/iOS/Resources/Default.png new file mode 100644 index 0000000..b74643c Binary files /dev/null and b/LightBox/iOS/Resources/Default.png differ diff --git a/LightBox/iOS/Resources/Default@2x.png b/LightBox/iOS/Resources/Default@2x.png new file mode 100644 index 0000000..dbd6bd3 Binary files /dev/null and b/LightBox/iOS/Resources/Default@2x.png differ diff --git a/LightBox/iOS/Resources/Icon-60@2x.png b/LightBox/iOS/Resources/Icon-60@2x.png new file mode 100644 index 0000000..4b03c42 Binary files /dev/null and b/LightBox/iOS/Resources/Icon-60@2x.png differ diff --git a/LightBox/iOS/Resources/Icon-60@3x.png b/LightBox/iOS/Resources/Icon-60@3x.png new file mode 100644 index 0000000..b03ca1b Binary files /dev/null and b/LightBox/iOS/Resources/Icon-60@3x.png differ diff --git a/LightBox/iOS/Resources/Icon-76.png b/LightBox/iOS/Resources/Icon-76.png new file mode 100644 index 0000000..587982e Binary files /dev/null and b/LightBox/iOS/Resources/Icon-76.png differ diff --git a/LightBox/iOS/Resources/Icon-76@2x.png b/LightBox/iOS/Resources/Icon-76@2x.png new file mode 100644 index 0000000..cd4e2c8 Binary files /dev/null and b/LightBox/iOS/Resources/Icon-76@2x.png differ diff --git a/LightBox/iOS/Resources/Icon-Small-40.png b/LightBox/iOS/Resources/Icon-Small-40.png new file mode 100644 index 0000000..6acff94 Binary files /dev/null and b/LightBox/iOS/Resources/Icon-Small-40.png differ diff --git a/LightBox/iOS/Resources/Icon-Small-40@2x.png b/LightBox/iOS/Resources/Icon-Small-40@2x.png new file mode 100644 index 0000000..b833aac Binary files /dev/null and b/LightBox/iOS/Resources/Icon-Small-40@2x.png differ diff --git a/LightBox/iOS/Resources/Icon-Small-40@3x.png b/LightBox/iOS/Resources/Icon-Small-40@3x.png new file mode 100644 index 0000000..ab8654e Binary files /dev/null and b/LightBox/iOS/Resources/Icon-Small-40@3x.png differ diff --git a/LightBox/iOS/Resources/Icon-Small.png b/LightBox/iOS/Resources/Icon-Small.png new file mode 100644 index 0000000..33db7e7 Binary files /dev/null and b/LightBox/iOS/Resources/Icon-Small.png differ diff --git a/LightBox/iOS/Resources/Icon-Small@2x.png b/LightBox/iOS/Resources/Icon-Small@2x.png new file mode 100644 index 0000000..bf45e25 Binary files /dev/null and b/LightBox/iOS/Resources/Icon-Small@2x.png differ diff --git a/LightBox/iOS/Resources/Icon-Small@3x.png b/LightBox/iOS/Resources/Icon-Small@3x.png new file mode 100644 index 0000000..7ad3891 Binary files /dev/null and b/LightBox/iOS/Resources/Icon-Small@3x.png differ diff --git a/LightBox/iOS/Resources/LaunchScreen.storyboard b/LightBox/iOS/Resources/LaunchScreen.storyboard new file mode 100644 index 0000000..a639c2f --- /dev/null +++ b/LightBox/iOS/Resources/LaunchScreen.storyboard @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LightBox/iOS/packages.config b/LightBox/iOS/packages.config new file mode 100644 index 0000000..2d77feb --- /dev/null +++ b/LightBox/iOS/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file