2011-03-16 51 views
4

我目前正在使用eclipse作爲我的IDE的基本應用程序。我目前無法將圖片設置爲我的背景。我正在關注一個tutoral,它告訴我將我的圖像放在drawable-mdpi文件夾中並將其命名爲圖標。我已經嘗試過,但它仍然放置在andriod圖標中,即使我刪除了andriod圖標圖像。有沒有更好的方法來做到這一點?基本Android應用程序的設置背景

感謝

回答

4

試試這個:

<LinearLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:orientation="vertical" 
     android:gravity="center_horizontal" android:background="@drawable/background"></LinearLayout>    

背景是一個PNG文件。 Nine9Patch在邊框上繪製邊框。

希望這會有幫助