I have a toolbar menu in my android app, the menu is populated by xml like this...
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".activities.MenuAdsAppCompatActivity">
<item
android:id="@+id/expanded_menu"
android:icon="@drawable/ic_more_white"
android:title="action_notification"
app:showAsAction="always">
<menu>
<item
android:id="@+id/action_settings"
android:icon="@drawable/ic_settings"
android:menuCategory="secondary"
android:title="@string/action_settings" />
...
</menu></item></menu>
i inflate it like this:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
return true;
}
On my actionbar the expanded_menu
is shown and when user presses it an popup window appers with the other items
This is working as expected, the problem is:
I NEED A REFERENCE TO THIS POPUP WINDOW CREATED ON PRESS ACTION BAR
As all this menu process is created through android framework i have no referece to the popup menu or itself, i can get the reference to the menuitens during its inflation but i don't know how to get reference to the popup