title: How to check if drop down menu of ActionBar is active
body: <p>I'm using the ActionBar extending from the AppCompatActivity. How can I check, if the dropdown menu of the ActionBar is opened at the moment.</p>
  
  <p>I've tried it in this method. But it does not fire if I open the drop down menu:</p>
  
  <pre><code>@Override
  public boolean onOptionsItemSelected(MenuItem item) {
      Intent intent = new Intent();
  
      Log.i("ActionBar", "ActionBar dropdown is open at this moment");
  
      switch (item.getItemId()) {
          case R.id.preferences:
              intent.setClass(StartupActivity.this, PreferencesActivity.class);
              startActivityForResult(intent, 0);
              return true;
          case R.id.info:
              intent.setClass(StartupActivity.this, InformationActivity.class);
              startActivityForResult(intent, 0);
              return true;
          case R.id.contact:
              intent.setClass(StartupActivity.this, ContactActivity.class);
              startActivityForResult(intent, 0);
              return true;
          default:
              return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p>It only fires, if I click on an item of the drop down menu. But I want to check, if the user clicks on the three-dot menu.</p>
  
  <p><img src="https://i.stack.imgur.com/KsZfW.png" alt="enter image description here"></p>