Rajat Dembla Rajat Dembla - 1 year ago 180
Android Question

Open new Activity after click item in navigation drawer menu

Hello Everyone I am a beginner and just started coding in android i found a tutorial regarding, how to make navigation drawer.

Tutorial Link:- http://www.android4devs.com/2015/06/navigation-view-material-design-support.html

I do wanna know is there any way if i click on options in navigation drawer, a new activity will open it will be a great help for answer.

Thank you in advance

Answer Source
mDrawerList.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View v,
                int position, long id) {
switch (position) {
case 1:
Intent intent= new Intent(CurrentActivity.this,AnotherActivity.class);
case 2:
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download