2012-02-05 78 views
0

我有一个基于模式的背景绘制:需要图案背景,并在它需要将图像

<?xml version="1.0" encoding="utf-8"?> 
<bitmap xmlns:android="http://schemas.android.com/apk/res/android" 
    android:src="@drawable/back" 
    android:tileMode="repeat"/> 

在这个活动,我中显示背景图案:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@drawable/back" 
    android:scrollbars="vertical" 
    > 
</LinearLayout 

有无结果是这样的: http://img525.imageshack.us/img525/2257/63411225.jpg

需要的结果是: http://img811.imageshack.us/img811/4894/12572985.jpg

回答

0

您不包括必要的代码(包含背景和图像的布局)。

该问题与您的背景无关,可能与您如何布置图像有关。

如果这是你完整的代码,你需要添加一个属性,这将包括你的图片。

+0

我需要添加像它是背景的图像。我的意思是模式+图像=活动的背景。 – stormx1 2012-02-05 14:38:22

+0

在您的布局文件中,将此属性添加到您的主视图(LinearLayout或其他):android:background =“@ drawable/your_background” – Booger 2012-02-06 14:57:10