android - How to use activity instead of fragment in default navigation drawer? -


i using default navigation drawer on android studio ... want make case 0 in onnavigationdraweritemselected(int position) method switch activity instead of fragment navigation drawer still exist on left side of screen

what have newactivity can start normaly can't use navigation drawer more

@override public void onnavigationdraweritemselected(int position) {         // update main content replacing fragments         fragment objfragment = null;          switch (position){             case 0:                 startactivity(new intent(this, newactivity.class));                 break;                 }        } 

please need help

if still need navigation drawer in activity, makes no sense start new activity, use fragment instead. maybe provide more info regarding why want activity receive more accurate answer.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -