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:
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 }
Comments
Post a Comment