Just like this:
@Override public void onBackPressed() { super.onBackPressed(); }You can optionally cancel the navigation or allow it to occur.
You cancel the navigation by not calling the instruction on like two.
Obviously you can code any logic to conditionally cancel the navigation.
Another use is to catch the event just to persist any information and then letting the navigation occur.
No comments:
Post a Comment