嗨,Hiroshi,您可以这样做以淡入淡出:
ImageView myImageView= (ImageView)findViewById(R.id.myImageView);
Animation myFadeInAnimation = AnimationUtils.loadAnimation(this, R.anim.fadein);
myImageView.startAnimation(myFadeInAnimation); //Set animation to your ImageView
在res \ anim \文件夹中,动画文件fadein.xml
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="3000"/>
</set>
但要从棕褐色逐渐渐变为全色,必须使用TransitionDrawable
0
我想在Android Activity屏幕上显示一张照片,并从浅单调棕褐色到最终全彩进行渐进和连续淡入。我知道如何在图形对象的Java Image / BufferedImage上执行此操作,但不幸的是,我对Android编程环境一无所知。有人可以帮忙吗?