Search code examples
androidandroid-actionbarandroid-optionsmenu

Android: How to add a click listener to menu icon(3 dots at the top)?


The onOptionsItemSelected(MenuItem item) method can be used to identify a click on each menu item. But i need to have a listener that can identify the click on the menu title (3 vertical dots at the top right of action bar). How could i implement one?


Solution

  • You can override onMenuOpened(javadoc) on your activity.