区别:安卓:背景和android:SRC? [英] Difference: android:background and android:src?
问题描述
可能重复:结果
<一href=\"http://stackoverflow.com/questions/5454491/what-is-the-difference-between-src-and-background-of-imageview\">What是src和ImageView的背景之间的差异
什么是机器人之间的区别:SRC
:背景和 Android的?是他们的工作一样吗?
What is the difference between android:background
and android:src
? Is their working same?
推荐答案
的android:背景
存在的所有视图。顾名思义,这是怎么回事是有背景。
android:background
exists for all the view. As the name suggests this is what is going to be there in the background.
的android:SRC
存在 ImageViews
和它的子类。你可以认为这是前台。因为的ImageView
是查看
的子类,你甚至有的android:背景
为。
android:src
exists for ImageViews
and its subclasses. You can think of this as the foreground. Because ImageView
is a subclass of View
you even have android:background
for that.
- 如果前景比背景更小,这是不包括在前景中的背景部分会是可见的。
- 此外,您还可以在前台在这种情况下,背景将会是可见的(透明)使用的透明度。
这篇关于区别:安卓:背景和android:SRC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!