在线性布局LinearLayout里面有一条属性
Android:background
属性值取 @drawable/"图片名字"
即可添加背景图片
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/background"
tools:context="com.example.sendemail.MainActivity" >
</LinearLayout>
注意提前把背景图片粘贴到这个文件夹