android - How can I show popup window below RecyclerView item? -


how can show popup window below recyclerview item?

i should use popupwindow, because menu customized layout

see image:

enter image description here

showpopupmenu(view); pass view want attach popup?

    void showpopupmenu(view anchor) {         popupmenu popup = new popupmenu(mainactivity.this, anchor);         //inflating popup using xml file         popup.getmenuinflater().inflate(r.menu.popup_menu, popup.getmenu());          //registering popup onmenuitemclicklistener         popup.setonmenuitemclicklistener(new popupmenu.onmenuitemclicklistener() {             public boolean onmenuitemclick(menuitem item) {                 toast.maketext(mainactivity.this, "you clicked : " + item.gettitle(), toast.length_short).show();                 return true;             }         });          popup.show();//showing popup menu     } 

full demo


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -