content_main.xml 2.78 KB
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:background="#ac0097ca"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:padding="16dp"
        android:orientation="vertical"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        tools:showIn="@layout/activity_switch_control"
        tools:context="com.qnbar.switchcontrol.SwitchControlActivity">

    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal">

        <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="扫描主机"
                android:onClick="scanHubs"/>

        <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="开始添加"
                android:onClick="startAdd"/>

        <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="结束添加"
                android:onClick="stopAdd"/>

        <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="重设置密码"
                android:onClick="resetPwd"/>

        <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="设置路由信息"
                android:onClick="setLinkMsg"/>

        <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="获取路由信息"
                android:onClick="getLinkStatus"/>


    </LinearLayout>
    <TextView android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="控制主机"
              android:textSize="20sp"/>

    <android.support.v7.widget.RecyclerView
            android:id="@+id/hubsRv"
            android:layout_marginTop="15dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_below="@+id/button"/>

    <TextView android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginTop="30dp"
              android:text="开关"
              android:textSize="20sp"/>

    <android.support.v7.widget.RecyclerView
            android:id="@+id/switchRv"
            android:layout_marginTop="15dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_below="@+id/button"/>

</LinearLayout>