简单的 ImageView 彩色动画

Simple ImageView color animation(简单的 ImageView 彩色动画)

本文介绍了简单的 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 彩色动画

基础教程推荐