java - With a DrawerLayout, how can I close the app on pressing Back no matter which screen is active? -


i'm using drawerlayout navigation of app:

taking menu example:

enter image description here

i'd home button launch homeactivity , on. clearing activity stack, is: if press people, photos, locations , button, app should close. i'm trying intent flags when launching activities same behaviour: people->photos->location->back goes photos instead closing app

how can achieve that?

as per said "if press people, photos, locations , button, app should close".

for achieve should user fragment home,people,location , photos etc. , when press button of device can clear fragment stack , finish activity.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -