Commit b4bc21d212dc7dc3b13dd7cc7545dcc43f5a889e
1 parent
b3eb268d00
Exists in
master
空数据页面
Showing
2 changed files
with
30 additions
and
0 deletions
Show diff stats
app/src/main/java/com/hjx/parent/StuHomeworkActivity.java
... | ... | @@ -79,6 +79,7 @@ public class StuHomeworkActivity extends BaseRxActivity<ActivityStudentHomeworkB |
79 | 79 | binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); |
80 | 80 | binding.tvTitle.setText(state.student.stuName + "的全部作业"); |
81 | 81 | setupTab(); |
82 | + homeworkAdapter.setEmptyView(R.layout.empty_list_homework, binding.recyclerView); | |
82 | 83 | binding.recyclerView.setAdapter(homeworkAdapter); |
83 | 84 | |
84 | 85 | deleteDialog = new MsgConfirmDialog.Builder(this) | ... | ... |
app/src/main/res/layout/empty_list_homework.xml
... | ... | @@ -0,0 +1,29 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | |
4 | + xmlns:tools="http://schemas.android.com/tools" | |
5 | + android:layout_width="match_parent" | |
6 | + android:layout_height="wrap_content" | |
7 | + tools:ignore="UseCompoundDrawables,HardcodedText,SmallSp,ContentDescription"> | |
8 | + | |
9 | + <LinearLayout | |
10 | + android:layout_marginVertical="40dp" | |
11 | + android:layout_width="wrap_content" | |
12 | + android:layout_height="wrap_content" | |
13 | + android:layout_gravity="center_horizontal" | |
14 | + android:orientation="vertical"> | |
15 | + | |
16 | + <ImageView | |
17 | + android:layout_width="155dp" | |
18 | + android:layout_height="130dp" | |
19 | + android:src="@mipmap/ic_empty" /> | |
20 | + | |
21 | + <TextView | |
22 | + android:id="@+id/tvEmpty" | |
23 | + android:layout_width="wrap_content" | |
24 | + android:layout_height="wrap_content" | |
25 | + android:layout_gravity="center_horizontal" | |
26 | + android:text="暂无作业~" /> | |
27 | + </LinearLayout> | |
28 | + | |
29 | +</FrameLayout> | |
0 | 30 | \ No newline at end of file | ... | ... |