用java code更改animateLayoutChanges财产 [英] change animateLayoutChanges property using java code
本文介绍了用java code更改animateLayoutChanges财产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我工作的一个Android应用程序是使用布局更改的动画。我想知道的是,什么是有任何一个知道如何改变:用java code的Andorid animateLayoutChangesproberty
I'm working on a android application which is use layout change animations. what i want to know is, is there any one know how to change the "andorid:animateLayoutChanges" proberty using java code.
我的当前值为
android:animateLayoutChanges="false"
我想改变它的活性onResume()方法来真。
I want to change it to "true" in activity onResume() method.
推荐答案
使用 setLayoutTransition()
方法在code:
LayoutTransition layoutTransition = new LayoutTransition();
//or, if previously enabled in xml, use getLayoutTransition()
//enable animation
setLayoutTransition(layoutTransition);
//disable animation
setLayoutTransition(null);
来源:动画效果布局更改
这篇关于用java code更改animateLayoutChanges财产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文