mytest.xml 4 KB
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <RelativeLayout
        android:id="@+id/re_chat_mian"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="invisible">

        <Button
            android:id="@+id/groupChat"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="140dp"
            android:text="群聊" />

        <Button
            android:id="@+id/privateChat"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/groupChat"
            android:layout_marginTop="34dp"
            android:text="私聊" />

    </RelativeLayout>


    <LinearLayout
        android:id="@+id/lin_user"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:orientation="vertical"
        android:visibility="invisible">


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

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="userID  :" />

            <EditText
                android:id="@+id/user_ID"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1" />
        </LinearLayout>

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

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="userName:" />

            <EditText
                android:id="@+id/user_name"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1" />
        </LinearLayout>

        <Button
            android:id="@+id/uconnect"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="连接"
            />


    </LinearLayout>


    <LinearLayout
        android:id="@+id/connect_uav"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:orientation="vertical">

        <Button
            android:id="@+id/connect"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="连接" />

        <LinearLayout
            android:id="@+id/lin_btn"
            android:visibility="invisible"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <Button
                android:id="@+id/user_login"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="15dp"
                android:text="登录" />


            <Button
                android:id="@+id/vis_login"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="15dp"
                android:text="游客" />


            <Button
                android:id="@+id/user_logOut"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="15dp"
                android:text="退出" />

        </LinearLayout>


    </LinearLayout>
</LinearLayout>