1.首先布局页面,代码如下:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_order" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/stitch_one" tools:context="cn.edu.bzu.broadcast.OrderActivity"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="发送有序广播"