如何测试img1和R.drawable.picture_1指向相同的图片?
我尝试了这个,但我正在打印“不行”,而不是确定
ImageView img1 = (ImageView)findViewById(R.id.imageView1);
img1.setImageResource(R.drawable.picture_1);
if(R.drawable.picture_1 ==img1.getId())
{
log.error("OK");
}else{
log.error("NOT OK");
}