-
Notifications
You must be signed in to change notification settings - Fork 778
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #747 from vb2ae/Update_Setup_Projects
Update setup projects
- Loading branch information
Showing
156 changed files
with
22,167 additions
and
9,611 deletions.
There are no files selected for viewing
9,172 changes: 69 additions & 9,103 deletions
9,172
samples/features/Features.Forms/Features.Forms.Android/Resources/Resource.designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 21 additions & 6 deletions
27
samples/setup/Setup.Android/Resources/Resource.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Caliburn.Micro" version="3.0.3" targetFramework="monoandroid60" /> | ||
<package id="Caliburn.Micro.Core" version="3.0.3" targetFramework="monoandroid60" /> | ||
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="monoandroid90" /> | ||
<package id="vb2ae.Caliburn.Micro" version="4.0.169-g30e441eef5" targetFramework="monoandroid90" /> | ||
<package id="vb2ae.Caliburn.Micro.Core" version="4.0.169-g30e441eef5" targetFramework="monoandroid90" /> | ||
</packages> |
3 changes: 1 addition & 2 deletions
3
samples/setup/Setup.Forms/Setup.Forms.Droid/Resources/Resource.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
samples/setup/Setup.Forms5/Setup.Forms5/Setup.Forms5.Android/Application.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Text; | ||
|
||
using Android.App; | ||
using Android.Content; | ||
using Android.OS; | ||
using Android.Runtime; | ||
using Android.Views; | ||
using Android.Widget; | ||
using Caliburn.Micro; | ||
using Setup.Forms5.ViewModels; | ||
|
||
namespace Setup.Forms5.Droid | ||
{ | ||
[Application] | ||
public class Application : CaliburnApplication | ||
{ | ||
private SimpleContainer container; | ||
|
||
public Application(IntPtr javaReference, JniHandleOwnership transfer) | ||
: base(javaReference, transfer) | ||
{ | ||
|
||
} | ||
|
||
public override void OnCreate() | ||
{ | ||
base.OnCreate(); | ||
|
||
Initialize(); | ||
} | ||
|
||
protected override void Configure() | ||
{ | ||
container = new SimpleContainer(); | ||
container.Instance(container); | ||
container.Singleton<App>(); | ||
} | ||
|
||
protected override IEnumerable<Assembly> SelectAssemblies() | ||
{ | ||
return new[] | ||
{ | ||
GetType().Assembly, | ||
typeof (HomeViewModel).Assembly | ||
}; | ||
} | ||
|
||
protected override void BuildUp(object instance) | ||
{ | ||
container.BuildUp(instance); | ||
} | ||
|
||
protected override IEnumerable<object> GetAllInstances(Type service) | ||
{ | ||
return container.GetAllInstances(service); | ||
} | ||
|
||
protected override object GetInstance(Type service, string key) | ||
{ | ||
return container.GetInstance(service, key); | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
samples/setup/Setup.Forms5/Setup.Forms5/Setup.Forms5.Android/Assets/AboutAssets.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); |
30 changes: 30 additions & 0 deletions
30
samples/setup/Setup.Forms5/Setup.Forms5/Setup.Forms5.Android/MainActivity.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
|
||
using Android.App; | ||
using Android.Content.PM; | ||
using Android.Runtime; | ||
using Android.OS; | ||
using Caliburn.Micro; | ||
using Setup.Forms5; | ||
|
||
namespace Setup.Forms5.Droid | ||
{ | ||
[Activity(Label = "Setup.Forms5", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize )] | ||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity | ||
{ | ||
protected override void OnCreate(Bundle savedInstanceState) | ||
{ | ||
base.OnCreate(savedInstanceState); | ||
|
||
Xamarin.Essentials.Platform.Init(this, savedInstanceState); | ||
global::Xamarin.Forms.Forms.Init(this, savedInstanceState); | ||
LoadApplication(IoC.Get<Setup.Forms5.App>()); | ||
} | ||
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) | ||
{ | ||
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); | ||
|
||
base.OnRequestPermissionsResult(requestCode, permissions, grantResults); | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
samples/setup/Setup.Forms5/Setup.Forms5/Setup.Forms5.Android/Properties/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?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="com.companyname.setup.forms5" android:installLocation="auto"> | ||
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="30" /> | ||
<application android:label="Setup.Forms5.Android" android:theme="@style/MainTheme"></application> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
</manifest> |
30 changes: 30 additions & 0 deletions
30
samples/setup/Setup.Forms5/Setup.Forms5/Setup.Forms5.Android/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
using Android.App; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("Setup.Forms5.Android")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("Setup.Forms5.Android")] | ||
[assembly: AssemblyCopyright("Copyright © 2014")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
[assembly: ComVisible(false)] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
|
||
// Add some common permissions, these can be removed if not needed | ||
[assembly: UsesPermission(Android.Manifest.Permission.Internet)] | ||
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] |
Oops, something went wrong.