Skip to content Skip to sidebar Skip to footer

How To Start A New Activity On Navigation Drawer Item Click Its Not Working In My Code

Almost every link every stack questions I referred already so please can anyone tell that what is my mistake in my code.. Following is my code: public class Attdce extends Activity

Solution 1:

Just a suggestion please start using NavigationView recommended by android. In case you are searching for tutorials here you can find detailed example of how to use NavigationView in android.


Solution 2:

Try to close the drawer, before startActivity(intent1)

case 5:
                     final intent1 = new Intent(Attdce.this, Help.class);
                                drawer.closeDrawers();
                                drawer.postDelayed(new Runnable() {
                                    @Override
                                    public void run() {
                                        startActivity(intent1 );
                                    }
                                }, 200);
                               break;

Post a Comment for "How To Start A New Activity On Navigation Drawer Item Click Its Not Working In My Code"