menu_gps.xml 1009 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--For all properties see: http://developer.android.com/guide/topics/resources/menu-resource.html-->
  3. <menu xmlns:android="http://schemas.android.com/apk/res/android"
  4. xmlns:app="http://schemas.android.com/apk/res-auto">
  5. <!--Update strings and icons-->
  6. <item android:id="@+id/action_edit"
  7. android:title="GPS"
  8. app:showAsAction="ifRoom"/>
  9. </menu>
  10. <!-- Code to implement into Activity:
  11. public override bool OnCreateOptionsMenu(IMenu menu)
  12. {
  13. //change main_compat_menu
  14. MenuInflater.Inflate(Resource.Menu.menu_gps, menu);
  15. return base.OnCreateOptionsMenu(menu);
  16. }
  17. public override bool OnOptionsItemSelected(IMenuItem item)
  18. {
  19. switch (item.ItemId) {
  20. case Resource.Id.action_edit:
  21. Toast.MakeText (this, "You pressed edit action!", ToastLength.Short).Show ();
  22. break;
  23. case Resource.Id.action_save:
  24. Toast.MakeText (this, "You pressed save action!", ToastLength.Short).Show ();
  25. break;
  26. }
  27. return base.OnOptionsItemSelected(item);
  28. }
  29. -->