imageview换图5秒再恢复原图
Change image of imageview for 5 seconds and then restore original
我已经在 XML 文件中的 4 个图像视图上设置了图像,现在单击按钮我想更改所有 4 个图像视图的图像。点击按钮 5 秒后,所有图像都应变为原始图像。
您可以使用以下线程来执行此操作:
OnClick(View view){
//change the images of all images view
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
//change the images for all images view to previous ones
}
}, 5000);
}
我已经在 XML 文件中的 4 个图像视图上设置了图像,现在单击按钮我想更改所有 4 个图像视图的图像。点击按钮 5 秒后,所有图像都应变为原始图像。
您可以使用以下线程来执行此操作:
OnClick(View view){
//change the images of all images view
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
//change the images for all images view to previous ones
}
}, 5000);
}