我需要通过图像资源(在纽芬兰使用的图像)或图像资源档案馆对两个图像词进行对比。
大致如下:
final ImageView button01 = (ImageView) findViewById(R.id.button01);
final ImageView button02 = (ImageView) findViewById(R.id.button02);
button01.setImageResource(R.drawable.myDogsPhoto);
button02.setImageResource(R.drawable.myDogsPhoto);
if (button01.getImageResource() == button02.getImageResource()) {
return true;
}
Can someone please tell me how I can go about comparing two ImageView components?
成就