嗨,所有人 我这个代码有问题。我试图让图像淡入。这是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