2013-04-10 20 views
-6

我有一個本地圖像文件,我想用作android應用程序背景,我該怎麼做?Android:我如何使用本地圖像作爲我的背景

+3

請分享您的嘗試。 – Lakshmi 2013-04-10 08:18:02

+0

您是使用appbuilder還是自己編寫它?你的應用程序是否有權限查看文件,你有沒有試過Google搜索的確切問題? – 2013-04-10 08:20:43

+0

當地人,你的意思是從你的手機SD卡? – SKK 2013-04-10 08:46:40

回答

0

例如 main.xml中

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/main" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:background="@drawable/nameOfYourLocalFile" 
android:orientation="vertical" > 
</LinearLayout> 

只要把你的nameOfYourLocalFile.pngdrawable目錄。 希望得到它的幫助。

相關問題