android - programmatically adding custom animation to fragment using objectAnimator -
i add custom animation fragments using following code.
fragmenttransaction ft = getfragmentmanager().begintransaction(); ft.setcustomanimations(r.animator.slide_in, r.animator.slide_in, r.animator.slide_out, r.animator.slide_out ); ft.add(r.id.container, new doze1fragment()); ft.addtobackstack(null); ft.commit(); now i'm playing around adding few different fragments on top of each other in span of 3 5 seconds , pop of them out of stack "fanning" animation out of fragments. in order either add delay in between each popbackstack() call (i think horrible solution), or make custom xml animator resource each fragment. wondering if has idea of how programmatically right before calling ft.add(r.id.container, new doze1fragment()). know use following code animate view , looking similar
objectanimator oa = objectanimator.offloat(r.id.container, "x", 0, 1000f); oa.setduration(300); oa.start(); thanks in advance.
Comments
Post a Comment