Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anmimation on 2 views in fragment transaction

getFragmentManager().beginTransaction().setCustomAnimations(
  R.animator.1, R.animator.2,R.animator.3, R.animator.4)
  .replace(view1, view2)
  .addToBackStack(null)
  .commit();

This only performs animation on view2. I also want to do something with view1 at the same time. how can I do that? These views are FrameLayouts with dynamic generated id

like image 385
Jackson K Avatar asked Dec 14 '25 08:12

Jackson K


1 Answers

Refering to android developers: FragmentTransaction setCustomAnimations(int enter, int exit, int popEnter, int popExit)

If I clearly understand what you need, for using animation for 1 view you must provide animator for exit parameter

like image 61
Sergey Zabelnikov Avatar answered Dec 16 '25 22:12

Sergey Zabelnikov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!