I want to change the behaviour of my back button. I already found out that I have to override the onBackPressed()-Method. I'd like to check then, if a function like getActivity().popBackStackItem() returns activity (or whatever) X or something different from the BackStack of the system. In case of result is activity X, I want to change the behaviour (to close the app for example), otherwise the super-method shall be called and the activity of the BackStack shall be executed.
Main question is: Does a function like popBackStackItem() exists? Didn't found something like this until yet.
I already had a look here, but I don't want to create a completely new stack, I think checking the content in the system-wide BackStack should be enough here.
0 comments:
Post a Comment