From android doc here http://developer.android.com/reference/android/app/Activity.html,
it said \'Activity comes into foreground\' will call onPause()
, and \'Ac
whenever a new ACTIVITY starts the previous activity's onPause
will be defiantly called in any circumstances.
actually there will be two circumstances:
1- a part of previous activity is visible or the new activity is transparent: only onPause
will be called.
2- previous activity is completely covered by new activity: both onPause
and onStop
will be called
----Good to state some notes:
NOTE 1: if a dialog starts on top of an activity NONE of onPause
or onStop
will be called.
NOTE 2: if its an Activity whose theme is set to a dialog, the behavior will be just like a normal activity.
NOTE 3: apparently a system dialog like permission dialog since marshmallow will cause onPause
.