简体   繁体   English

**[更新]** 如何在 android 中为 cardview 的背景扩展设置动画?

[英]**[UPDATE]** How to animating background expandation of cardview in android?

I'm developing a weather app.我正在开发一个天气应用程序。 In my UI, I have animation like this one below.在我的用户界面中,我有如下所示的动画。 I want when a use click on CardView, it and it's background expand as much as remaining height of the phone's screen with animation.我希望当用户点击 CardView 时,它和它的背景会随着动画的手机屏幕的剩余高度而扩展。 It's background change with animation like the.gif below:它的背景变化与动画类似下面的.gif:

Please help me to implement that.请帮助我实现它。 Thanks:)谢谢:)

在此处输入图像描述

I searched too much for implement it but I didn't find anything that help me.我搜索了太多以实现它,但没有找到任何对我有帮助的东西。

[UPDATE] [更新]

I need something like trasition animation between activiries.我需要类似活动之间的过渡动画。 I dont know if there is someway like that inside one activity or not.我不知道在一项活动中是否有类似的方式。

you have to set layoutChangeAnimation property of parent layout to true and then use this dependency:您必须将父布局的layoutChangeAnimation属性设置为true ,然后使用此依赖项:

ExpectAnim期待动画

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM