简单的 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 彩色动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)