fragment_error_book.xml 7.61 KB
<LinearLayout 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"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    tools:ignore="HardcodedText,ContentDescription,UseCompoundDrawables">

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

        <ImageView
            android:id="@+id/iv_student"
            android:layout_width="35dp"
            android:layout_height="35dp"
            android:layout_centerVertical="true"
            android:layout_marginStart="15dp" />

        <TextView
            android:id="@+id/tv_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginStart="10dp"
            android:layout_toEndOf="@+id/iv_student"
            android:textColor="#333333"
            android:textSize="16sp"
            tools:ignore="RelativeOverlap" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_choose"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:layout_marginEnd="15dp"
            android:drawableEnd="@drawable/ic_filter_black"
            android:drawablePadding="5dp"
            android:text="选择学生"
            android:textColor="#333333"
            android:textSize="14sp" />

    </RelativeLayout>

    <LinearLayout
        android:orientation="horizontal"
        android:weightSum="2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:baselineAligned="false">
        <FrameLayout
            android:id="@+id/rl_take_photo"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content">
            <ImageView
                android:src="@drawable/png_entry_error"
                android:adjustViewBounds="true"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal|bottom"
                android:layout_marginBottom="38dp"
                android:text="录入错题"
                android:textColor="#EDF6FF"
                android:textSize="20sp"
                android:textStyle="bold" />
        </FrameLayout>

        <FrameLayout
            android:id="@+id/flEntryHomework"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content">
            <ImageView
                android:src="@drawable/png_entry_homework"
                android:adjustViewBounds="true"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal|bottom"
                android:layout_marginBottom="38dp"
                android:text="录入作业"
                android:textColor="#EDF6FF"
                android:textSize="20sp"
                android:textStyle="bold" />
        </FrameLayout>
    </LinearLayout>

    <LinearLayout
        android:orientation="vertical"
        android:background="@drawable/shape_radius_10"
        android:backgroundTint="@color/white"
        android:layout_marginHorizontal="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginBottom="15dp"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.google.android.material.tabs.TabLayout
            android:id="@+id/tabLayout"
            app:tabMode="fixed"
            app:tabGravity="fill"
            app:tabIndicatorFullWidth="false"
            app:tabIndicatorColor="#1C90F3"
            app:tabTextColor="#333"
            app:tabSelectedTextColor="#1C90F3"
            app:tabTextAppearance="@style/tab_home_item"
            app:tabRippleColor="@color/transparent"
            android:background="@drawable/bg_tab_home"
            android:paddingBottom="4dp"
            android:layout_width="match_parent"
            android:layout_height="36dp"/>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rvSubject"
            android:orientation="horizontal"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            android:layout_marginTop="15dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <LinearLayout
            android:layout_marginTop="16dp"
            android:layout_marginHorizontal="10dp"
            android:layout_width="match_parent"
            android:layout_height="25dp">
            <TextView
                android:id="@+id/tvListTitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="最近录入错题"
                android:textColor="#333333"
                android:textSize="16sp"
                android:textStyle="bold" />

            <Space style="@style/empty_space"/>

            <LinearLayout
                android:id="@+id/ll_all"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:text="查看全部"
                    android:textColor="#666666"
                    android:textSize="12sp" />

                <ImageView
                    android:layout_width="9dp"
                    android:layout_height="10dp"
                    android:layout_gravity="center_vertical"
                    android:layout_marginStart="5dp"
                    android:src="@mipmap/ic_arrow_right" />
            </LinearLayout>
        </LinearLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rvMain"
            android:orientation="vertical"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="15dp" />

        <LinearLayout
            android:id="@+id/ll_empty"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="30dp"
            android:orientation="vertical"
            android:visibility="gone">

            <ImageView
                android:layout_width="155dp"
                android:layout_height="130dp"
                android:src="@mipmap/ic_empty" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:text="暂无错题~" />
        </LinearLayout>

    </LinearLayout>
</LinearLayout>