Skip to content Skip to sidebar Skip to footer

Replacing Fragment Display A Blank Screen

I want to replace Fragment using FragmentTransaction. It works fine but during remplacement, Android displays a blank screen very ugly before displaying the new Fragment Code is :

Solution 1:

You can set custom animations during Transaction.

fragmentTransaction.setCustomAnimations(R.anim.card_flip_right_in,R.anim.card_flip_right_out,R.anim.card_flip_left_in,R.anim.card_flip_left_out);

Like this. You can define animations.

Hope it helps


Post a Comment for "Replacing Fragment Display A Blank Screen"