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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -