fragment_teacher.xml 3.71 KB
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg_teacher"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_marginTop="20dp">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="个人中心"
            android:textColor="#333333"
            android:textSize="19sp" />

    </RelativeLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="65dp">

        <ImageView
            android:id="@+id/iv_teacher"
            android:layout_width="65dp"
            android:layout_height="65dp"
            android:layout_marginLeft="25dp"
            android:src="@mipmap/ic_teacher" />

        <TextView
            android:id="@+id/tv_teacher"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginLeft="15dp"
            android:layout_toRightOf="@+id/iv_teacher"
            android:textColor="#333333"
            android:textSize="18sp" />
    </RelativeLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="90dp"
        android:layout_marginLeft="5dp"
        android:layout_marginRight="5dp"
        android:background="@drawable/bg_teacher_answer">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginLeft="25dp"
            android:orientation="vertical">

            <TextView
                android:id="@+id/tv_answer_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@color/white"
                android:textSize="14sp" />

            <TextView
                android:id="@+id/tv_num"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:textColor="@color/white"
                android:textSize="12sp" />


        </LinearLayout>

        <ImageView
            android:layout_width="70dp"
            android:layout_height="60dp"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_marginRight="35dp"
            android:src="@mipmap/ic_book" />
    </RelativeLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycle_error"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@+id/logout"
            android:layout_marginTop="15dp"
            android:layout_marginBottom="30dp" />

        <Button
            android:id="@+id/logout"
            android:layout_width="250dp"
            android:layout_height="40dp"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="30dp"
            android:background="@drawable/bg_soild_blue_5"
            android:text="退出登录"
            android:textColor="@color/white"
            android:textSize="18sp" />
    </RelativeLayout>


</LinearLayout>