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 彩色动画
基础教程推荐
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
