Skip to content Skip to sidebar Skip to footer

How To Launch Activity From Navigation Drawer?

So I've searched allot about navigation drawers here, and when I was pointed to a tutorial from an answer in another persons question. I did so. I successfully managed to create a

Solution 1:

Repalce this with MainActivity.this like that:

Intent a = newIntent(MainActivity.this, AppInfo.class);
startActivity(a);

Also Change that

drawerListView.setOnItemClickListener(newDrawerItemClickListener());

replace

drawerListView.setOnItemClickListener(this);

Check there for Custom Adapter

Solution 2:

Intent abc = newIntent(CurrentActivityName.this,TargetActivityName.class);
startActivity(abc);

This is how I've been doing it, directly referencing each activities name.

Post a Comment for "How To Launch Activity From Navigation Drawer?"