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

sql - invalid in the select list because it is not contained in either an aggregate function -

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

How to start daemon on android by adb -