我目前有一個應用程序,每個幻燈片都有默認的黑色背景。我想要做的是改變XML文件以獲得背景圖像。我假設有一個簡單的命令,但一直沒能找到我正在尋找的東西。XML文件中的Android背景圖像
我想要一個圖像到我當前屏幕的背景。我不想讓背景變化,我想把它放在我的XML文件中。這裏是我的XML頭中的一個例子...
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:weightSum="1.0" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:weightSum="9"
android:gravity="center"
>
...
我假設有一些簡單的命令,如
android:background="file"
詳細的博客:HTTP: //sforsuresh.in/set-background-image-android-xml/ –