In the Activity when clicking on the button, a DialogFragment is DialogFragment with the ОК . So I would like to understand, when calling a dialog box and when dismiss() when I clicked on the ОК button, which methods of the Activity life cycle will be called?
|
1 answer
No methods will be called. Some people mistakenly think that the onPause and onResume methods will be called, but this is not the case. In activation, these methods will be called only when the focus is lost). By the way, they like to ask this question at the interview.
- I see, thank you! - DevOma
- Pavel, doesn’t dialogue happen to Vfhokesa? Activation remains in the background ... - elik
- Not. Activation loses focus when another activity is put into the backstack. Accordingly, you can make the dialogue in the form of an activit, which will be placed in the backstack and, accordingly, then the onPause and onResume methods will be called pavel163 December
|