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

How to start daemon on android by adb -

testing - Detect whether test has failed within fixture -

Angularjs unit testing - ng-disabled not working when adding text to textarea -