如题所述
<?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/backPicture">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>
或者在代码中设置追问
<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/backPicture">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>
或者在代码中设置追问
可以私聊一下吗我的qq867851971
追答android:background="@drawable/icon的“icon”就是你的图片名称
温馨提示:答案为网友推荐,仅供参考
第1个回答 2012-03-15
在xml中配置 android:background="@drawable/id" 引号中的是你图片在R文件中生成的ID追问
图片什么格式生成的id怎么看啊