How to find the "last" back press?
I have Activity
with Fragment
, and have a lot of transactions, so the back button most often discards Fragment transaction
. But I need to detect the last backpress.
I can't use the method onPause
because I don't want to do anything when the user presses home or starts another activity.
+3
source to share