<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#fff"
    tools:context=".activity.HomeActivity">

    <TextView
        android:id="@+id/titleTv"
        android:layout_width="match_parent"
        android:layout_height="@dimen/title_height"
        android:gravity="center"
        android:text="家校互通"
        android:textAlignment="center"
        android:textColor="#000"
        android:textSize="@dimen/title_text_size"
        android:textStyle="bold"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <View
        android:id="@+id/titleDivider"
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:background="#000"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/titleTv" />

    <LinearLayout
        android:id="@+id/userInfoLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:paddingHorizontal="50dp"
        android:paddingVertical="@dimen/d_30"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/titleDivider">

        <com.tomlonghurst.roundimageview.RoundImageView
            android:layout_width="60dp"
            android:layout_height="60dp"
            app:riv_border_color="#333"
            app:riv_border_width="1px">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:src="@mipmap/student" />
        </com.tomlonghurst.roundimageview.RoundImageView>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_marginStart="@dimen/d_12"
            android:layout_weight="1"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <TextView
                android:id="@+id/userNameTv"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="你好，张小小"
                android:textColor="#000"
                android:textSize="16sp"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/userInfoTv"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="成都市青白江区大弯小学 | 一年级三班"
                android:textColor="#666"
                android:textSize="14sp"
                android:textStyle="bold" />
        </LinearLayout>

        <TextView
            android:id="@+id/switchBtn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/shape_switch_btn"
            android:drawableStart="@mipmap/ic_unit_switch"
            android:drawablePadding="@dimen/d_4"
            android:paddingStart="@dimen/d_8"
            android:paddingTop="@dimen/d_5"
            android:paddingEnd="@dimen/d_8"
            android:paddingBottom="@dimen/d_5"
            android:text="切换身份"
            android:textSize="@dimen/sp18" />

        <TextView
            android:id="@+id/loginBtn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/shape_switch_btn"
            android:paddingStart="@dimen/d_8"
            android:paddingTop="@dimen/d_5"
            android:paddingEnd="@dimen/d_8"
            android:paddingBottom="@dimen/d_5"
            android:text="去登录"
            android:textSize="@dimen/sp18" />
    </LinearLayout>

    <View
        android:id="@+id/userInfoDivider"
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:background="#000"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/userInfoLayout" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:paddingTop="@dimen/d_15"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/userInfoDivider">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/homeGridView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
            app:spanCount="3"
            tools:itemCount="5"
            tools:listitem="@layout/item_home" />
    </LinearLayout>

    <View
        android:id="@+id/testBtn"
        android:layout_width="100dp"
        android:layout_height="100dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>