From f3767ca5418d06a5ee7ecc116a4703b2ea3f458a Mon Sep 17 00:00:00 2001 From: Me on Windows Date: Sun, 6 Jun 2021 19:48:47 +0000 Subject: [PATCH] Create the activities the other way round It would be hard to switch what we include from root activity, so rather have different root activities with re-used components --- QuickPlay/MainActivity.cs | 2 +- QuickPlay/QuickPlay.csproj | 3 + QuickPlay/Resources/Resource.designer.cs | 206 +++++++++---------- QuickPlay/Resources/layout/activity_main.xml | 67 +++--- QuickPlay/Resources/layout/commonTopBar.axml | 37 ++++ QuickPlay/Resources/layout/content_main.xml | 30 --- 6 files changed, 172 insertions(+), 173 deletions(-) create mode 100644 QuickPlay/Resources/layout/commonTopBar.axml delete mode 100644 QuickPlay/Resources/layout/content_main.xml diff --git a/QuickPlay/MainActivity.cs b/QuickPlay/MainActivity.cs index 5136ee2..937cceb 100644 --- a/QuickPlay/MainActivity.cs +++ b/QuickPlay/MainActivity.cs @@ -56,7 +56,7 @@ namespace QuickPlay if (item.ItemId == Resource.Id.action_settings) Toast.MakeText(this, "Here would be settings, when someone creates it", Android.Widget.ToastLength.Short).Show(); if (item.ItemId == Resource.Id.action_edit) - Android.Support.Design.Widget.Snackbar.Make(FindViewById(Resource.Id.include1), "No editing this time", 10000).Show(); + Android.Support.Design.Widget.Snackbar.Make(FindViewById(Resource.Id.commonTopBar), "No editing this time", 10000).Show(); return base.OnOptionsItemSelected(item); } diff --git a/QuickPlay/QuickPlay.csproj b/QuickPlay/QuickPlay.csproj index 854b27c..5e3bf35 100644 --- a/QuickPlay/QuickPlay.csproj +++ b/QuickPlay/QuickPlay.csproj @@ -216,6 +216,9 @@ + + + + \ No newline at end of file diff --git a/QuickPlay/Resources/layout/commonTopBar.axml b/QuickPlay/Resources/layout/commonTopBar.axml new file mode 100644 index 0000000..c78ecf0 --- /dev/null +++ b/QuickPlay/Resources/layout/commonTopBar.axml @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/QuickPlay/Resources/layout/content_main.xml b/QuickPlay/Resources/layout/content_main.xml deleted file mode 100644 index a49ad43..0000000 --- a/QuickPlay/Resources/layout/content_main.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - -