Add custom fragment anims to be run when popping backstack

The previous fragment implementation allowed for animations
during fragment transitions, but did not account for the
different behavior of fragments when popping the back stack.
In general, you probably don't want to run the same animation
for putting a fragment on the stack as for popping it off, which
is what happens now. For example, you might fade a fragment out when
putting it on the stack. But when popping ot off, fading it out
is probably not the behavior you want.

The new API (setCustomAnimations() overload with two additional
parameters) allows developers to specify animations to be run
in the popping operation. Otherwise, the animations are null and
the operation will not be animated.

Change-Id: I2e132b3890838358e496149f18a25037a59990aa
3 files changed