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
| ... | ... | @@ -60,16 +60,6 @@ |
| 60 | 60 | android:adjustViewBounds="true" |
| 61 | 61 | android:layout_width="match_parent" |
| 62 | 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 | 63 | </FrameLayout> |
| 74 | 64 | |
| 75 | 65 | <FrameLayout |
| ... | ... | @@ -83,15 +73,6 @@ |
| 83 | 73 | android:layout_width="match_parent" |
| 84 | 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 | 76 | </FrameLayout> |
| 96 | 77 | </LinearLayout> |
| 97 | 78 | |
| ... | ... | @@ -116,86 +97,97 @@ |
| 116 | 97 | app:tabTextAppearance="@style/tab_home_item" |
| 117 | 98 | app:tabRippleColor="@color/transparent" |
| 118 | 99 | android:background="@drawable/bg_tab_home" |
| 119 | - android:paddingBottom="4dp" | |
| 120 | - android:layout_width="match_parent" | |
| 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" | |
| 100 | + app:tabIndicatorHeight="2dp" | |
| 101 | + android:paddingVertical="8dp" | |
| 128 | 102 | android:layout_width="match_parent" |
| 129 | - android:layout_height="wrap_content" /> | |
| 103 | + android:layout_height="48dp"/> | |
| 130 | 104 | |
| 131 | - <LinearLayout | |
| 132 | - android:layout_marginTop="16dp" | |
| 133 | - android:layout_marginHorizontal="10dp" | |
| 105 | + <androidx.core.widget.NestedScrollView | |
| 134 | 106 | android:layout_width="match_parent" |
| 135 | - android:layout_height="25dp"> | |
| 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 | - | |
| 107 | + android:layout_height="match_parent"> | |
| 147 | 108 | <LinearLayout |
| 148 | - android:id="@+id/ll_all" | |
| 149 | - android:layout_width="wrap_content" | |
| 150 | - android:layout_height="wrap_content" | |
| 151 | - android:layout_gravity="center_vertical"> | |
| 109 | + android:orientation="vertical" | |
| 110 | + android:layout_width="match_parent" | |
| 111 | + android:layout_height="wrap_content"> | |
| 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" | |
| 163 | + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |
| 164 | + android:layout_width="match_parent" | |
| 165 | + android:layout_height="wrap_content" | |
| 166 | + android:layout_marginTop="15dp" /> | |
| 152 | 167 | |
| 153 | - <TextView | |
| 168 | + <LinearLayout | |
| 169 | + android:id="@+id/ll_empty" | |
| 154 | 170 | android:layout_width="wrap_content" |
| 155 | 171 | android:layout_height="wrap_content" |
| 156 | - android:layout_gravity="center_vertical" | |
| 157 | - android:text="查看全部" | |
| 158 | - android:textColor="#666666" | |
| 159 | - android:textSize="12sp" /> | |
| 160 | - | |
| 161 | - <ImageView | |
| 162 | - android:layout_width="9dp" | |
| 163 | - android:layout_height="10dp" | |
| 164 | - android:layout_gravity="center_vertical" | |
| 165 | - android:layout_marginStart="5dp" | |
| 166 | - android:src="@mipmap/ic_arrow_right" /> | |
| 167 | - </LinearLayout> | |
| 168 | - </LinearLayout> | |
| 169 | - | |
| 170 | - <androidx.recyclerview.widget.RecyclerView | |
| 171 | - android:id="@+id/rvMain" | |
| 172 | - android:orientation="vertical" | |
| 173 | - app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |
| 174 | - android:layout_width="match_parent" | |
| 175 | - android:layout_height="match_parent" | |
| 176 | - android:layout_marginTop="15dp" /> | |
| 177 | - | |
| 178 | - <LinearLayout | |
| 179 | - android:id="@+id/ll_empty" | |
| 180 | - android:layout_width="wrap_content" | |
| 181 | - android:layout_height="wrap_content" | |
| 182 | - android:layout_gravity="center_horizontal" | |
| 183 | - android:layout_marginTop="30dp" | |
| 184 | - android:orientation="vertical" | |
| 185 | - android:visibility="gone"> | |
| 186 | - | |
| 187 | - <ImageView | |
| 188 | - android:layout_width="155dp" | |
| 189 | - android:layout_height="130dp" | |
| 190 | - android:src="@mipmap/ic_empty" /> | |
| 191 | - | |
| 192 | - <TextView | |
| 193 | - android:id="@+id/tvEmpty" | |
| 194 | - android:layout_width="wrap_content" | |
| 195 | - android:layout_height="wrap_content" | |
| 196 | - android:layout_gravity="center_horizontal" | |
| 197 | - android:text="暂无错题~" /> | |
| 198 | - </LinearLayout> | |
| 172 | + android:layout_gravity="center_horizontal" | |
| 173 | + android:layout_marginTop="30dp" | |
| 174 | + android:orientation="vertical" | |
| 175 | + android:visibility="gone"> | |
| 176 | + | |
| 177 | + <ImageView | |
| 178 | + android:layout_width="155dp" | |
| 179 | + android:layout_height="130dp" | |
| 180 | + android:src="@mipmap/ic_empty" /> | |
| 181 | + | |
| 182 | + <TextView | |
| 183 | + android:id="@+id/tvEmpty" | |
| 184 | + android:layout_width="wrap_content" | |
| 185 | + android:layout_height="wrap_content" | |
| 186 | + android:layout_gravity="center_horizontal" | |
| 187 | + android:text="暂无错题~" /> | |
| 188 | + </LinearLayout> | |
| 199 | 189 | |
| 190 | + </LinearLayout> | |
| 191 | + </androidx.core.widget.NestedScrollView> | |
| 200 | 192 | </LinearLayout> |
| 201 | 193 | </LinearLayout> |
| 202 | 194 | \ No newline at end of file | ... | ... |