Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 15 additions & 58 deletions Babel/Babel.Droid/Babel.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -41,64 +41,27 @@
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
</PropertyGroup>
<ItemGroup>
<Reference Include="Java.Interop" />
<Reference Include="Mono.Android" />
<Reference Include="Mono.Android.Export" />
<Reference Include="mscorlib" />
<Reference Include="MvvmCross.Binding, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Binding.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Binding.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MvvmCross.Binding.Droid, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Binding.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Binding.Droid.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MvvmCross.Core, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Core.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MvvmCross.Droid, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Core.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Droid.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MvvmCross.Localization, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Platform.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Localization.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MvvmCross.Platform, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Platform.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Platform.dll</HintPath>
<Private>True</Private>
<Reference Include="MvvmCross, Version=6.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.6.2.3\lib\monoandroid81\MvvmCross.dll</HintPath>
</Reference>
<Reference Include="MvvmCross.Platform.Droid, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Platform.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Platform.Droid.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MvvmCross.Plugins.File, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Plugin.File.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Plugins.File.dll</HintPath>
<Private>True</Private>
<Reference Include="MvvmCross.Plugin.File, Version=6.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Plugin.File.6.2.3\lib\monoandroid81\MvvmCross.Plugin.File.dll</HintPath>
</Reference>
<Reference Include="MvvmCross.Plugins.File.Droid, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Plugin.File.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Plugins.File.Droid.dll</HintPath>
<Private>True</Private>
<Reference Include="MvvmCross.Plugin.Json, Version=6.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Plugin.Json.6.2.3\lib\netstandard2.0\MvvmCross.Plugin.Json.dll</HintPath>
</Reference>
<Reference Include="MvvmCross.Plugins.Json, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Plugin.Json.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Plugins.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="MvvmCross.Plugin.JsonLocalization, Version=6.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Plugin.JsonLocalization.6.2.3\lib\netstandard2.0\MvvmCross.Plugin.JsonLocalization.dll</HintPath>
</Reference>
<Reference Include="MvvmCross.Plugins.JsonLocalization, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Plugin.JsonLocalization.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Plugins.JsonLocalization.dll</HintPath>
<Private>True</Private>
<Reference Include="MvvmCross.Plugin.ResourceLoader, Version=6.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Plugin.ResourceLoader.6.2.3\lib\monoandroid81\MvvmCross.Plugin.ResourceLoader.dll</HintPath>
</Reference>
<Reference Include="MvvmCross.Plugins.ResourceLoader, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Plugin.ResourceLoader.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Plugins.ResourceLoader.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MvvmCross.Plugins.ResourceLoader.Droid, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Plugin.ResourceLoader.4.0.0-beta8\lib\MonoAndroid\MvvmCross.Plugins.ResourceLoader.Droid.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\netstandard2.0\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -118,17 +81,13 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Bootstrap\FilePluginBootstrap.cs" />
<Compile Include="Bootstrap\JsonLocalizationPluginBootstrap.cs" />
<Compile Include="Bootstrap\JsonPluginBootstrap.cs" />
<Compile Include="Bootstrap\ResourceLoaderPluginBootstrap.cs" />
<Compile Include="DebugTrace.cs" />
<Compile Include="LinkerPleaseInclude.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Setup.cs" />
<Compile Include="SplashScreen.cs" />
<Compile Include="Views\FirstView.cs" />
<Compile Include="Views\SecondView.cs" />
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="..\Babel.Phone\BabelResources\Text\FirstViewModel.json">
Expand All @@ -149,7 +108,6 @@
<AndroidAsset Include="..\Babel.Phone\BabelResources\Text\SecondViewModel.json">
<Link>Assets\BabelResources\Text\SecondViewModel.json</Link>
</AndroidAsset>
<None Include="packages-old.config" />
<None Include="packages.config" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\BabelResources\Text\AboutAssets.txt" />
Expand All @@ -173,7 +131,6 @@
<Content Include="Properties\AndroidManifest.xml" />
<AndroidResource Include="Resources\Values\SplashStyle.xml" />
<AndroidResource Include="Resources\Drawable\splash.png" />
<Content Include="ToDo-MvvmCross\_ Droid UI.txt" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
9 changes: 0 additions & 9 deletions Babel/Babel.Droid/Bootstrap/FilePluginBootstrap.cs

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions Babel/Babel.Droid/Bootstrap/JsonPluginBootstrap.cs

This file was deleted.

9 changes: 0 additions & 9 deletions Babel/Babel.Droid/Bootstrap/ResourceLoaderPluginBootstrap.cs

This file was deleted.

31 changes: 0 additions & 31 deletions Babel/Babel.Droid/DebugTrace.cs

