popupmenu - Popup menu is not working in options menu android -


I made options menu in Android. After that I have to attach the popup menu to the Options menu icon.in popup menu, it needs an anchor but I have the option menu id. Then how to get anchor view from option menu id. Please help me

code:

  switch (item.getItemId ()) {Case R.id.settings: popup menu popup = new popup menu (NavigationActivityIs, R .setting); ==> Error // XML file popup .getMenuInflater (). To increase popup by using (R. Menus, Popup. Meten ()); Return super.onOptionsItemSelected (item); } Back true; }  


Comments