动画中的LinearLayout变化的LayoutParams [英] Animation in changing LayoutParams in LinearLayout

查看:155
本文介绍了动画中的LinearLayout变化的LayoutParams的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序有一个LinearLayout中有0布局的高度。当我点击按钮,此布局的高度应该是LayoutParams.WRAP_CONTENT。这是code我onclicklistner使用。

In my app there is a LinearLayout which has 0 Layout height. When I click the button this layout height should be LayoutParams.WRAP_CONTENT. This is the code I use in onclicklistner.

LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
slider.setLayoutParams(lp);

我想这个动画。如何设置动画滑块。

I want to animate this. How can I set animation to slider.

推荐答案

如果你想实现滑块动画的布局,然后看到<一href="http://www.warriorpoint.com/blog/2009/05/26/android-switching-screens-in-an-activity-with-animations-using-viewflipper/"相对=nofollow>这个演示。

If you want to implement the slider animation for your layout then see this demo.

更新时间:

另见的http://www.inter-fuser.com/2009/07/android-transistions-slide-in-and-slide.html

希望它会帮助你。

如果没有的话让我知道。

If not then let me know.

感谢。 享受。 :)

这篇关于动画中的LinearLayout变化的LayoutParams的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