diff --git a/QuickPlay.sln b/QuickPlay.sln new file mode 100644 index 0000000..54c5126 --- /dev/null +++ b/QuickPlay.sln @@ -0,0 +1,27 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31112.23 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickPlay", "QuickPlay\QuickPlay.csproj", "{FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Release|Any CPU.Build.0 = Release|Any CPU + {FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Release|Any CPU.Deploy.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {36EE9F92-9FC0-4EEE-A3AA-9EE43A4E2B86} + EndGlobalSection +EndGlobal diff --git a/QuickPlay/Assets/AboutAssets.txt b/QuickPlay/Assets/AboutAssets.txt new file mode 100644 index 0000000..dcb0409 --- /dev/null +++ b/QuickPlay/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"); \ No newline at end of file diff --git a/QuickPlay/MainActivity.cs b/QuickPlay/MainActivity.cs new file mode 100644 index 0000000..531edb4 --- /dev/null +++ b/QuickPlay/MainActivity.cs @@ -0,0 +1,60 @@ +using System; +using Android.App; +using Android.OS; +using Android.Runtime; +using Android.Views; +using AndroidX.AppCompat.Widget; +using AndroidX.AppCompat.App; +using Google.Android.Material.FloatingActionButton; +using Google.Android.Material.Snackbar; + +namespace QuickPlay +{ + [Activity(Label = "@string/app_name", Theme = "@style/AppTheme.NoActionBar", MainLauncher = true)] + public class MainActivity : AppCompatActivity + { + protected override void OnCreate(Bundle savedInstanceState) + { + base.OnCreate(savedInstanceState); + Xamarin.Essentials.Platform.Init(this, savedInstanceState); + SetContentView(Resource.Layout.activity_main); + + Toolbar toolbar = FindViewById(Resource.Id.toolbar); + SetSupportActionBar(toolbar); + + FloatingActionButton fab = FindViewById(Resource.Id.fab); + fab.Click += FabOnClick; + } + + public override bool OnCreateOptionsMenu(IMenu menu) + { + MenuInflater.Inflate(Resource.Menu.menu_main, menu); + return true; + } + + public override bool OnOptionsItemSelected(IMenuItem item) + { + int id = item.ItemId; + if (id == Resource.Id.action_settings) + { + return true; + } + + return base.OnOptionsItemSelected(item); + } + + private void FabOnClick(object sender, EventArgs eventArgs) + { + View view = (View) sender; + Snackbar.Make(view, "Replace with your own action", Snackbar.LengthLong) + .SetAction("Action", (View.IOnClickListener)null).Show(); + } + + 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); + } + } +} diff --git a/QuickPlay/Properties/AndroidManifest.xml b/QuickPlay/Properties/AndroidManifest.xml new file mode 100644 index 0000000..4c813be --- /dev/null +++ b/QuickPlay/Properties/AndroidManifest.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/QuickPlay/Properties/AssemblyInfo.cs b/QuickPlay/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b67884d --- /dev/null +++ b/QuickPlay/Properties/AssemblyInfo.cs @@ -0,0 +1,26 @@ +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("QuickPlay")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("QuickPlay")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[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")] diff --git a/QuickPlay/QuickPlay.csproj b/QuickPlay/QuickPlay.csproj new file mode 100644 index 0000000..37753bc --- /dev/null +++ b/QuickPlay/QuickPlay.csproj @@ -0,0 +1,119 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C} + {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {84dd83c5-0fe3-4294-9419-09e7c8ba324f} + Library + Properties + QuickPlay + QuickPlay + 512 + True + True + Resources\Resource.designer.cs + Resource + Off + false + v11.0 + Properties\AndroidManifest.xml + Resources + Assets + true + true + + + True + portable + False + bin\Debug\ + DEBUG;TRACE + prompt + 4 + True + None + False + + + True + portable + True + bin\Release\ + TRACE + prompt + 4 + true + False + SdkOnly + True + + + + + + + + + + + + + + + + + + + + + + Designer + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/QuickPlay/Resources/AboutResources.txt b/QuickPlay/Resources/AboutResources.txt new file mode 100644 index 0000000..096447a --- /dev/null +++ b/QuickPlay/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.xml), +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.xml + + 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.xml file, or R.strings.first_string to reference the first +string in the dictionary file values/strings.xml. \ No newline at end of file diff --git a/QuickPlay/Resources/Resource.designer.cs b/QuickPlay/Resources/Resource.designer.cs new file mode 100644 index 0000000..93b192b --- /dev/null +++ b/QuickPlay/Resources/Resource.designer.cs @@ -0,0 +1,112 @@ +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +[assembly: global::Android.Runtime.ResourceDesignerAttribute("QuickPlay.Resource", IsApplication=true)] + +namespace QuickPlay +{ + + + [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 diff --git a/QuickPlay/Resources/layout/activity_main.xml b/QuickPlay/Resources/layout/activity_main.xml new file mode 100644 index 0000000..b105098 --- /dev/null +++ b/QuickPlay/Resources/layout/activity_main.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + diff --git a/QuickPlay/Resources/layout/content_main.xml b/QuickPlay/Resources/layout/content_main.xml new file mode 100644 index 0000000..5662d6d --- /dev/null +++ b/QuickPlay/Resources/layout/content_main.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/QuickPlay/Resources/menu/menu_main.xml b/QuickPlay/Resources/menu/menu_main.xml new file mode 100644 index 0000000..ace8c65 --- /dev/null +++ b/QuickPlay/Resources/menu/menu_main.xml @@ -0,0 +1,9 @@ + + + diff --git a/QuickPlay/Resources/mipmap-anydpi-v26/ic_launcher.xml b/QuickPlay/Resources/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/QuickPlay/Resources/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/QuickPlay/Resources/mipmap-anydpi-v26/ic_launcher_round.xml b/QuickPlay/Resources/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/QuickPlay/Resources/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/QuickPlay/Resources/mipmap-hdpi/ic_launcher.png b/QuickPlay/Resources/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..2531cb3 Binary files /dev/null and b/QuickPlay/Resources/mipmap-hdpi/ic_launcher.png differ diff --git a/QuickPlay/Resources/mipmap-hdpi/ic_launcher_foreground.png b/QuickPlay/Resources/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..7a859c2 Binary files /dev/null and b/QuickPlay/Resources/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/QuickPlay/Resources/mipmap-hdpi/ic_launcher_round.png b/QuickPlay/Resources/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..b8d35b3 Binary files /dev/null and b/QuickPlay/Resources/mipmap-hdpi/ic_launcher_round.png differ diff --git a/QuickPlay/Resources/mipmap-mdpi/ic_launcher.png b/QuickPlay/Resources/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..795ea7c Binary files /dev/null and b/QuickPlay/Resources/mipmap-mdpi/ic_launcher.png differ diff --git a/QuickPlay/Resources/mipmap-mdpi/ic_launcher_foreground.png b/QuickPlay/Resources/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..a12b157 Binary files /dev/null and b/QuickPlay/Resources/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/QuickPlay/Resources/mipmap-mdpi/ic_launcher_round.png b/QuickPlay/Resources/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..8f56909 Binary files /dev/null and b/QuickPlay/Resources/mipmap-mdpi/ic_launcher_round.png differ diff --git a/QuickPlay/Resources/mipmap-xhdpi/ic_launcher.png b/QuickPlay/Resources/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..761cc91 Binary files /dev/null and b/QuickPlay/Resources/mipmap-xhdpi/ic_launcher.png differ diff --git a/QuickPlay/Resources/mipmap-xhdpi/ic_launcher_foreground.png b/QuickPlay/Resources/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..e7d70a5 Binary files /dev/null and b/QuickPlay/Resources/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/QuickPlay/Resources/mipmap-xhdpi/ic_launcher_round.png b/QuickPlay/Resources/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..9737d79 Binary files /dev/null and b/QuickPlay/Resources/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/QuickPlay/Resources/mipmap-xxhdpi/ic_launcher.png b/QuickPlay/Resources/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..9133e31 Binary files /dev/null and b/QuickPlay/Resources/mipmap-xxhdpi/ic_launcher.png differ diff --git a/QuickPlay/Resources/mipmap-xxhdpi/ic_launcher_foreground.png b/QuickPlay/Resources/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..73ccaa6 Binary files /dev/null and b/QuickPlay/Resources/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/QuickPlay/Resources/mipmap-xxhdpi/ic_launcher_round.png b/QuickPlay/Resources/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..c3ae5f5 Binary files /dev/null and b/QuickPlay/Resources/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/QuickPlay/Resources/mipmap-xxxhdpi/ic_launcher.png b/QuickPlay/Resources/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..d4fd714 Binary files /dev/null and b/QuickPlay/Resources/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/QuickPlay/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png b/QuickPlay/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..f6584af Binary files /dev/null and b/QuickPlay/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/QuickPlay/Resources/mipmap-xxxhdpi/ic_launcher_round.png b/QuickPlay/Resources/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..ef89bd5 Binary files /dev/null and b/QuickPlay/Resources/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/QuickPlay/Resources/values/colors.xml b/QuickPlay/Resources/values/colors.xml new file mode 100644 index 0000000..17bb9a9 --- /dev/null +++ b/QuickPlay/Resources/values/colors.xml @@ -0,0 +1,6 @@ + + + #2c3e50 + #1B3147 + #3498db + diff --git a/QuickPlay/Resources/values/dimens.xml b/QuickPlay/Resources/values/dimens.xml new file mode 100644 index 0000000..59a0b0c --- /dev/null +++ b/QuickPlay/Resources/values/dimens.xml @@ -0,0 +1,3 @@ + + 16dp + diff --git a/QuickPlay/Resources/values/ic_launcher_background.xml b/QuickPlay/Resources/values/ic_launcher_background.xml new file mode 100644 index 0000000..6ec24e6 --- /dev/null +++ b/QuickPlay/Resources/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #2C3E50 + \ No newline at end of file diff --git a/QuickPlay/Resources/values/strings.xml b/QuickPlay/Resources/values/strings.xml new file mode 100644 index 0000000..7903abe --- /dev/null +++ b/QuickPlay/Resources/values/strings.xml @@ -0,0 +1,4 @@ + + QuickPlay + Settings + diff --git a/QuickPlay/Resources/values/styles.xml b/QuickPlay/Resources/values/styles.xml new file mode 100644 index 0000000..fef37f9 --- /dev/null +++ b/QuickPlay/Resources/values/styles.xml @@ -0,0 +1,20 @@ + + + + + + + +