android - Inflate context menu in a SherlockListFragment -


how create contextmenu xml in sherlocklistfragment. know (see in examples)

@override public void oncreatecontextmenu(contextmenu menu, view v, contextmenu.contextmenuinfo menuinfo) {     menu.add("one");     menu.add("two");     menu.add("three");     menu.add("four"); } 

this work sherlocklistfragment wanna inflate menu/context_menu.xml

after while found solution

@override public void oncreatecontextmenu(contextmenu menu, view v, contextmenuinfo menuinfo) {     getsherlockactivity().getmenuinflater().inflate(r.menu.context_menu, menu); } 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -