【发布时间】:2013-08-31 06:47:18
【问题描述】:
我想使用一个小(图标大小)图像作为我的视图的背景,但它会被拉伸以填满整个视图。
任何解决方案(包括将视图放置在我当前的视图下并使后者透明的某种方式)都将受到赞赏。
谢谢!
当前代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/icon"
android:id="@+id/layout_main"
>
【问题讨论】:
-
如何将图像设置为背景?具体
-
编辑问题以包含示例代码
-
@grace-shao:我看不出编辑/改进问题中实际代码的基本原理。
标签: android views background