I\'ve encountered some curious behavior in my application when managing Fragments and I was wondering if SO could help shed some light onto why this happens.
This is maybe because the fragment manager reuse the fragment instance rather recreate it. If the code inside Fragment B onCreate() requires to be executed when the fragment is shown, then move the code in another method like onResume().