How to set back key action on Android -
i'm working on android application starts activity serves menu screen (i'll call activity menu activity).
there button moves app activity user can enter name (i'll call activity name activity), , app returns menu activity.
after entering name, (i have gone this: menu - name - menu) when press button, goes name activity, name still present in edittext field.
i'd know if there's way change key's functionality avoid going name activity, , instead return main activity (the hierarchy - main - menu - name).
also, there way can prevent name being retained in edittext?
thanks in advance.
i'm bit confused hierarchy either way you're looking if want clear previous activities: clearing activity backstack
otherwise call finish()
on activity want close before changing. clear edittext
Comments
Post a Comment