Android图片褪色,android褪色错误

"博主在尝试让图像在Eclipse中淡入显示时遇到了问题,错误提示为`android褪色错误:ThemethodloadAnimation(Context,int)inthetypeAnimationUtilsisnotapplicableforthearguments(newRunnable(){}

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

嗨,所有人 我这个代码有问题。我试图让图像淡入。这是Eclipse错误:android褪色错误

The method loadAnimation(Context, int) in the type AnimationUtils is not applicable for the arguments (new Runnable(){}, int)

这是我的代码:

Handler timerHandler = new Handler();

{

Runnable loadImg2 = new Runnable() {

public void run() {

DisplayTitle(gCursor);

Bitmap bitmap2 = BitmapFactory.decodeFile(sdcard/image.jpg);

myImageView=(ImageView)findViewById(R.id.imageview1);

(ImageView)findViewById(R.id.myImageView);

Animation myFadeInAnimation = AnimationUtils.loadAnimation(this, R.anim.fadein);

myImageView.startAnimation(myFadeInAnimation);

myImageView.setImageBitmap(bitmap2);

timerHandler.postDelayed(clearImg, 55000);//55000);

");

}

};

2011-05-05

moe

+1

可以确认您的文章代表你的代码是否正确?我只是清理了缩进以确保正确读取它,但我看到了几个我无法想象编译的东西,例如包含5秒后clearImg的行);'.decodeFile(sdcard/'' –

2011-05-06 01:21:37

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值