Add a trivial Menu

develop
LEdoian 4 years ago
parent 8f268a060d
commit 12c72d30bb

@ -2,7 +2,8 @@
using Android.App;
using Android.OS;
//using Android.Runtime;
//using Android.Views;
using Android.Views;
using Android.Widget;
//using AndroidX.AppCompat.Widget;
//using AndroidX.AppCompat.App;
//using Google.Android.Material.FloatingActionButton;
@ -44,6 +45,18 @@ namespace QuickPlay
SupportActionBar.Title = "My Toolbar";
}
public override bool OnCreateOptionsMenu(IMenu menu)
{
MenuInflater.Inflate(Resource.Menu.menu_main, menu);
return base.OnCreateOptionsMenu(menu);
}
public override bool OnOptionsItemSelected(IMenuItem item)
{
Toast.MakeText(this, "Here would be settings, when someone creates it", Android.Widget.ToastLength.Short).Show();
return base.OnOptionsItemSelected(item);
}
List<PlayerConfiguration> acquirePlayerConfigs()
{
// FIXME: Bad! We have IPlayerConfigurationProviders

@ -4039,8 +4039,8 @@ namespace QuickPlay
// aapt resource value: 0x7f0c001a
public const int abc_toolbar_collapse_description = 2131492890;
// aapt resource value: 0x7f0c0037
public const int action_settings = 2131492919;
// aapt resource value: 0x7f0c0038
public const int action_settings = 2131492920;
// aapt resource value: 0x7f0c0036
public const int app_name = 2131492918;
@ -4084,8 +4084,8 @@ namespace QuickPlay
// aapt resource value: 0x7f0c0034
public const int path_password_strike_through = 2131492916;
// aapt resource value: 0x7f0c0038
public const int player_name = 2131492920;
// aapt resource value: 0x7f0c0037
public const int player_name = 2131492919;
// aapt resource value: 0x7f0c001b
public const int search_menu_title = 2131492891;

@ -5,5 +5,7 @@
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="never" />
android:icon="@mipmap/ic_launcher_round"
app:showAsAction="ifRoom" />
<!-- Use gearwheel for settings, when we have net. -->
</menu>

@ -1,5 +1,6 @@
<resources>
<string name="app_name">QuickPlay</string>
<string name="action_settings">Settings</string>
<string name="player_name">Not Connected!</string>
<string name="action_settings">Settings</string>
</resources>

Loading…
Cancel
Save