I have two fragments A & B.
I have switched to B from A using following code :
FragmentManager fragmentManager;
FragmentTransaction transaction;
fragmentManager = getActivity().getFragmentManager();
transaction = fragmentManager.beginTransaction();
transaction.setCustomAnimations(R.animator.enter_anim, R.animator.exit_anim,R.animator.popenter, R.animator.popexit);
transaction.replace(R.id.fragmentLayout, new B())
.addToBackStack("tag").commit();
B contains SQLite operations(SugarORM).
While switching from A to B, the screen freezes, even if I am using AsyncTask
& IntentService
for db operations.
Also, when I press back button [getFragmentManager().popBackStack();
], the screen freezes for couple of seconds, before it switches back to A from B.
The popBackStack
animation is too not visible.
I tried showing indeterminate progress bar & animation-list in imageview, but they freeze too & it looks as if they are static images.