Abandoned Xamarin attempt

This commit is contained in:
Daniel J. Summers 2019-07-13 21:33:36 -05:00
parent a11302afc3
commit 70a65b5f15
18 changed files with 0 additions and 413 deletions

View File

@ -1,19 +0,0 @@
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 you 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");

View File

@ -1,33 +0,0 @@
namespace MyPrayerJournal.Mobile.Android
open System
open Android.App
open Android.Content
open Android.OS
open Android.Runtime
open Android.Views
open Android.Widget
type Resources = MyPrayerJournal.Mobile.Android.Resource
[<Activity (Label = "MyPrayerJournal.Mobile.Android", MainLauncher = true, Icon = "@mipmap/icon")>]
type MainActivity () =
inherit Activity ()
let mutable count:int = 1
override this.OnCreate (bundle) =
base.OnCreate (bundle)
// Set our view from the "main" layout resource
this.SetContentView (Resources.Layout.Main)
// Get our button from the layout resource, and attach an event to it
let button = this.FindViewById<Button>(Resources.Id.myButton)
button.Click.Add (fun args ->
button.Text <- sprintf "%d clicks!" count
count <- count + 1
)

View File

@ -1,94 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{F2A71F9B-5D33-465A-A702-920D77279786}</ProjectTypeGuids>
<ProjectGuid>49245e65-f905-4073-b057-3bceed076a1f</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>MyPrayerJournal.Mobile.Android</RootNamespace>
<AssemblyName>MyPrayerJournal.Mobile.Android</AssemblyName>
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
<Name>MyPrayerJournal.Mobile.Android</Name>
<SelectedDevice>test-5x</SelectedDevice>
<DefaultDevice>test-5x</DefaultDevice>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<AndroidLinkMode>None</AndroidLinkMode>
<ConsolePause>False</ConsolePause>
<Tailcalls>False</Tailcalls>
<PlatformTarget>
</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>PdbOnly</DebugType>
<DebugSymbols>True</DebugSymbols>
<Optimize>True</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<PlatformTarget>
</PlatformTarget>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<ConsolePause>False</ConsolePause>
<Tailcalls>True</Tailcalls>
<DefineConstants>
</DefineConstants>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<GenerateTailCalls>true</GenerateTailCalls>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.FSharp.targets" />
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<AndroidResource Include="Resources\layout\Main.axml" />
<AndroidResource Include="Resources\values\Strings.xml" />
<AndroidResource Include="Resources\mipmap-hdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-mdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\Icon.png" />
<None Include="Properties\AndroidManifest.xml" />
<Compile Include="Properties\AssemblyInfo.fs" />
<Compile Include="MainActivity.fs" />
<AndroidAsset Include="Assets\AboutAssets.txt" />
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="FSharp.Core">
<HintPath>..\packages\FSharp.Core.4.0.0.1\lib\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="mscorlib" />
<Reference Include="Mono.Android" />
<Reference Include="Xamarin.Android.FSharp.ResourceProvider.Runtime">
<HintPath>..\packages\Xamarin.Android.FSharp.ResourceProvider.1.0.0.13\lib\Xamarin.Android.FSharp.ResourceProvider.Runtime.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyPrayerJournal.Domain\MyPrayerJournal.Domain.fsproj">
<Name>MyPrayerJournal.Domain</Name>
<Project>{6236760d-b21e-4187-9d0b-7d5e1c6ad896}</Project>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\MyPrayerJournal.Mobile.Core\MyPrayerJournal.Mobile.Core.fsproj">
<Name>MyPrayerJournal.Mobile.Core</Name>
<Project>{537d56c5-b55b-4f6c-af80-39f3bf4fd903}</Project>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
</Project>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0"
package="me.prayerjournal.android">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
<application android:allowBackup="true" android:icon="@mipmap/icon" android:label="@string/app_name">
</application>
</manifest>

View File

