5
我想使用一个小的(图标大小)图像作为我的视图的背景,但它会被拉伸以填充所有视图。Android:如何在视图中使用居中的背景图像
任何解决方案(包括某种方式来放置在我目前的一个视图,并使后者透明)将不胜感激。
谢谢!
当前代码:
<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"
>
你是如何设置图像作为背景?请具体 – mtmurdock 2010-06-12 22:34:07
编辑该问题以包含示例代码 – tacone 2010-06-12 22:53:56
[在Android中定位背景图像]可能的副本(http://stackoverflow.com/questions/3847979/centering-a-background-image-in-android) – 2012-06-28 13:01:15