为view设置背景图片

来源:互联网 发布:打字慢能做淘宝客服吗 编辑:程序博客网 时间:2024/04/30 15:24
<RelativeLayout
        android:id="@+id/relativeLayout1"
        android:background="@drawable/e"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >


        <Button
            android:id="@+id/button1"
            android:background="@drawable/a"
            android:layout_width="50dp"
            android:layout_height="100dp"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="70dp"
            android:text="开始游戏" />


    </RelativeLayout>