Commit b3eb268d00c530caf22f7608bde958210e043671
1 parent
21e7841a44
Exists in
master
优化排版
Showing
4 changed files
with
11 additions
and
8 deletions
Show diff stats
app/src/main/java/com/hjx/parent/StuHomeworkActivity.java
... | ... | @@ -3,13 +3,9 @@ package com.hjx.parent; |
3 | 3 | import android.annotation.SuppressLint; |
4 | 4 | import android.content.Intent; |
5 | 5 | import android.os.Bundle; |
6 | -import android.view.Gravity; | |
7 | 6 | import android.view.View; |
8 | -import android.widget.ImageView; | |
9 | 7 | import android.widget.LinearLayout; |
10 | -import android.widget.PopupMenu; | |
11 | 8 | import android.widget.PopupWindow; |
12 | -import android.widget.TextView; | |
13 | 9 | |
14 | 10 | import androidx.annotation.NonNull; |
15 | 11 | import androidx.annotation.Nullable; |
... | ... | @@ -37,7 +33,6 @@ import com.prws.common.net.NetWorks; |
37 | 33 | import com.prws.common.utils.SharedPreferencesUtil; |
38 | 34 | import com.trello.rxlifecycle2.android.RxLifecycleAndroid; |
39 | 35 | |
40 | -import java.text.DecimalFormat; | |
41 | 36 | import java.text.SimpleDateFormat; |
42 | 37 | import java.util.ArrayList; |
43 | 38 | import java.util.Calendar; | ... | ... |
app/src/main/res/layout/activity_homework_detail.xml
... | ... | @@ -19,7 +19,10 @@ |
19 | 19 | android:layout_height="40dp"> |
20 | 20 | <TextView |
21 | 21 | android:id="@+id/tvTitle" |
22 | - tools:text="作业名称" | |
22 | + tools:text="作业名称作业名称作业名称作业名称" | |
23 | + android:singleLine="true" | |
24 | + android:maxEms="10" | |
25 | + android:ellipsize="end" | |
23 | 26 | android:textSize="18sp" |
24 | 27 | android:textColor="#333" |
25 | 28 | android:textStyle="bold" | ... | ... |
app/src/main/res/layout/item_homework.xml
... | ... | @@ -42,7 +42,9 @@ |
42 | 42 | android:layout_height="match_parent"> |
43 | 43 | <TextView |
44 | 44 | android:id="@+id/tvName" |
45 | - tools:text="作业名称" | |
45 | + tools:text="作业名称作业名称作业名称作业名称作业名称" | |
46 | + android:singleLine="true" | |
47 | + android:maxEms="12" | |
46 | 48 | android:textSize="13sp" |
47 | 49 | android:textColor="#333" |
48 | 50 | android:layout_width="wrap_content" | ... | ... |
app/src/main/res/layout/item_homework_list.xml
... | ... | @@ -47,9 +47,12 @@ |
47 | 47 | android:layout_height="match_parent"> |
48 | 48 | <TextView |
49 | 49 | android:id="@+id/tvName" |
50 | - tools:text="作业名称" | |
50 | + tools:text="作业名称作业名称作业名称作业名称作业名称作业名称作业名称" | |
51 | 51 | android:textSize="13sp" |
52 | 52 | android:textColor="#333" |
53 | + android:singleLine="true" | |
54 | + android:maxEms="16" | |
55 | + android:ellipsize="end" | |
53 | 56 | android:layout_width="wrap_content" |
54 | 57 | android:layout_height="wrap_content"/> |
55 | 58 | <Space style="@style/empty_space"/> | ... | ... |