<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.bluetooth_hjy.MainActivity" >
<Switch
android:id="@+id/switchBlueTooth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="蓝牙开关" >
</Switch>
<ListView
android:id="@+id/lstBondedDevices"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="@+id/switchBlueTooth" >
</ListView>
<EditText
android:id="@+id/txtDisplay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lstBondedDevices"
android:ems="10" >
<requestFocus />
</EditText>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<Button
android:id="@+id/btnSearchBluetooth"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="搜索" />
<Button
android:id="@+id/btnConnectBluetooth"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="连接" />
<Button
android:id="@+id/btnStopBluetooth"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="停止" />
<Button
android:id="@+id/btnAbortBluetooth"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="退出" />
</LinearLayout>
</RelativeLayout>
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.bluetooth_hjy.MainActivity" >
<Switch
android:id="@+id/switchBlueTooth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="蓝牙开关" >
</Switch>
<ListView
android:id="@+id/lstBondedDevices"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="@+id/switchBlueTooth" >
</ListView>
<EditText
android:id="@+id/txtDisplay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lstBondedDevices"
android:ems="10" >
<requestFocus />
</EditText>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<Button
android:id="@+id/btnSearchBluetooth"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="搜索" />
<Button
android:id="@+id/btnConnectBluetooth"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="连接" />
<Button
android:id="@+id/btnStopBluetooth"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="停止" />
<Button
android:id="@+id/btnAbortBluetooth"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="退出" />
</LinearLayout>
</RelativeLayout>