Keep background fragments alive
This commit is contained in:
parent
872b7a813d
commit
5b909894f4
|
@ -389,14 +389,16 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
|
||||||
break;
|
break;
|
||||||
case FLIP:
|
case FLIP:
|
||||||
transaction.setCustomAnimations(
|
transaction.setCustomAnimations(
|
||||||
R.anim.card_flip_right_in,
|
|
||||||
R.anim.card_flip_right_out,
|
|
||||||
R.anim.card_flip_left_in,
|
R.anim.card_flip_left_in,
|
||||||
R.anim.card_flip_left_out);
|
R.anim.card_flip_left_out,
|
||||||
|
R.anim.card_flip_right_in,
|
||||||
|
R.anim.card_flip_right_out);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
transaction.replace(R.id.main_view, fragment, "main")
|
transaction
|
||||||
|
.hide(getSupportFragmentManager().findFragmentByTag("main"))
|
||||||
|
.add(R.id.main_view, fragment, "main")
|
||||||
.addToBackStack(null)
|
.addToBackStack(null)
|
||||||
.commit();
|
.commit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue