Greetings.
I use the standard TabbedActivity in AndroidStudio , in which the MainActivity class MainActivity , the PlaceholderFragment fragment and its Adapter implemented in the MainActivity class, I registered the logs and when the program is onCreate method of the Main Activity and twice the onCreateView Fragment called in the logs, I cannot understand why onCreateView called twice? I have implemented a MediaPlayer in a Fragment , and if I scroll once, it does not go to the stop state the first time, although in the onStop method and onDestroyView I install MediaPlayer.stop . It is necessary to scroll twice, only then the onStop method onStop , why is that? How do I catch the second onCreateView ? I suppose one Fragment I see directly, and the other lives in memory? If so, how can I access it and set the necessary parameters in its onStop and onDestroyView ?