写android程序,想给自己程序的主界面加一个底图怎么写啊

如题所述

<?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>

或者在代码中设置追问

可以私聊一下吗我的qq867851971

追答

android:background="@drawable/icon的“icon”就是你的图片名称

温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-03-15
在xml中配置 android:background="@drawable/id" 引号中的是你图片在R文件中生成的ID追问

图片什么格式生成的id怎么看啊

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网