0

Google Glass online documentation mentions the method but with minimal documentation:

https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/view/MenuUtils

Should this be called from onOptionsItemSelected or onCreateOptionsMenu?

Any example code would be most appreciated.

Tony Allevato
  • 6,429
  • 1
  • 29
  • 34

1 Answers1

0

You should call this method from onCreateOptionsMenu or onPrepareOptionsMenu in order to set the menu item that will be initially visible when the user asks for the menu to be displayed. If you call it from onOptionsItemSelected, then it will be too late, since the menu was already displayed and interacted with.

Tony Allevato
  • 6,429
  • 1
  • 29
  • 34