i have implemented test sample of android drawer using activities instead of frames in this so answer.
i have 3 activities extends draweractivity.
mainactivity
first activity when application launched, activitya
, activityb
opened navigation drawer.
i want when button pressed in mainactivity exit application, , when pressed on activitya or activityb go mainactivity, no matter how many times pressed list items navigation drawer.
as far can understand, problem activities started navigation drawer added @ stack.
also question how highlight item selected on navigation drawer when activities changed?
have done in sample uses fragments code:
mdrawerlist.setitemchecked(position, true);
can use activities or need convert them fragments?
creating new activities on navigation drawer item click quite uncommon. use activity drawerlayout inside , handle navigation click events replacing fragments. see tutorial:
http://developer.android.com/training/implementing-navigation/nav-drawer.html#top