How can the fragment understand that it has “paused”? This means that he was covered by another fragment, for example. In fact, the fragment does not have an onPause () method, but how can it be traced? I will be very grateful!
1 answer
The life cycle of fragments is similar to the life cycle of activities. Fragments also have an onPause() method that can be overridden to track the pause state.
|

setUserVisibleHint(boolean isVisibleToUser)- called when the visibility changes. Describe in more detail why you need it and the task in general - maybe you are trying to solve it in the wrong way - YuriySPb ♦