android - Show custom popup over ActionBar's navigation icon -


i found material design patterns android on link: https://ui8.net/product/material-ui-kit-cooking
there popup menu want implement. didn't find in android sdk.
1. fastest method create popup?
2. how can position popup overflow actionbar's navigation icon?

popup menu

you can use thing this

public class listpopupwindowappactivity extends activity implements onitemclicklistener { edittext productname; listpopupwindow listpopupwindow; string[] products={"camera", "laptop", "watch","smartphone",     "television"};  @override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_list_popup_window_app);     productname = (edittext) findviewbyid(         r.id.product_name);     listpopupwindow = new listpopupwindow(         listpopupwindowappactivity.this);     listpopupwindow.setadapter(new arrayadapter(         listpopupwindowappactivity.this,         r.layout.list_item, products));     listpopupwindow.setanchorview(productname);     listpopupwindow.setwidth(300);     listpopupwindow.setheight(400);      listpopupwindow.setmodal(true);     listpopupwindow.setonitemclicklistener(         listpopupwindowappactivity.this);     productname.setonclicklistener(new onclicklistener() {         public void onclick(view v) {             listpopupwindow.show();         }     }); }  @override public void onitemclick(adapterview<?> parent, view view,     int position, long id) {     productname.settext(products[position]);     listpopupwindow.dismiss(); } } 

keep custom adapter if want custom row. hope helps if yes let me know friends :)


Comments