@ -1,32 +0,0 @@
namespace MyPrayerJournal.Mobile.Android
module AssemblyInfo =
open System.Reflection
open System.Runtime.CompilerServices
open Android.App
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[<assembly: AssemblyTitle("MyPrayerJournal.Mobile.Android")>]
[<assembly: AssemblyDescription("")>]
[<assembly: AssemblyConfiguration("")>]
[<assembly: AssemblyCompany("HP Inc.")>]
[<assembly: AssemblyProduct("MyPrayerJournal.Mobile.Android")>]
[<assembly: AssemblyCopyright("Copyright © HP Inc. 2019")>]
[<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.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("")>]
()

View File

@ -1,44 +0,0 @@
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.

View File

@ -1,112 +0,0 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("MyPrayerJournal.Mobile.Android.Resource", IsApplication=true)]
namespace MyPrayerJournal.Mobile.Android
{
[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 Id
{
// aapt resource value: 0x7f050000
public const int myButton = 2131034112;
static Id()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Id()
{
}
}
public partial class Layout
{
// aapt resource value: 0x7f030000
public const int Main = 2130903040;
static Layout()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Layout()
{
}
}
public partial class Mipmap
{
// aapt resource value: 0x7f020000
public const int Icon = 2130837504;
static Mipmap()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Mipmap()
{
}
}
public partial class String
{
// aapt resource value: 0x7f040001
public const int app_name = 2130968577;
// aapt resource value: 0x7f040000
public const int hello = 2130968576;
static String()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private String()
{
}
}
}
}
#pragma warning restore 1591

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button android:id="@+id/myButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, Click Me!</string>
<string name="app_name">MyPrayerJournal.Mobile.Android</string>
</resources>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FSharp.Core" version="4.0.0.1" targetFramework="monoandroid60" />
<package id="Xamarin.Android.FSharp.ResourceProvider" version="1.0.0.13" targetFramework="monoandroid60" />
</packages>

View File

@ -1,5 +0,0 @@
namespace MyPrayerJournal.Mobile.Core
module Say =
let hello name =
printfn "Hello %s" name

View File

@ -1,11 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Library.fs" />
</ItemGroup>
</Project>

View File

@ -7,10 +7,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "MyPrayerJournal.Domain", "M
EndProject EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "MyPrayerJournal.Api", "MyPrayerJournal.Api\MyPrayerJournal.Api.fsproj", "{1887D1E1-544A-4F54-B266-38E7867DC842}" Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "MyPrayerJournal.Api", "MyPrayerJournal.Api\MyPrayerJournal.Api.fsproj", "{1887D1E1-544A-4F54-B266-38E7867DC842}"
EndProject EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MyPrayerJournal.Mobile.Core", "MyPrayerJournal.Mobile.Core\MyPrayerJournal.Mobile.Core.fsproj", "{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MyPrayerJournal.Mobile.Android", "MyPrayerJournal.Mobile.Android\MyPrayerJournal.Mobile.Android.fsproj", "{49245E65-F905-4073-B057-3BCEED076A1F}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -45,36 +41,6 @@ Global
{1887D1E1-544A-4F54-B266-38E7867DC842}.Release|iPhone.Build.0 = Release|Any CPU {1887D1E1-544A-4F54-B266-38E7867DC842}.Release|iPhone.Build.0 = Release|Any CPU
{1887D1E1-544A-4F54-B266-38E7867DC842}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {1887D1E1-544A-4F54-B266-38E7867DC842}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{1887D1E1-544A-4F54-B266-38E7867DC842}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {1887D1E1-544A-4F54-B266-38E7867DC842}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Debug|Any CPU.Build.0 = Debug|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Debug|iPhone.Build.0 = Debug|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Release|Any CPU.ActiveCfg = Release|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Release|Any CPU.Build.0 = Release|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Release|iPhone.ActiveCfg = Release|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Release|iPhone.Build.0 = Release|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{537D56C5-B55B-4F6C-AF80-39F3BF4FD903}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Debug|iPhone.Build.0 = Debug|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Release|Any CPU.Build.0 = Release|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Release|Any CPU.Deploy.0 = Release|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Release|iPhone.ActiveCfg = Release|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Release|iPhone.Build.0 = Release|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Release|iPhone.Deploy.0 = Release|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{49245E65-F905-4073-B057-3BCEED076A1F}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE