Commit 73452e26df33f3ebf6d0bb736057a7c88c6e0461
1 parent
12f7c075cc
Exists in
master
首页布局调整
Showing
3 changed files
with
84 additions
and
92 deletions
 
Show diff stats
app/src/main/res/drawable/png_entry_error.png
app/src/main/res/drawable/png_entry_homework.png
app/src/main/res/layout/fragment_error_book.xml
| 1 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 1 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 
| 2 | xmlns:tools="http://schemas.android.com/tools" | 2 | xmlns:tools="http://schemas.android.com/tools" | 
| 3 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" | 
| 4 | android:layout_height="match_parent" | 4 | android:layout_height="match_parent" | 
| 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | 5 | xmlns:app="http://schemas.android.com/apk/res-auto" | 
| 6 | android:orientation="vertical" | 6 | android:orientation="vertical" | 
| 7 | tools:ignore="HardcodedText,ContentDescription,UseCompoundDrawables"> | 7 | tools:ignore="HardcodedText,ContentDescription,UseCompoundDrawables"> | 
| 8 | 8 | ||
| 9 | <RelativeLayout | 9 | <RelativeLayout | 
| 10 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" | 
| 11 | android:layout_height="40dp" | 11 | android:layout_height="40dp" | 
| 12 | android:layout_marginTop="30dp"> | 12 | android:layout_marginTop="30dp"> | 
| 13 | 13 | ||
| 14 | <ImageView | 14 | <ImageView | 
| 15 | android:id="@+id/iv_student" | 15 | android:id="@+id/iv_student" | 
| 16 | android:layout_width="35dp" | 16 | android:layout_width="35dp" | 
| 17 | android:layout_height="35dp" | 17 | android:layout_height="35dp" | 
| 18 | android:layout_centerVertical="true" | 18 | android:layout_centerVertical="true" | 
| 19 | android:layout_marginStart="15dp" /> | 19 | android:layout_marginStart="15dp" /> | 
| 20 | 20 | ||
| 21 | <TextView | 21 | <TextView | 
| 22 | android:id="@+id/tv_name" | 22 | android:id="@+id/tv_name" | 
| 23 | android:layout_width="wrap_content" | 23 | android:layout_width="wrap_content" | 
| 24 | android:layout_height="wrap_content" | 24 | android:layout_height="wrap_content" | 
| 25 | android:layout_centerVertical="true" | 25 | android:layout_centerVertical="true" | 
| 26 | android:layout_marginStart="10dp" | 26 | android:layout_marginStart="10dp" | 
| 27 | android:layout_toEndOf="@+id/iv_student" | 27 | android:layout_toEndOf="@+id/iv_student" | 
| 28 | android:textColor="#333333" | 28 | android:textColor="#333333" | 
| 29 | android:textSize="16sp" | 29 | android:textSize="16sp" | 
| 30 | tools:ignore="RelativeOverlap" /> | 30 | tools:ignore="RelativeOverlap" /> | 
| 31 | 31 | ||
| 32 | <androidx.appcompat.widget.AppCompatTextView | 32 | <androidx.appcompat.widget.AppCompatTextView | 
| 33 | android:id="@+id/tv_choose" | 33 | android:id="@+id/tv_choose" | 
| 34 | android:layout_width="wrap_content" | 34 | android:layout_width="wrap_content" | 
| 35 | android:layout_height="wrap_content" | 35 | android:layout_height="wrap_content" | 
| 36 | android:layout_alignParentEnd="true" | 36 | android:layout_alignParentEnd="true" | 
| 37 | android:layout_centerVertical="true" | 37 | android:layout_centerVertical="true" | 
| 38 | android:layout_marginEnd="15dp" | 38 | android:layout_marginEnd="15dp" | 
| 39 | android:drawableEnd="@drawable/ic_filter_black" | 39 | android:drawableEnd="@drawable/ic_filter_black" | 
| 40 | android:drawablePadding="5dp" | 40 | android:drawablePadding="5dp" | 
| 41 | android:text="选择学生" | 41 | android:text="选择学生" | 
| 42 | android:textColor="#333333" | 42 | android:textColor="#333333" | 
| 43 | android:textSize="14sp" /> | 43 | android:textSize="14sp" /> | 
| 44 | 44 | ||
| 45 | </RelativeLayout> | 45 | </RelativeLayout> | 
| 46 | 46 | ||
| 47 | <LinearLayout | 47 | <LinearLayout | 
| 48 | android:orientation="horizontal" | 48 | android:orientation="horizontal" | 
| 49 | android:weightSum="2" | 49 | android:weightSum="2" | 
| 50 | android:layout_width="match_parent" | 50 | android:layout_width="match_parent" | 
| 51 | android:layout_height="wrap_content" | 51 | android:layout_height="wrap_content" | 
| 52 | android:baselineAligned="false"> | 52 | android:baselineAligned="false"> | 
| 53 | <FrameLayout | 53 | <FrameLayout | 
| 54 | android:id="@+id/rl_take_photo" | 54 | android:id="@+id/rl_take_photo" | 
| 55 | android:layout_width="0dp" | 55 | android:layout_width="0dp" | 
| 56 | android:layout_weight="1" | 56 | android:layout_weight="1" | 
| 57 | android:layout_height="wrap_content"> | 57 | android:layout_height="wrap_content"> | 
| 58 | <ImageView | 58 | <ImageView | 
| 59 | android:src="@drawable/png_entry_error" | 59 | android:src="@drawable/png_entry_error" | 
| 60 | android:adjustViewBounds="true" | 60 | android:adjustViewBounds="true" | 
| 61 | android:layout_width="match_parent" | 61 | android:layout_width="match_parent" | 
| 62 | android:layout_height="wrap_content"/> | 62 | android:layout_height="wrap_content"/> | 
| 63 | |||
| 64 | <TextView | ||
| 65 | android:layout_width="wrap_content" | ||
| 66 | android:layout_height="wrap_content" | ||
| 67 | android:layout_gravity="center_horizontal|bottom" | ||
| 68 | android:layout_marginBottom="38dp" | ||
| 69 | android:text="录入错题" | ||
| 70 | android:textColor="#EDF6FF" | ||
| 71 | android:textSize="20sp" | ||
| 72 | android:textStyle="bold" /> | ||
| 73 | </FrameLayout> | 63 | </FrameLayout> | 
| 74 | 64 | ||
| 75 | <FrameLayout | 65 | <FrameLayout | 
| 76 | android:id="@+id/flEntryHomework" | 66 | android:id="@+id/flEntryHomework" | 
| 77 | android:layout_width="0dp" | 67 | android:layout_width="0dp" | 
| 78 | android:layout_weight="1" | 68 | android:layout_weight="1" | 
| 79 | android:layout_height="wrap_content"> | 69 | android:layout_height="wrap_content"> | 
| 80 | <ImageView | 70 | <ImageView | 
| 81 | android:src="@drawable/png_entry_homework" | 71 | android:src="@drawable/png_entry_homework" | 
| 82 | android:adjustViewBounds="true" | 72 | android:adjustViewBounds="true" | 
| 83 | android:layout_width="match_parent" | 73 | android:layout_width="match_parent" | 
| 84 | android:layout_height="wrap_content"/> | 74 | android:layout_height="wrap_content"/> | 
| 85 | 75 | ||
| 86 | <TextView | ||
| 87 | android:layout_width="wrap_content" | ||
| 88 | android:layout_height="wrap_content" | ||
| 89 | android:layout_gravity="center_horizontal|bottom" | ||
| 90 | android:layout_marginBottom="38dp" | ||
| 91 | android:text="录入作业" | ||
| 92 | android:textColor="#EDF6FF" | ||
| 93 | android:textSize="20sp" | ||
| 94 | android:textStyle="bold" /> | ||
| 95 | </FrameLayout> | 76 | </FrameLayout> | 
| 96 | </LinearLayout> | 77 | </LinearLayout> | 
| 97 | 78 | ||
| 98 | <LinearLayout | 79 | <LinearLayout | 
| 99 | android:orientation="vertical" | 80 | android:orientation="vertical" | 
| 100 | android:background="@drawable/shape_radius_10" | 81 | android:background="@drawable/shape_radius_10" | 
| 101 | android:backgroundTint="@color/white" | 82 | android:backgroundTint="@color/white" | 
| 102 | android:layout_marginHorizontal="15dp" | 83 | android:layout_marginHorizontal="15dp" | 
| 103 | android:layout_marginTop="10dp" | 84 | android:layout_marginTop="10dp" | 
| 104 | android:layout_marginBottom="15dp" | 85 | android:layout_marginBottom="15dp" | 
| 105 | android:layout_width="match_parent" | 86 | android:layout_width="match_parent" | 
| 106 | android:layout_height="match_parent"> | 87 | android:layout_height="match_parent"> | 
| 107 | 88 | ||
| 108 | <com.google.android.material.tabs.TabLayout | 89 | <com.google.android.material.tabs.TabLayout | 
| 109 | android:id="@+id/tabLayout" | 90 | android:id="@+id/tabLayout" | 
| 110 | app:tabMode="fixed" | 91 | app:tabMode="fixed" | 
| 111 | app:tabGravity="fill" | 92 | app:tabGravity="fill" | 
| 112 | app:tabIndicatorFullWidth="false" | 93 | app:tabIndicatorFullWidth="false" | 
| 113 | app:tabIndicatorColor="#1C90F3" | 94 | app:tabIndicatorColor="#1C90F3" | 
| 114 | app:tabTextColor="#333" | 95 | app:tabTextColor="#333" | 
| 115 | app:tabSelectedTextColor="#1C90F3" | 96 | app:tabSelectedTextColor="#1C90F3" | 
| 116 | app:tabTextAppearance="@style/tab_home_item" | 97 | app:tabTextAppearance="@style/tab_home_item" | 
| 117 | app:tabRippleColor="@color/transparent" | 98 | app:tabRippleColor="@color/transparent" | 
| 118 | android:background="@drawable/bg_tab_home" | 99 | android:background="@drawable/bg_tab_home" | 
| 119 | android:paddingBottom="4dp" | 100 | app:tabIndicatorHeight="2dp" | 
| 120 | android:layout_width="match_parent" | 101 | android:paddingVertical="8dp" | 
| 121 | android:layout_height="36dp"/> | ||
| 122 | |||
| 123 | <androidx.recyclerview.widget.RecyclerView | ||
| 124 | android:id="@+id/rvSubject" | ||
| 125 | android:orientation="horizontal" | ||
| 126 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | ||
| 127 | android:layout_marginTop="15dp" | ||
| 128 | android:layout_width="match_parent" | 102 | android:layout_width="match_parent" | 
| 129 | android:layout_height="wrap_content" /> | 103 | android:layout_height="48dp"/> | 
| 130 | 104 | ||
| 131 | <LinearLayout | 105 | <androidx.core.widget.NestedScrollView | 
| 132 | android:layout_marginTop="16dp" | ||
| 133 | android:layout_marginHorizontal="10dp" | ||
| 134 | android:layout_width="match_parent" | 106 | android:layout_width="match_parent" | 
| 135 | android:layout_height="25dp"> | 107 | android:layout_height="match_parent"> | 
| 136 | <TextView | ||
| 137 | android:id="@+id/tvListTitle" | ||
| 138 | android:layout_width="wrap_content" | ||
| 139 | android:layout_height="wrap_content" | ||
| 140 | android:text="最近错题" | ||
| 141 | android:textColor="#333333" | ||
| 142 | android:textSize="16sp" | ||
| 143 | android:textStyle="bold" /> | ||
| 144 | |||
| 145 | <Space style="@style/empty_space"/> | ||
| 146 | |||
| 147 | <LinearLayout | 108 | <LinearLayout | 
| 148 | android:id="@+id/ll_all" | 109 | android:orientation="vertical" | 
| 149 | android:layout_width="wrap_content" | 110 | android:layout_width="match_parent" | 
| 150 | android:layout_height="wrap_content" | 111 | android:layout_height="wrap_content"> | 
| 151 | android:layout_gravity="center_vertical"> | 112 | |
| 113 | <androidx.recyclerview.widget.RecyclerView | ||
| 114 | android:id="@+id/rvSubject" | ||
| 115 | android:orientation="horizontal" | ||
| 116 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | ||
| 117 | android:layout_marginTop="15dp" | ||
| 118 | android:layout_width="match_parent" | ||
| 119 | android:layout_height="wrap_content" /> | ||
| 120 | |||
| 121 | <LinearLayout | ||
| 122 | android:layout_marginTop="16dp" | ||
| 123 | android:layout_marginHorizontal="10dp" | ||
| 124 | android:layout_width="match_parent" | ||
| 125 | android:layout_height="25dp"> | ||
| 126 | <TextView | ||
| 127 | android:id="@+id/tvListTitle" | ||
| 128 | android:layout_width="wrap_content" | ||
| 129 | android:layout_height="wrap_content" | ||
| 130 | android:text="最近错题" | ||
| 131 | android:textColor="#333333" | ||
| 132 | android:textSize="16sp" | ||
| 133 | android:textStyle="bold" /> | ||
| 134 | |||
| 135 | <Space style="@style/empty_space"/> | ||
| 136 | |||
| 137 | <LinearLayout | ||
| 138 | android:id="@+id/ll_all" | ||
| 139 | android:layout_width="wrap_content" | ||
| 140 | android:layout_height="wrap_content" | ||
| 141 | android:layout_gravity="center_vertical"> | ||
| 142 | |||
| 143 | <TextView | ||
| 144 | android:layout_width="wrap_content" | ||
| 145 | android:layout_height="wrap_content" | ||
| 146 | android:layout_gravity="center_vertical" | ||
| 147 | android:text="查看全部" | ||
| 148 | android:textColor="#666666" | ||
| 149 | android:textSize="12sp" /> | ||
| 150 | |||
| 151 | <ImageView | ||
| 152 | android:layout_width="9dp" | ||
| 153 | android:layout_height="10dp" | ||
| 154 | android:layout_gravity="center_vertical" | ||
| 155 | android:layout_marginStart="5dp" | ||
| 156 | android:src="@mipmap/ic_arrow_right" /> | ||
| 157 | </LinearLayout> | ||
| 158 | </LinearLayout> | ||
| 159 | |||
| 160 | <androidx.recyclerview.widget.RecyclerView | ||
| 161 | android:id="@+id/rvMain" | ||
| 162 | android:orientation="vertical" |