The application has 5 buttons below (its own implementation of the tabs), each of them adds its own fragment to the activation container with this code:

getSupportFragmentManager() .beginTransaction() .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN) .add(R.id.fragmentContainer, new SomeFragment()) .commit(); 

When the user just launched the application and wants to go to the fragment with Google map, for example, the application is slow and after a second or half the fragment is shown.

What could be the reason ?

  • Perhaps you have some extra heavy initialization in a secondary thread? - Vladyslav Matviienko
  • @metalurgus, it seems like no. but it slows down for some reason. let one fragment open, click on the tab, I still see the first fragment and then only the second one. - researcher
  • Can you show the code of the fragment that opens slowly? - Vladyslav Matviienko
  • @metalurgus all open slowly) even just with an empty OnCreateView. - researcher
  • @metalurgus I think, maybe somehow at startup (splashscreen) to initialize them? - researcher

0