android - Navigation Drawer Item ByDefault selected not on click andorid -


i new android, using navigation drawer displaying item list.

i faced issues, when come navigation activity, list name restaurant displayed. restaurant item included in drawer item similar other one. first time when come navigation activity, want highlight restaurant item. how can it?

kindly tell me.

this simple 1 line code:

navigationview.getmenu().getitem(0).setchecked(true); 

and can select(highlight) item calling

onnavigationitemselected(navigationview.getmenu().getitem(0)); 

and call , item index solution can refer link.. solve problem.

navigation drawer: how set selected item @ startup?

if not copy code can tell how use code.


Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -