Simple ImageView color animation(简单的 ImageView 彩色动画)
问题描述
您好,我对 Android 比较陌生,如果可能的话,我想提供一些关于在哪里搜索以解决我的问题的指南或建议.显然,我没有发布图片的声誉,因此我会尽力解释它.
Hi I am relatively new to Android, and I would like, if possible, some guidelines or suggestions on where to search in order to solve my issue. Apparently, I do not possess the reputation to post images, therefore I'll try to explain it as well as i can.
假设我有一个空瓶子,一旦调用了这个片段/活动,我想引入一个动画,它会逐渐垂直(从下到上)开始用水填充这个 imageView.
Let's say I have an empty bottle, and once this fragment/activity is called i want to introduce an animation that will gradually and vertically (from bottom to top) start filling this imageView with water.
任何想法或方向,
非常感谢,提前!
推荐答案
有2个瓶子的图像怎么样?一个(在前景上)是一个透明的空瓶子(背景)第二个将是液体的形状"
How about having 2 images of the bottle? One (on foreground) would be an empty bottle with transparency The (on background) second one would be the "shape of the liquid"
当您的活动开始时,获取背景并为其设置动画,就像在此主题上发布的那样:https://stackoverflow.com/a/12127985/4232337
when your activity starts, get the background one and animate it like posted on this topic : https://stackoverflow.com/a/12127985/4232337
希望这会有所帮助!
这篇关于简单的 ImageView 彩色动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:简单的 ImageView 彩色动画


- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01