1

Is it possible to get Action bar overflow button click listener ?

I have 3 options in action bar overflow button, and I want to capture the event when user clicked on overflow button. Is is possible to capture that click event ? Any idea ?

4
  • 1
    How about you post some relevant code? Show us what you tried so far. Commented Mar 26, 2014 at 6:38
  • THis is just a simple question. I don't any code base required for explaining the problem Commented Oct 22, 2016 at 10:17
  • This Answer works like a charm. Commented Oct 22, 2016 at 10:21
  • if you want to manipulate the menu items on the click of the overflow button then better do this in onCreateOptionMenu Commented Oct 22, 2016 at 10:33

1 Answer 1

1

Unfortunately, no.

The overflow Button is created dynamically from a private inner class of the ActionMenuPresenter, which is an internal part of the framework that places each MenuItem in the ActionBar. There's just no way to attach a listener to it.

ActionMenuPrestener source

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.