输出图像时查看和ImageView的区别 [英] Difference between View and ImageView when outputting an image
本文介绍了输出图像时查看和ImageView的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我输出的图像,我使用View:
When I output the image,I use View:
View.setbackgroundResource()
ImageView.setImageDrawable(绘制)
我在想,如果有大的差别?
I was wondering if there was a big difference?
推荐答案
当然是有区别的。
在第一位的,要修改的某个视图的背景。 在第二个,是在修改了一定的ImageView的内容(这是一个图片)。
In the first one, you are modifying the BACKGROUND of a certain View. In the second one, you are modifying the CONTENT (which is an Image) of a certain ImageView.
有可能看起来同样的事情,如果ImageView的是内部(或以上)的另一视图,如果它们具有相同的大小,但通常,它们是非常不同的。
It might seem the same thing if the ImageView is inside (or over) the other View and if they have the same size, but usually, they are very different.
希望这有助于!
这篇关于输出图像时查看和ImageView的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文