区别:安卓:背景和android:SRC? [英] Difference: android:background and android:src?

查看:192
本文介绍了区别:安卓:背景和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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