android - Can I set a LayoutTransition with an Animation (instead of Animator)? -


i want make custom transitions on layout. i'd use xml defined "animation" because lets me use percentage values, while "animator" seems take pixel values. problem layouttransition seems take "animator" parameter.

    layouttransition lt = new layouttransition();     lt.enabletransitiontype(layouttransition.changing);     lt.setanimator(layouttransition.disappearing, /*animator*/);     view.setlayouttransition(lt); 

try using animator object defined xml

animatorinflater.loadanimator(context, r.animator.your_animation) 

the xml uses tag:

<objectanimator /> 

this different animation , has different set of properties. these can found at: property animations

hope helps.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -