android - How to listen to long click on a navigationview item? -
i'm developing android app using design library , appcompat library. i'm facing issues when tried listen long click on menu item. app has navigationview side menu, inside navigationview had menu lot of items. can listen click of these items can't listen long click. know how implement it?
thanks.
update
you can use:
menu mymenu = navigationview.getmenu(); menuitem myitem = mymenu.finditem(r.id.my_item); myitem.setonlongclicklistener(new view.onlongclicklistener() { @override public boolean onlongclick(view v) { // } });
Comments
Post a Comment