This file was deleted.

95 changes: 63 additions & 32 deletions Babel/Babel.Droid/LinkerPleaseInclude.cs
Original file line number Diff line number Diff line change
@@ -1,45 +1,37 @@
using System;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Windows.Input;
using Android.App;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using MvvmCross.Binding.BindingContext;
using MvvmCross.IoC;
using MvvmCross.Navigation;
using MvvmCross.ViewModels;

namespace Babel.Droid
{
// This class is never actually executed, but when Xamarin linking is enabled it does how to ensure types and properties
// are preserved in the deployed app
[Preserve(AllMembers = true)]
public class LinkerPleaseInclude
{
public void Include(Button button)
{
button.Click += (s,e) => button.Text = button.Text + "";
}

public void Include(CheckBox checkBox)
{
checkBox.CheckedChange += (sender, args) => checkBox.Checked = !checkBox.Checked;
}

public void Include(Switch @switch)
{
@switch.CheckedChange += (sender, args) => @switch.Checked = [email protected];
button.Click += (s, e) => button.Text = $"{button.Text}";
}

public void Include(View view)
{
view.Click += (s, e) => view.ContentDescription = view.ContentDescription + "";
view.Click += (s, e) => view.ContentDescription = $"{view.ContentDescription}";
}

public void Include(TextView text)
{
text.TextChanged += (sender, args) => text.Text = "" + text.Text;
text.Hint = "" + text.Hint;
}

public void Include(CheckedTextView text)
{
text.TextChanged += (sender, args) => text.Text = "" + text.Text;
text.Hint = "" + text.Hint;
text.AfterTextChanged += (sender, args) => text.Text = $"{text.Text}";
text.Hint = $"{text.Hint}";
}

public void Include(CompoundButton cb)
Expand All @@ -52,31 +44,70 @@ public void Include(SeekBar sb)
sb.ProgressChanged += (sender, args) => sb.Progress = sb.Progress + 1;
}

public void Include(Activity act)
public void Include(RadioGroup radioGroup)
{
act.Title = act.Title + "";
radioGroup.CheckedChange += (sender, args) => radioGroup.Check(args.CheckedId);
}

public void Include(INotifyCollectionChanged changed)
public void Include(RatingBar ratingBar)
{
ratingBar.RatingBarChange += (sender, args) => ratingBar.Rating = 0 + ratingBar.Rating;
}

public void Include(Activity act)
{
changed.CollectionChanged += (s,e) => { var test = $"{e.Action}{e.NewItems}{e.NewStartingIndex}{e.OldItems}{e.OldStartingIndex}"; };
act.Title = $"{act.Title}";
}

public void Include(ICommand command)
{
command.CanExecuteChanged += (s, e) => { if (command.CanExecute(null)) command.Execute(null); };
}
public void Include(MvvmCross.Platform.IoC.MvxPropertyInjector injector)

public void Include(INotifyCollectionChanged changed)
{
injector = new MvvmCross.Platform.IoC.MvxPropertyInjector ();
}
changed.CollectionChanged += (s, e) => { _ = $"{e.Action}{e.NewItems}{e.NewStartingIndex}{e.OldItems}{e.OldStartingIndex}"; };
}

public void Include(INotifyPropertyChanged changed)
{
changed.PropertyChanged += (sender, e) => { _ = e.PropertyName; };
}

public void Include(MvxPropertyInjector injector)
{
_ = new MvxPropertyInjector();
}

public void Include(MvxTaskBasedBindingContext context)
{
context.Dispose();
var context2 = new MvxTaskBasedBindingContext();
context2.Dispose();
}

public void Include(MvxViewModelViewTypeFinder viewModelViewTypeFinder)
{
_ = new MvxViewModelViewTypeFinder(null, null);
}

public void Include(MvxNavigationService service, IMvxViewModelLoader loader)
{
_ = new MvxNavigationService(null, loader);
_ = new MvxAppStart<MvxNullViewModel>(null, null);
}

public void Include(System.ComponentModel.INotifyPropertyChanged changed)
public void Include(ConsoleColor color)
{
changed.PropertyChanged += (sender, e) => {
var test = e.PropertyName;
};
Console.Write("");
Console.WriteLine("");
_ = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Red;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.ForegroundColor = ConsoleColor.Magenta;
Console.ForegroundColor = ConsoleColor.White;
Console.ForegroundColor = ConsoleColor.Gray;
Console.ForegroundColor = ConsoleColor.DarkGray;
}
}
}
4 changes: 2 additions & 2 deletions Babel/Babel.Droid/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="21" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
<application></application>
</manifest>
Loading