Question

I´m sure it´s on stackoverflow, I´ve been searching but I can´t find it. Which method is called when nothing in the optionsmenu is selected, but when it closes?

 @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.splashmenu, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {

And I´m missing one...

Thanks!

Was it helpful?

Solution

Its called onOptionsMenuClosed .

@Override
public void onOptionsMenuClosed(Menu menu) {
    super.onOptionsMenuClosed(menu);
    //do your business
}

OTHER TIPS

In my case it´s

  @Override
public void onPanelClosed(int featureId, Menu menu) {
  showingMenu = false;
  super.onPanelClosed(featureId, menu);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top