ImageView image = (ImageView) findViewById(R.id.imageview);
image.setImageResource(drawable.image1);
SystemClock.sleep(1000);
image.setImageResource(drawable.image2);
我想改变图像一秒,我上面的代码不起作用,但不知道为什么? 我应该使用线程吗?或者有没有人有更好的想法?更改图像一秒
EDIT 为了澄清的问题:
的图像被显示为“drawable.image2” 我想“drawable.image1”中显示一秒钟然后改变为“drawable.image2”。
EDIT2:
此代码用于onClick。当用户点击图片时需要更改一秒
'不工作'...什么是不工作?它怎么不起作用? – talnicolas 2012-04-04 15:47:48