Compare View
Commits (5)
Showing
10 changed files
Show diff stats
app/src/main/AndroidManifest.xml
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | android:label="@string/app_name" |
| 39 | 39 | android:networkSecurityConfig="@xml/network_security_config" |
| 40 | 40 | android:supportsRtl="true" |
| 41 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar"> | |
| 41 | + android:theme="@style/AppTheme"> | |
| 42 | 42 | <activity |
| 43 | 43 | android:name=".LoginActivity" |
| 44 | 44 | android:exported="true" |
| ... | ... | @@ -52,105 +52,81 @@ |
| 52 | 52 | <activity |
| 53 | 53 | android:name=".MainActivity" |
| 54 | 54 | android:launchMode="singleTask" |
| 55 | - android:screenOrientation="portrait" | |
| 56 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 55 | + android:screenOrientation="portrait" /> | |
| 57 | 56 | <activity |
| 58 | 57 | android:name=".RegisterActivity" |
| 59 | 58 | android:screenOrientation="portrait" |
| 60 | 59 | android:theme="@style/ThemeSplash" /> |
| 61 | 60 | <activity |
| 62 | 61 | android:name=".UserActivity" |
| 63 | - android:screenOrientation="portrait" | |
| 64 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 62 | + android:screenOrientation="portrait" /> | |
| 65 | 63 | <activity |
| 66 | 64 | android:name=".YinsiActivity" |
| 67 | - android:screenOrientation="portrait" | |
| 68 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 65 | + android:screenOrientation="portrait" /> | |
| 69 | 66 | <activity |
| 70 | 67 | android:name=".QRActivity" |
| 71 | - android:screenOrientation="portrait" | |
| 72 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 68 | + android:screenOrientation="portrait" /> | |
| 73 | 69 | <activity |
| 74 | 70 | android:name=".AddStudentActivity" |
| 75 | - android:screenOrientation="portrait" | |
| 76 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 71 | + android:screenOrientation="portrait" /> | |
| 77 | 72 | <activity |
| 78 | 73 | android:name=".NickActivity" |
| 79 | - android:screenOrientation="portrait" | |
| 80 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 74 | + android:screenOrientation="portrait" /> | |
| 81 | 75 | <activity |
| 82 | 76 | android:name=".SexActivity" |
| 83 | - android:screenOrientation="portrait" | |
| 84 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 77 | + android:screenOrientation="portrait" /> | |
| 85 | 78 | <activity |
| 86 | 79 | android:name=".NianActivity" |
| 87 | - android:screenOrientation="portrait" | |
| 88 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 80 | + android:screenOrientation="portrait" /> | |
| 89 | 81 | <activity |
| 90 | 82 | android:name=".ShenActivity" |
| 91 | - android:screenOrientation="portrait" | |
| 92 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 83 | + android:screenOrientation="portrait" /> | |
| 93 | 84 | <activity |
| 94 | 85 | android:name=".UserAgreementActivity" |
| 95 | - android:screenOrientation="portrait" | |
| 96 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 86 | + android:screenOrientation="portrait" /> | |
| 97 | 87 | <activity |
| 98 | 88 | android:name=".AccountActivity" |
| 99 | - android:screenOrientation="portrait" | |
| 100 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 89 | + android:screenOrientation="portrait" /> | |
| 101 | 90 | |
| 102 | 91 | <activity |
| 103 | 92 | android:name=".ChangePwdActivity" |
| 104 | - android:screenOrientation="portrait" | |
| 105 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 93 | + android:screenOrientation="portrait" /> | |
| 106 | 94 | <activity |
| 107 | 95 | android:name=".EditStudentActivity" |
| 108 | - android:screenOrientation="portrait" | |
| 109 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 96 | + android:screenOrientation="portrait" /> | |
| 110 | 97 | <activity |
| 111 | 98 | android:name=".ChooseActivity" |
| 112 | - android:screenOrientation="portrait" | |
| 113 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 99 | + android:screenOrientation="portrait" /> | |
| 114 | 100 | <activity |
| 115 | 101 | android:name=".AddTeacherActivity" |
| 116 | - android:screenOrientation="portrait" | |
| 117 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 102 | + android:screenOrientation="portrait" /> | |
| 118 | 103 | <activity |
| 119 | 104 | android:name=".ErrorBookActivity" |
| 120 | - android:screenOrientation="portrait" | |
| 121 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 105 | + android:screenOrientation="portrait" /> | |
| 122 | 106 | <activity |
| 123 | 107 | android:name=".ImageActivity" |
| 124 | - android:screenOrientation="portrait" | |
| 125 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 108 | + android:screenOrientation="portrait" /> | |
| 126 | 109 | <activity |
| 127 | 110 | android:name=".ImageEditActivity" |
| 128 | - android:screenOrientation="portrait" | |
| 129 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 111 | + android:screenOrientation="portrait" /> | |
| 130 | 112 | <activity |
| 131 | 113 | android:name=".ImageSelectActivity" |
| 132 | - android:screenOrientation="portrait" | |
| 133 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 114 | + android:screenOrientation="portrait" /> | |
| 134 | 115 | <activity |
| 135 | 116 | android:name=".AddSuccessActivity" |
| 136 | - android:screenOrientation="portrait" | |
| 137 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 117 | + android:screenOrientation="portrait" /> | |
| 138 | 118 | <activity |
| 139 | 119 | android:name=".ErrorListActivity" |
| 140 | - android:screenOrientation="portrait" | |
| 141 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 120 | + android:screenOrientation="portrait" /> | |
| 142 | 121 | <activity |
| 143 | 122 | android:name=".ErrorDetailActivity" |
| 144 | - android:screenOrientation="portrait" | |
| 145 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 123 | + android:screenOrientation="portrait" /> | |
| 146 | 124 | <activity |
| 147 | 125 | android:name=".TeacherChooseActivity" |
| 148 | - android:screenOrientation="portrait" | |
| 149 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 126 | + android:screenOrientation="portrait" /> | |
| 150 | 127 | <activity |
| 151 | 128 | android:name=".TeacherMainActivity" |
| 152 | - android:screenOrientation="portrait" | |
| 153 | - android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | |
| 129 | + android:screenOrientation="portrait" /> | |
| 154 | 130 | <activity android:name=".StuHomeworkActivity" /> |
| 155 | 131 | <activity android:name=".HomeworkDetailActivity" /> |
| 156 | 132 | <activity android:name=".HomeworkSelectActivity" /> | ... | ... |
app/src/main/java/com/hjx/parent/StuHomeworkActivity.java
| ... | ... | @@ -535,6 +535,9 @@ public class StuHomeworkActivity extends BaseRxActivity<ActivityStudentHomeworkB |
| 535 | 535 | btnDetail.setOnClickListener(v -> { |
| 536 | 536 | if (detailCall != null) detailCall.invoke(data); |
| 537 | 537 | }); |
| 538 | + holder.itemView.setOnClickListener(v -> { | |
| 539 | + if (detailCall != null) detailCall.invoke(data); | |
| 540 | + }); | |
| 538 | 541 | } |
| 539 | 542 | |
| 540 | 543 | private SimpleDateFormat getFormatWithGmt8(String pattern) { | ... | ... |
app/src/main/java/com/hjx/parent/fragment/ErrorFragment.java
| ... | ... | @@ -195,8 +195,8 @@ public class ErrorFragment extends BaseRxFragment<FragmentErrorBookBinding> { |
| 195 | 195 | } |
| 196 | 196 | }); |
| 197 | 197 | binding.rvMain.setAdapter(errorAdapter); |
| 198 | - binding.tabLayout.addTab(binding.tabLayout.newTab().setText("最近错题")); | |
| 199 | - binding.tabLayout.addTab(binding.tabLayout.newTab().setText("最近作业")); | |
| 198 | +// binding.tabLayout.addTab(binding.tabLayout.newTab().setText("最近错题")); | |
| 199 | +// binding.tabLayout.addTab(binding.tabLayout.newTab().setText("最近作业")); | |
| 200 | 200 | binding.tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { |
| 201 | 201 | @Override |
| 202 | 202 | public void onTabSelected(TabLayout.Tab tab) { | ... | ... |
app/src/main/res/layout/activity_homework_detail.xml
| ... | ... | @@ -6,12 +6,13 @@ |
| 6 | 6 | android:orientation="vertical" |
| 7 | 7 | android:layout_width="match_parent" |
| 8 | 8 | android:layout_height="match_parent" |
| 9 | - tools:ignore="HardcodedText"> | |
| 9 | + tools:ignore="HardcodedText,SpUsage"> | |
| 10 | 10 | |
| 11 | 11 | <androidx.appcompat.widget.Toolbar |
| 12 | 12 | android:id="@+id/toolbar" |
| 13 | 13 | app:navigationIcon="@drawable/svg_back" |
| 14 | - app:contentInsetStartWithNavigation="14dp" | |
| 14 | + app:contentInsetStart="0dp" | |
| 15 | + app:contentInsetStartWithNavigation="0dp" | |
| 15 | 16 | android:paddingStart="-8dp" |
| 16 | 17 | android:paddingEnd="-8dp" |
| 17 | 18 | android:background="@color/white" |
| ... | ... | @@ -19,15 +20,15 @@ |
| 19 | 20 | android:layout_height="40dp"> |
| 20 | 21 | <TextView |
| 21 | 22 | android:id="@+id/tvTitle" |
| 22 | - tools:text="作业名称作业名称作业名称作业名称" | |
| 23 | + tools:text="2024年10月12日数学作业" | |
| 23 | 24 | android:singleLine="true" |
| 24 | 25 | android:maxEms="10" |
| 25 | 26 | android:ellipsize="end" |
| 26 | - android:textSize="18sp" | |
| 27 | + android:textSize="16dp" | |
| 27 | 28 | android:textColor="#333" |
| 28 | 29 | android:textStyle="bold" |
| 29 | 30 | android:layout_width="wrap_content" |
| 30 | - android:layout_height="wrap_content"/> | |
| 31 | + android:layout_height="wrap_content" /> | |
| 31 | 32 | <androidx.appcompat.widget.AppCompatImageView |
| 32 | 33 | android:id="@+id/btnEdit" |
| 33 | 34 | android:src="@drawable/svg_homework_edit" |
| ... | ... | @@ -37,7 +38,7 @@ |
| 37 | 38 | <TextView |
| 38 | 39 | android:id="@+id/btnFeedback" |
| 39 | 40 | android:text="反馈作业" |
| 40 | - android:textSize="13sp" | |
| 41 | + android:textSize="13dp" | |
| 41 | 42 | android:textColor="#1C90F3" |
| 42 | 43 | android:textStyle="bold" |
| 43 | 44 | android:layout_gravity="end|center_vertical" | ... | ... |
app/src/main/res/layout/activity_homework_feedback.xml
| ... | ... | @@ -143,7 +143,13 @@ |
| 143 | 143 | android:textColor="#333" |
| 144 | 144 | android:layout_width="wrap_content" |
| 145 | 145 | android:layout_height="wrap_content"/> |
| 146 | - <Space style="@style/empty_space"/> | |
| 146 | + </LinearLayout> | |
| 147 | + <LinearLayout | |
| 148 | + android:orientation="horizontal" | |
| 149 | + android:layout_marginHorizontal="15dp" | |
| 150 | + android:layout_marginTop="15dp" | |
| 151 | + android:layout_width="match_parent" | |
| 152 | + android:layout_height="wrap_content"> | |
| 147 | 153 | <TextView |
| 148 | 154 | android:text="答题结果" |
| 149 | 155 | android:textSize="14sp" |
| ... | ... | @@ -182,6 +188,7 @@ |
| 182 | 188 | android:background="@drawable/shape_radius_10" |
| 183 | 189 | android:backgroundTint="@color/white" |
| 184 | 190 | android:layout_marginTop="15dp" |
| 191 | + android:paddingBottom="16dp" | |
| 185 | 192 | android:layout_width="match_parent" |
| 186 | 193 | android:layout_height="wrap_content"> |
| 187 | 194 | <androidx.appcompat.widget.AppCompatTextView | ... | ... |
app/src/main/res/layout/activity_student_homework.xml
| ... | ... | @@ -34,8 +34,9 @@ |
| 34 | 34 | </androidx.appcompat.widget.Toolbar> |
| 35 | 35 | <com.google.android.material.tabs.TabLayout |
| 36 | 36 | android:id="@+id/tabLayout" |
| 37 | - app:tabMode="fixed" | |
| 38 | - app:tabGravity="fill" | |
| 37 | + app:tabMode="scrollable" | |
| 38 | + app:tabGravity="start" | |
| 39 | + android:paddingHorizontal="8dp" | |
| 39 | 40 | app:tabTextColor="#333333" |
| 40 | 41 | app:tabSelectedTextColor="#1C90F3" |
| 41 | 42 | app:tabIndicatorColor="#1C90F3" |
| ... | ... | @@ -95,6 +96,7 @@ |
| 95 | 96 | android:textStyle="bold" |
| 96 | 97 | android:background="@drawable/btn_general_huyou" |
| 97 | 98 | android:layout_marginTop="16dp" |
| 99 | + android:layout_marginBottom="8dp" | |
| 98 | 100 | android:layout_marginHorizontal="30dp" |
| 99 | 101 | android:layout_width="match_parent" |
| 100 | 102 | android:layout_height="35dp" |
| ... | ... | @@ -115,6 +117,7 @@ |
| 115 | 117 | android:textStyle="bold" |
| 116 | 118 | android:background="@drawable/btn_general_huyou" |
| 117 | 119 | android:layout_marginTop="16dp" |
| 120 | + android:layout_marginBottom="8dp" | |
| 118 | 121 | android:layout_marginHorizontal="30dp" |
| 119 | 122 | android:layout_width="match_parent" |
| 120 | 123 | android:layout_height="35dp" | ... | ... |
app/src/main/res/layout/dialog_add_homework.xml
app/src/main/res/layout/fragment_error_book.xml
| ... | ... | @@ -100,7 +100,16 @@ |
| 100 | 100 | app:tabIndicatorHeight="2dp" |
| 101 | 101 | android:paddingVertical="8dp" |
| 102 | 102 | android:layout_width="match_parent" |
| 103 | - android:layout_height="48dp"/> | |
| 103 | + android:layout_height="48dp"> | |
| 104 | + <com.google.android.material.tabs.TabItem | |
| 105 | + android:text="最近错题" | |
| 106 | + android:layout_width="wrap_content" | |
| 107 | + android:layout_height="wrap_content"/> | |
| 108 | + <com.google.android.material.tabs.TabItem | |
| 109 | + android:text="最近作业" | |
| 110 | + android:layout_width="wrap_content" | |
| 111 | + android:layout_height="wrap_content"/> | |
| 112 | + </com.google.android.material.tabs.TabLayout> | |
| 104 | 113 | |
| 105 | 114 | <androidx.core.widget.NestedScrollView |
| 106 | 115 | android:layout_width="match_parent" | ... | ... |
app/src/main/res/values/appearance.xml
app/src/main/res/values/styles.xml
| 1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | 2 | <resources> |
| 3 | + <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
| 4 | + <!-- 全局应用的 Spinner 样式 --> | |
| 5 | + <item name="android:spinnerItemStyle">@style/CustomSpinnerItemStyle</item> | |
| 6 | + </style> | |
| 3 | 7 | |
| 8 | + <style name="CustomSpinnerItemStyle" parent="@style/Widget.AppCompat.TextView.SpinnerItem"> | |
| 9 | + <item name="android:textSize">13sp</item> | |
| 10 | + </style> | |
| 4 | 11 | |
| 5 | - <style name="ThemeSplash" parent="Theme.AppCompat.Light.NoActionBar"> | |
| 12 | + | |
| 13 | + <style name="ThemeSplash" parent="AppTheme"> | |
| 6 | 14 | <item name="android:windowBackground">@drawable/welcome_bg</item> |
| 7 | 15 | <item name="colorPrimaryDark">@android:color/transparent</item> |
| 8 | 16 | <item name="windowActionBar">false</item> |
| ... | ... | @@ -50,7 +58,7 @@ |
| 50 | 58 | <item name="divider">@color/border</item> |
| 51 | 59 | <item name="android:scrollbars">none</item> |
| 52 | 60 | <item name="android:dividerHeight">1dp</item> |
| 53 | - <item name="android:textSize">15sp</item> | |
| 61 | + <item name="android:textSize">13sp</item> | |
| 54 | 62 | </style> |
| 55 | 63 | |
| 56 | 64 | <style name="empty_space"> | ... | ... |