Commit e33341bbcc65106c5d575fc71b8669e49143e0cc
1 parent
7bcb60ecb9
Exists in
master
规范theme使用; 优化录入作业dialog字体
Showing
3 changed files
with
36 additions
and
52 deletions
Show diff stats
app/src/main/AndroidManifest.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | xmlns:tools="http://schemas.android.com/tools" | 3 | xmlns:tools="http://schemas.android.com/tools" |
| 4 | package="com.hjx.parent"> | 4 | package="com.hjx.parent"> |
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" /> | 7 | <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" /> |
| 8 | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <!-- 允许程序改变网络链接状态 --> | 8 | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <!-- 允许程序改变网络链接状态 --> |
| 9 | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- 允许程序访问访问WIFI网络状态信息 --> | 9 | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- 允许程序访问访问WIFI网络状态信息 --> |
| 10 | <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- 允许程序改变WIFI链接状态 --> | 10 | <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- 允许程序改变WIFI链接状态 --> |
| 11 | <!-- 6.0系统需要添加权限才能获得wifi列表 --> | 11 | <!-- 6.0系统需要添加权限才能获得wifi列表 --> |
| 12 | <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | 12 | <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> |
| 13 | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | 13 | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
| 14 | <uses-permission android:name="android.permission.INTERNET" /> | 14 | <uses-permission android:name="android.permission.INTERNET" /> |
| 15 | <uses-permission android:name="android.permission.RECORD_AUDIO" /> | 15 | <uses-permission android:name="android.permission.RECORD_AUDIO" /> |
| 16 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | 16 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
| 17 | 17 | ||
| 18 | <uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> | 18 | <uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> |
| 19 | <uses-permission android:name="android.permission.READ_PHONE_STATE" /> | 19 | <uses-permission android:name="android.permission.READ_PHONE_STATE" /> |
| 20 | <uses-permission android:name="android.permission.WAKE_LOCK" /> | 20 | <uses-permission android:name="android.permission.WAKE_LOCK" /> |
| 21 | <uses-permission android:name="android.permission.CAMERA" /> | 21 | <uses-permission android:name="android.permission.CAMERA" /> |
| 22 | <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | 22 | <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> |
| 23 | <uses-permission android:name="android.permission.VIBRATE" /> | 23 | <uses-permission android:name="android.permission.VIBRATE" /> |
| 24 | <uses-permission | 24 | <uses-permission |
| 25 | android:name="android.permission.WRITE_EXTERNAL_STORAGE" | 25 | android:name="android.permission.WRITE_EXTERNAL_STORAGE" |
| 26 | tools:ignore="ScopedStorage" /> | 26 | tools:ignore="ScopedStorage" /> |
| 27 | <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> | 27 | <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> |
| 28 | <uses-permission android:name="android.permission.GET_PACKAGE_SIZE" /> | 28 | <uses-permission android:name="android.permission.GET_PACKAGE_SIZE" /> |
| 29 | 29 | ||
| 30 | <uses-permission | 30 | <uses-permission |
| 31 | android:name="android.permission.MANAGE_EXTERNAL_STORAGE" | 31 | android:name="android.permission.MANAGE_EXTERNAL_STORAGE" |
| 32 | tools:ignore="ScopedStorage" /> | 32 | tools:ignore="ScopedStorage" /> |
| 33 | 33 | ||
| 34 | <application | 34 | <application |
| 35 | android:name=".App" | 35 | android:name=".App" |
| 36 | android:allowBackup="true" | 36 | android:allowBackup="true" |
| 37 | android:icon="@mipmap/icon" | 37 | android:icon="@mipmap/icon" |
| 38 | android:label="@string/app_name" | 38 | android:label="@string/app_name" |
| 39 | android:networkSecurityConfig="@xml/network_security_config" | 39 | android:networkSecurityConfig="@xml/network_security_config" |
| 40 | android:supportsRtl="true" | 40 | android:supportsRtl="true" |
| 41 | android:theme="@style/Theme.AppCompat.Light.NoActionBar"> | 41 | android:theme="@style/AppTheme"> |
| 42 | <activity | 42 | <activity |
| 43 | android:name=".LoginActivity" | 43 | android:name=".LoginActivity" |
| 44 | android:exported="true" | 44 | android:exported="true" |
| 45 | android:screenOrientation="portrait" | 45 | android:screenOrientation="portrait" |
| 46 | android:theme="@style/ThemeSplash"> | 46 | android:theme="@style/ThemeSplash"> |
| 47 | <intent-filter> | 47 | <intent-filter> |
| 48 | <action android:name="android.intent.action.MAIN" /> | 48 | <action android:name="android.intent.action.MAIN" /> |
| 49 | <category android:name="android.intent.category.LAUNCHER" /> | 49 | <category android:name="android.intent.category.LAUNCHER" /> |
| 50 | </intent-filter> | 50 | </intent-filter> |
| 51 | </activity> | 51 | </activity> |
| 52 | <activity | 52 | <activity |
| 53 | android:name=".MainActivity" | 53 | android:name=".MainActivity" |
| 54 | android:launchMode="singleTask" | 54 | android:launchMode="singleTask" |
| 55 | android:screenOrientation="portrait" | 55 | android:screenOrientation="portrait" /> |
| 56 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 57 | <activity | 56 | <activity |
| 58 | android:name=".RegisterActivity" | 57 | android:name=".RegisterActivity" |
| 59 | android:screenOrientation="portrait" | 58 | android:screenOrientation="portrait" |
| 60 | android:theme="@style/ThemeSplash" /> | 59 | android:theme="@style/ThemeSplash" /> |
| 61 | <activity | 60 | <activity |
| 62 | android:name=".UserActivity" | 61 | android:name=".UserActivity" |
| 63 | android:screenOrientation="portrait" | 62 | android:screenOrientation="portrait" /> |
| 64 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 65 | <activity | 63 | <activity |
| 66 | android:name=".YinsiActivity" | 64 | android:name=".YinsiActivity" |
| 67 | android:screenOrientation="portrait" | 65 | android:screenOrientation="portrait" /> |
| 68 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 69 | <activity | 66 | <activity |
| 70 | android:name=".QRActivity" | 67 | android:name=".QRActivity" |
| 71 | android:screenOrientation="portrait" | 68 | android:screenOrientation="portrait" /> |
| 72 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 73 | <activity | 69 | <activity |
| 74 | android:name=".AddStudentActivity" | 70 | android:name=".AddStudentActivity" |
| 75 | android:screenOrientation="portrait" | 71 | android:screenOrientation="portrait" /> |
| 76 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 77 | <activity | 72 | <activity |
| 78 | android:name=".NickActivity" | 73 | android:name=".NickActivity" |
| 79 | android:screenOrientation="portrait" | 74 | android:screenOrientation="portrait" /> |
| 80 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 81 | <activity | 75 | <activity |
| 82 | android:name=".SexActivity" | 76 | android:name=".SexActivity" |
| 83 | android:screenOrientation="portrait" | 77 | android:screenOrientation="portrait" /> |
| 84 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 85 | <activity | 78 | <activity |
| 86 | android:name=".NianActivity" | 79 | android:name=".NianActivity" |
| 87 | android:screenOrientation="portrait" | 80 | android:screenOrientation="portrait" /> |
| 88 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 89 | <activity | 81 | <activity |
| 90 | android:name=".ShenActivity" | 82 | android:name=".ShenActivity" |
| 91 | android:screenOrientation="portrait" | 83 | android:screenOrientation="portrait" /> |
| 92 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 93 | <activity | 84 | <activity |
| 94 | android:name=".UserAgreementActivity" | 85 | android:name=".UserAgreementActivity" |
| 95 | android:screenOrientation="portrait" | 86 | android:screenOrientation="portrait" /> |
| 96 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 97 | <activity | 87 | <activity |
| 98 | android:name=".AccountActivity" | 88 | android:name=".AccountActivity" |
| 99 | android:screenOrientation="portrait" | 89 | android:screenOrientation="portrait" /> |
| 100 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 101 | 90 | ||
| 102 | <activity | 91 | <activity |
| 103 | android:name=".ChangePwdActivity" | 92 | android:name=".ChangePwdActivity" |
| 104 | android:screenOrientation="portrait" | 93 | android:screenOrientation="portrait" /> |
| 105 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 106 | <activity | 94 | <activity |
| 107 | android:name=".EditStudentActivity" | 95 | android:name=".EditStudentActivity" |
| 108 | android:screenOrientation="portrait" | 96 | android:screenOrientation="portrait" /> |
| 109 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 110 | <activity | 97 | <activity |
| 111 | android:name=".ChooseActivity" | 98 | android:name=".ChooseActivity" |
| 112 | android:screenOrientation="portrait" | 99 | android:screenOrientation="portrait" /> |
| 113 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 114 | <activity | 100 | <activity |
| 115 | android:name=".AddTeacherActivity" | 101 | android:name=".AddTeacherActivity" |
| 116 | android:screenOrientation="portrait" | 102 | android:screenOrientation="portrait" /> |
| 117 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 118 | <activity | 103 | <activity |
| 119 | android:name=".ErrorBookActivity" | 104 | android:name=".ErrorBookActivity" |
| 120 | android:screenOrientation="portrait" | 105 | android:screenOrientation="portrait" /> |
| 121 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 122 | <activity | 106 | <activity |
| 123 | android:name=".ImageActivity" | 107 | android:name=".ImageActivity" |
| 124 | android:screenOrientation="portrait" | 108 | android:screenOrientation="portrait" /> |
| 125 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 126 | <activity | 109 | <activity |
| 127 | android:name=".ImageEditActivity" | 110 | android:name=".ImageEditActivity" |
| 128 | android:screenOrientation="portrait" | 111 | android:screenOrientation="portrait" /> |
| 129 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 130 | <activity | 112 | <activity |
| 131 | android:name=".ImageSelectActivity" | 113 | android:name=".ImageSelectActivity" |
| 132 | android:screenOrientation="portrait" | 114 | android:screenOrientation="portrait" /> |
| 133 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 134 | <activity | 115 | <activity |
| 135 | android:name=".AddSuccessActivity" | 116 | android:name=".AddSuccessActivity" |
| 136 | android:screenOrientation="portrait" | 117 | android:screenOrientation="portrait" /> |
| 137 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 138 | <activity | 118 | <activity |
| 139 | android:name=".ErrorListActivity" | 119 | android:name=".ErrorListActivity" |
| 140 | android:screenOrientation="portrait" | 120 | android:screenOrientation="portrait" /> |
| 141 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 142 | <activity | 121 | <activity |
| 143 | android:name=".ErrorDetailActivity" | 122 | android:name=".ErrorDetailActivity" |
| 144 | android:screenOrientation="portrait" | 123 | android:screenOrientation="portrait" /> |
| 145 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 146 | <activity | 124 | <activity |
| 147 | android:name=".TeacherChooseActivity" | 125 | android:name=".TeacherChooseActivity" |
| 148 | android:screenOrientation="portrait" | 126 | android:screenOrientation="portrait" /> |
| 149 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 150 | <activity | 127 | <activity |
| 151 | android:name=".TeacherMainActivity" | 128 | android:name=".TeacherMainActivity" |
| 152 | android:screenOrientation="portrait" | 129 | android:screenOrientation="portrait" /> |
| 153 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 154 | <activity android:name=".StuHomeworkActivity" /> | 130 | <activity android:name=".StuHomeworkActivity" /> |
| 155 | <activity android:name=".HomeworkDetailActivity" /> | 131 | <activity android:name=".HomeworkDetailActivity" /> |
| 156 | <activity android:name=".HomeworkSelectActivity" /> | 132 | <activity android:name=".HomeworkSelectActivity" /> |
| 157 | <activity android:name=".HomeworkFeedbackActivity" /> | 133 | <activity android:name=".HomeworkFeedbackActivity" /> |
| 158 | <activity android:name=".HomeworkTopicActivity" /> | 134 | <activity android:name=".HomeworkTopicActivity" /> |
| 159 | <activity android:name=".HomeworkShareActivity" /> | 135 | <activity android:name=".HomeworkShareActivity" /> |
| 160 | <activity android:name=".HuyouDetailActivity" /> | 136 | <activity android:name=".HuyouDetailActivity" /> |
| 161 | 137 | ||
| 162 | <provider | 138 | <provider |
| 163 | android:name="androidx.core.content.FileProvider" | 139 | android:name="androidx.core.content.FileProvider" |
| 164 | android:authorities="com.hjx.parent.fileprovider" | 140 | android:authorities="com.hjx.parent.fileprovider" |
| 165 | android:exported="false" | 141 | android:exported="false" |
| 166 | android:grantUriPermissions="true" | 142 | android:grantUriPermissions="true" |
| 167 | tools:replace="android:authorities"> | 143 | tools:replace="android:authorities"> |
| 168 | <meta-data | 144 | <meta-data |
| 169 | android:name="android.support.FILE_PROVIDER_PATHS" | 145 | android:name="android.support.FILE_PROVIDER_PATHS" |
| 170 | android:resource="@xml/file_provider_paths" | 146 | android:resource="@xml/file_provider_paths" |
| 171 | tools:replace="android:resource" /> | 147 | tools:replace="android:resource" /> |
| 172 | </provider> | 148 | </provider> |
| 173 | </application> | 149 | </application> |
| 174 | 150 | ||
| 175 | </manifest> | 151 | </manifest> |
app/src/main/res/layout/dialog_add_homework.xml
| 1 | <FrameLayout | 1 | <FrameLayout |
| 2 | xmlns:android="http://schemas.android.com/apk/res/android" | 2 | xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | xmlns:app="http://schemas.android.com/apk/res-auto" | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
| 4 | xmlns:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
| 5 | android:layout_width="match_parent" | 5 | android:layout_width="match_parent" |
| 6 | android:layout_height="match_parent" | 6 | android:layout_height="match_parent" |
| 7 | tools:ignore="HardcodedText,ContentDescription,UselessParent" > | 7 | tools:ignore="HardcodedText,ContentDescription,UselessParent" > |
| 8 | 8 | ||
| 9 | <LinearLayout | 9 | <LinearLayout |
| 10 | android:orientation="vertical" | 10 | android:orientation="vertical" |
| 11 | android:background="@drawable/shape_radius_top_10" | 11 | android:background="@drawable/shape_radius_top_10" |
| 12 | android:layout_gravity="bottom" | 12 | android:layout_gravity="bottom" |
| 13 | android:layout_width="match_parent" | 13 | android:layout_width="match_parent" |
| 14 | android:layout_height="wrap_content"> | 14 | android:layout_height="wrap_content"> |
| 15 | 15 | ||
| 16 | <FrameLayout | 16 | <FrameLayout |
| 17 | android:layout_marginTop="8dp" | 17 | android:layout_marginTop="8dp" |
| 18 | android:layout_marginBottom="8dp" | 18 | android:layout_marginBottom="8dp" |
| 19 | android:layout_width="match_parent" | 19 | android:layout_width="match_parent" |
| 20 | android:layout_height="wrap_content"> | 20 | android:layout_height="wrap_content"> |
| 21 | 21 | ||
| 22 | <TextView | 22 | <TextView |
| 23 | android:id="@+id/tvTitle" | 23 | android:id="@+id/tvTitle" |
| 24 | android:text="录入作业" | 24 | android:text="录入作业" |
| 25 | android:textSize="17sp" | 25 | android:textSize="17sp" |
| 26 | android:textStyle="bold" | 26 | android:textStyle="bold" |
| 27 | android:layout_gravity="center" | 27 | android:layout_gravity="center" |
| 28 | android:textColor="@color/text_title" | 28 | android:textColor="@color/text_title" |
| 29 | android:layout_width="wrap_content" | 29 | android:layout_width="wrap_content" |
| 30 | android:layout_height="wrap_content" /> | 30 | android:layout_height="wrap_content" /> |
| 31 | 31 | ||
| 32 | <ImageView | 32 | <ImageView |
| 33 | android:id="@+id/btnClose" | 33 | android:id="@+id/btnClose" |
| 34 | android:padding="12dp" | 34 | android:padding="12dp" |
| 35 | android:src="@mipmap/ic_close" | 35 | android:src="@mipmap/ic_close" |
| 36 | android:layout_gravity="end|center_vertical" | 36 | android:layout_gravity="end|center_vertical" |
| 37 | android:layout_width="35dp" | 37 | android:layout_width="35dp" |
| 38 | android:layout_height="35dp" /> | 38 | android:layout_height="35dp" /> |
| 39 | </FrameLayout> | 39 | </FrameLayout> |
| 40 | 40 | ||
| 41 | <androidx.core.widget.NestedScrollView | 41 | <androidx.core.widget.NestedScrollView |
| 42 | android:layout_width="match_parent" | 42 | android:layout_width="match_parent" |
| 43 | android:layout_height="match_parent"> | 43 | android:layout_height="match_parent"> |
| 44 | <LinearLayout | 44 | <LinearLayout |
| 45 | android:orientation="vertical" | 45 | android:orientation="vertical" |
| 46 | android:layout_marginTop="-20dp" | 46 | android:layout_marginTop="-20dp" |
| 47 | android:layout_width="match_parent" | 47 | android:layout_width="match_parent" |
| 48 | android:layout_height="wrap_content"> | 48 | android:layout_height="wrap_content"> |
| 49 | 49 | ||
| 50 | <TextView | 50 | <TextView |
| 51 | android:id="@+id/tvStu" | 51 | android:id="@+id/tvStu" |
| 52 | android:layout_marginTop="20dp" | 52 | android:layout_marginTop="20dp" |
| 53 | android:layout_width="wrap_content" | 53 | android:layout_width="wrap_content" |
| 54 | android:layout_height="wrap_content" | 54 | android:layout_height="wrap_content" |
| 55 | android:layout_marginHorizontal="15dp" | 55 | android:layout_marginHorizontal="15dp" |
| 56 | android:text="学生" | 56 | android:text="学生" |
| 57 | android:textColor="@color/text_title" | 57 | android:textColor="@color/text_title" |
| 58 | android:textSize="14sp" | 58 | android:textSize="14sp" |
| 59 | android:textStyle="bold" /> | 59 | android:textStyle="bold" /> |
| 60 | 60 | ||
| 61 | <androidx.appcompat.widget.AppCompatSpinner | 61 | <androidx.appcompat.widget.AppCompatSpinner |
| 62 | android:id="@+id/spStudent" | 62 | android:id="@+id/spStudent" |
| 63 | style="@style/customSpinnerStyle" | 63 | style="@style/customSpinnerStyle" |
| 64 | android:layout_width="match_parent" | 64 | android:layout_width="match_parent" |
| 65 | android:layout_height="40dp" | 65 | android:layout_height="40dp" |
| 66 | android:layout_marginTop="10dp" | 66 | android:layout_marginTop="10dp" |
| 67 | android:layout_marginHorizontal="15dp" | 67 | android:layout_marginHorizontal="15dp" |
| 68 | android:background="@drawable/selector_for_input_spinner" | 68 | android:background="@drawable/selector_for_input_spinner" |
| 69 | android:popupBackground="@drawable/shape_for_input_spinner" | 69 | android:popupBackground="@drawable/shape_for_input_spinner" |
| 70 | android:scrollbars="none" /> | 70 | android:scrollbars="none" /> |
| 71 | 71 | ||
| 72 | <TextView | 72 | <TextView |
| 73 | android:layout_width="wrap_content" | 73 | android:layout_width="wrap_content" |
| 74 | android:layout_height="wrap_content" | 74 | android:layout_height="wrap_content" |
| 75 | android:layout_marginHorizontal="15dp" | 75 | android:layout_marginHorizontal="15dp" |
| 76 | android:layout_marginTop="20dp" | 76 | android:layout_marginTop="20dp" |
| 77 | android:text="年级" | 77 | android:text="年级" |
| 78 | android:textColor="@color/text_title" | 78 | android:textColor="@color/text_title" |
| 79 | android:textSize="14sp" | 79 | android:textSize="14sp" |
| 80 | android:textStyle="bold" /> | 80 | android:textStyle="bold" /> |
| 81 | 81 | ||
| 82 | <androidx.appcompat.widget.AppCompatSpinner | 82 | <androidx.appcompat.widget.AppCompatSpinner |
| 83 | android:id="@+id/spGrade" | 83 | android:id="@+id/spGrade" |
| 84 | style="@style/customSpinnerStyle" | 84 | style="@style/customSpinnerStyle" |
| 85 | android:layout_width="match_parent" | 85 | android:layout_width="match_parent" |
| 86 | android:layout_height="40dp" | 86 | android:layout_height="40dp" |
| 87 | android:layout_marginTop="10dp" | 87 | android:layout_marginTop="10dp" |
| 88 | android:layout_marginHorizontal="15dp" | 88 | android:layout_marginHorizontal="15dp" |
| 89 | android:background="@drawable/selector_for_input_spinner" | 89 | android:background="@drawable/selector_for_input_spinner" |
| 90 | android:popupBackground="@drawable/shape_for_input_spinner" | 90 | android:popupBackground="@drawable/shape_for_input_spinner" |
| 91 | android:scrollbars="none" /> | 91 | android:scrollbars="none" /> |
| 92 | 92 | ||
| 93 | <TextView | 93 | <TextView |
| 94 | android:layout_width="wrap_content" | 94 | android:layout_width="wrap_content" |
| 95 | android:layout_height="wrap_content" | 95 | android:layout_height="wrap_content" |
| 96 | android:layout_marginHorizontal="15dp" | 96 | android:layout_marginHorizontal="15dp" |
| 97 | android:layout_marginTop="20dp" | 97 | android:layout_marginTop="20dp" |
| 98 | android:text="学期" | 98 | android:text="学期" |
| 99 | android:textColor="@color/text_title" | 99 | android:textColor="@color/text_title" |
| 100 | android:textSize="14sp" | 100 | android:textSize="14sp" |
| 101 | android:textStyle="bold" /> | 101 | android:textStyle="bold" /> |
| 102 | 102 | ||
| 103 | <androidx.appcompat.widget.AppCompatSpinner | 103 | <androidx.appcompat.widget.AppCompatSpinner |
| 104 | android:id="@+id/spTerm" | 104 | android:id="@+id/spTerm" |
| 105 | style="@style/customSpinnerStyle" | 105 | style="@style/customSpinnerStyle" |
| 106 | android:layout_width="match_parent" | 106 | android:layout_width="match_parent" |
| 107 | android:layout_height="40dp" | 107 | android:layout_height="40dp" |
| 108 | android:layout_marginTop="10dp" | 108 | android:layout_marginTop="10dp" |
| 109 | android:layout_marginHorizontal="15dp" | 109 | android:layout_marginHorizontal="15dp" |
| 110 | android:background="@drawable/selector_for_input_spinner" | 110 | android:background="@drawable/selector_for_input_spinner" |
| 111 | android:entries="@array/grade_array" | 111 | android:entries="@array/grade_array" |
| 112 | android:popupBackground="@drawable/shape_for_input_spinner" | 112 | android:popupBackground="@drawable/shape_for_input_spinner" |
| 113 | android:scrollbars="none" /> | 113 | android:scrollbars="none" /> |
| 114 | 114 | ||
| 115 | <TextView | 115 | <TextView |
| 116 | android:layout_width="wrap_content" | 116 | android:layout_width="wrap_content" |
| 117 | android:layout_height="wrap_content" | 117 | android:layout_height="wrap_content" |
| 118 | android:layout_marginHorizontal="15dp" | 118 | android:layout_marginHorizontal="15dp" |
| 119 | android:layout_marginTop="20dp" | 119 | android:layout_marginTop="20dp" |
| 120 | android:text="科目" | 120 | android:text="科目" |
| 121 | android:textColor="@color/text_title" | 121 | android:textColor="@color/text_title" |
| 122 | android:textSize="14sp" | 122 | android:textSize="14sp" |
| 123 | android:textStyle="bold" /> | 123 | android:textStyle="bold" /> |
| 124 | 124 | ||
| 125 | <androidx.appcompat.widget.AppCompatSpinner | 125 | <androidx.appcompat.widget.AppCompatSpinner |
| 126 | android:id="@+id/spSubject" | 126 | android:id="@+id/spSubject" |
| 127 | style="@style/customSpinnerStyle" | 127 | style="@style/customSpinnerStyle" |
| 128 | android:layout_width="match_parent" | 128 | android:layout_width="match_parent" |
| 129 | android:layout_height="40dp" | 129 | android:layout_height="40dp" |
| 130 | android:layout_marginTop="10dp" | 130 | android:layout_marginTop="10dp" |
| 131 | android:layout_marginHorizontal="15dp" | 131 | android:layout_marginHorizontal="15dp" |
| 132 | android:background="@drawable/selector_for_input_spinner" | 132 | android:background="@drawable/selector_for_input_spinner" |
| 133 | android:popupBackground="@drawable/shape_for_input_spinner" | 133 | android:popupBackground="@drawable/shape_for_input_spinner" |
| 134 | android:scrollbars="none" /> | 134 | android:scrollbars="none" /> |
| 135 | 135 | ||
| 136 | <TextView | 136 | <TextView |
| 137 | android:layout_width="wrap_content" | 137 | android:layout_width="wrap_content" |
| 138 | android:layout_height="wrap_content" | 138 | android:layout_height="wrap_content" |
| 139 | android:layout_marginHorizontal="15dp" | 139 | android:layout_marginHorizontal="15dp" |
| 140 | android:layout_marginTop="20dp" | 140 | android:layout_marginTop="20dp" |
| 141 | android:text="日期" | 141 | android:text="日期" |
| 142 | android:textColor="@color/text_title" | 142 | android:textColor="@color/text_title" |
| 143 | android:textSize="14sp" | 143 | android:textSize="14sp" |
| 144 | android:textStyle="bold" /> | 144 | android:textStyle="bold" /> |
| 145 | 145 | ||
| 146 | <TextView | 146 | <TextView |
| 147 | android:id="@+id/tvDate" | 147 | android:id="@+id/tvDate" |
| 148 | tools:text="2024-09-18" | 148 | tools:text="2024-09-18" |
| 149 | android:textSize="16sp" | 149 | android:textSize="13sp" |
| 150 | android:textColor="#333" | 150 | android:textColor="#333" |
| 151 | android:gravity="center_vertical" | 151 | android:gravity="center_vertical" |
| 152 | android:paddingHorizontal="16dp" | 152 | android:paddingHorizontal="16dp" |
| 153 | android:layout_width="match_parent" | 153 | android:layout_width="match_parent" |
| 154 | android:layout_height="40dp" | 154 | android:layout_height="40dp" |
| 155 | android:layout_marginTop="10dp" | 155 | android:layout_marginTop="10dp" |
| 156 | android:layout_marginHorizontal="15dp" | 156 | android:layout_marginHorizontal="15dp" |
| 157 | android:background="@drawable/selector_for_input_spinner" /> | 157 | android:background="@drawable/selector_for_input_spinner" /> |
| 158 | 158 | ||
| 159 | <TextView | 159 | <TextView |
| 160 | android:layout_width="wrap_content" | 160 | android:layout_width="wrap_content" |
| 161 | android:layout_height="wrap_content" | 161 | android:layout_height="wrap_content" |
| 162 | android:layout_marginHorizontal="15dp" | 162 | android:layout_marginHorizontal="15dp" |
| 163 | android:layout_marginTop="20dp" | 163 | android:layout_marginTop="20dp" |
| 164 | android:text="作业名称" | 164 | android:text="作业名称" |
| 165 | android:textColor="@color/text_title" | 165 | android:textColor="@color/text_title" |
| 166 | android:textSize="14sp" | 166 | android:textSize="14sp" |
| 167 | android:textStyle="bold" /> | 167 | android:textStyle="bold" /> |
| 168 | 168 | ||
| 169 | <EditText | 169 | <EditText |
| 170 | android:id="@+id/etName" | 170 | android:id="@+id/etName" |
| 171 | android:layout_width="match_parent" | 171 | android:layout_width="match_parent" |
| 172 | android:layout_height="40dp" | 172 | android:layout_height="40dp" |
| 173 | android:layout_marginTop="10dp" | 173 | android:layout_marginTop="10dp" |
| 174 | android:layout_marginHorizontal="15dp" | 174 | android:layout_marginHorizontal="15dp" |
| 175 | android:background="@drawable/shape_for_input_spinner" | 175 | android:background="@drawable/shape_for_input_spinner" |
| 176 | android:fillViewport="true" | 176 | android:fillViewport="true" |
| 177 | android:gravity="center_vertical" | 177 | android:gravity="center_vertical" |
| 178 | android:maxLength="50" | 178 | android:maxLength="50" |
| 179 | android:paddingHorizontal="16dp" | 179 | android:paddingHorizontal="16dp" |
| 180 | android:textColor="@color/text_title" | 180 | android:textColor="@color/text_title" |
| 181 | android:textSize="13sp" | 181 | android:textSize="13sp" |
| 182 | android:inputType="text" | 182 | android:inputType="text" |
| 183 | tools:ignore="Autofill,LabelFor" /> | 183 | tools:ignore="Autofill,LabelFor" /> |
| 184 | 184 | ||
| 185 | <TextView | 185 | <TextView |
| 186 | android:id="@+id/btnConfirm" | 186 | android:id="@+id/btnConfirm" |
| 187 | android:text="确认录入" | 187 | android:text="确认录入" |
| 188 | android:gravity="center" | 188 | android:gravity="center" |
| 189 | android:textSize="16sp" | 189 | android:textSize="16sp" |
| 190 | android:textColor="@color/white" | 190 | android:textColor="@color/white" |
| 191 | android:background="@drawable/shape_radius_5" | 191 | android:background="@drawable/shape_radius_5" |
| 192 | android:backgroundTint="#1C90F3" | 192 | android:backgroundTint="#1C90F3" |
| 193 | android:layout_gravity="center_horizontal" | 193 | android:layout_gravity="center_horizontal" |
| 194 | android:layout_marginVertical="24dp" | 194 | android:layout_marginVertical="24dp" |
| 195 | android:layout_width="224dp" | 195 | android:layout_width="224dp" |
| 196 | android:layout_height="36dp"/> | 196 | android:layout_height="36dp"/> |
| 197 | </LinearLayout> | 197 | </LinearLayout> |
| 198 | </androidx.core.widget.NestedScrollView> | 198 | </androidx.core.widget.NestedScrollView> |
| 199 | 199 | ||
| 200 | </LinearLayout> | 200 | </LinearLayout> |
| 201 | </FrameLayout> | 201 | </FrameLayout> |
app/src/main/res/values/styles.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <resources> | 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 | <item name="android:windowBackground">@drawable/welcome_bg</item> | 14 | <item name="android:windowBackground">@drawable/welcome_bg</item> |
| 7 | <item name="colorPrimaryDark">@android:color/transparent</item> | 15 | <item name="colorPrimaryDark">@android:color/transparent</item> |
| 8 | <item name="windowActionBar">false</item> | 16 | <item name="windowActionBar">false</item> |
| 9 | <item name="windowNoTitle">true</item> | 17 | <item name="windowNoTitle">true</item> |
| 10 | <item name="android:windowFullscreen">true</item> | 18 | <item name="android:windowFullscreen">true</item> |
| 11 | </style> | 19 | </style> |
| 12 | 20 | ||
| 13 | <style name="main_bottom_navigaton_menu_item"> | 21 | <style name="main_bottom_navigaton_menu_item"> |
| 14 | <item name="android:layout_width">0dp</item> | 22 | <item name="android:layout_width">0dp</item> |
| 15 | <item name="android:layout_weight">1</item> | 23 | <item name="android:layout_weight">1</item> |
| 16 | <item name="android:layout_height">match_parent</item> | 24 | <item name="android:layout_height">match_parent</item> |
| 17 | <item name="android:background">@android:color/transparent</item> | 25 | <item name="android:background">@android:color/transparent</item> |
| 18 | <item name="android:button">@null</item> | 26 | <item name="android:button">@null</item> |
| 19 | <item name="android:gravity">center</item> | 27 | <item name="android:gravity">center</item> |
| 20 | <item name="android:textSize">11dp</item> | 28 | <item name="android:textSize">11dp</item> |
| 21 | <item name="android:drawablePadding">2dp</item> | 29 | <item name="android:drawablePadding">2dp</item> |
| 22 | </style> | 30 | </style> |
| 23 | <!--实现BottomSheetDialog圆角效果--> | 31 | <!--实现BottomSheetDialog圆角效果--> |
| 24 | <style name="BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog"> | 32 | <style name="BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog"> |
| 25 | <item name="bottomSheetStyle">@style/bottomSheetStyleWrapper</item> | 33 | <item name="bottomSheetStyle">@style/bottomSheetStyleWrapper</item> |
| 26 | </style> | 34 | </style> |
| 27 | 35 | ||
| 28 | <style name="bottomSheetStyleWrapper" parent="Widget.Design.BottomSheet.Modal"> | 36 | <style name="bottomSheetStyleWrapper" parent="Widget.Design.BottomSheet.Modal"> |
| 29 | <item name="android:background">@android:color/transparent</item> | 37 | <item name="android:background">@android:color/transparent</item> |
| 30 | <item name="android:navigationBarColor">@android:color/transparent</item> | 38 | <item name="android:navigationBarColor">@android:color/transparent</item> |
| 31 | <item name="behavior_peekHeight">500dp</item> | 39 | <item name="behavior_peekHeight">500dp</item> |
| 32 | </style> | 40 | </style> |
| 33 | 41 | ||
| 34 | <style name="MyAlertDialog" parent="android:Theme.Material.Dialog.Alert"> | 42 | <style name="MyAlertDialog" parent="android:Theme.Material.Dialog.Alert"> |
| 35 | <!--背景颜色及和透明程度--> | 43 | <!--背景颜色及和透明程度--> |
| 36 | <item name="android:windowBackground">@null</item> | 44 | <item name="android:windowBackground">@null</item> |
| 37 | <!--是否去除标题 --> | 45 | <!--是否去除标题 --> |
| 38 | <item name="android:windowNoTitle">true</item> | 46 | <item name="android:windowNoTitle">true</item> |
| 39 | <!--是否去除边框--> | 47 | <!--是否去除边框--> |
| 40 | <item name="android:windowFrame">@null</item> | 48 | <item name="android:windowFrame">@null</item> |
| 41 | <!--是否浮现在activity之上--> | 49 | <!--是否浮现在activity之上--> |
| 42 | <item name="android:windowIsFloating">true</item> | 50 | <item name="android:windowIsFloating">true</item> |
| 43 | <!--是否模糊--> | 51 | <!--是否模糊--> |
| 44 | <item name="android:backgroundDimEnabled">true</item> | 52 | <item name="android:backgroundDimEnabled">true</item> |
| 45 | <item name="android:windowIsTranslucent">true</item><!--半透明--> | 53 | <item name="android:windowIsTranslucent">true</item><!--半透明--> |
| 46 | <item name="android:windowSoftInputMode">stateVisible|adjustPan</item> | 54 | <item name="android:windowSoftInputMode">stateVisible|adjustPan</item> |
| 47 | </style> | 55 | </style> |
| 48 | 56 | ||
| 49 | <style name="customSpinnerStyle" parent="android:Widget.ListView.DropDown"> | 57 | <style name="customSpinnerStyle" parent="android:Widget.ListView.DropDown"> |
| 50 | <item name="divider">@color/border</item> | 58 | <item name="divider">@color/border</item> |
| 51 | <item name="android:scrollbars">none</item> | 59 | <item name="android:scrollbars">none</item> |
| 52 | <item name="android:dividerHeight">1dp</item> | 60 | <item name="android:dividerHeight">1dp</item> |
| 53 | <item name="android:textSize">15sp</item> | 61 | <item name="android:textSize">13sp</item> |
| 54 | </style> | 62 | </style> |
| 55 | 63 | ||
| 56 | <style name="empty_space"> | 64 | <style name="empty_space"> |
| 57 | <item name="android:layout_width">0dp</item> | 65 | <item name="android:layout_width">0dp</item> |
| 58 | <item name="android:layout_height">0dp</item> | 66 | <item name="android:layout_height">0dp</item> |
| 59 | <item name="android:layout_weight">1</item> | 67 | <item name="android:layout_weight">1</item> |
| 60 | </style> | 68 | </style> |
| 61 | 69 | ||
| 62 | 70 | ||
| 63 | <style name="BaseDialog"> | 71 | <style name="BaseDialog"> |
| 64 | <item name="android:background">@android:color/transparent</item> | 72 | <item name="android:background">@android:color/transparent</item> |
| 65 | <item name="android:windowBackground">@android:color/transparent</item> | 73 | <item name="android:windowBackground">@android:color/transparent</item> |
| 66 | <item name="android:windowIsFloating">true</item> | 74 | <item name="android:windowIsFloating">true</item> |
| 67 | </style> | 75 | </style> |
| 68 | 76 | ||
| 69 | <style name="BaseDialog.FullScreen"> | 77 | <style name="BaseDialog.FullScreen"> |
| 70 | <item name="android:windowFullscreen">true</item> | 78 | <item name="android:windowFullscreen">true</item> |
| 71 | <item name="android:windowIsTranslucent">true</item> | 79 | <item name="android:windowIsTranslucent">true</item> |
| 72 | <item name="android:statusBarColor">@android:color/transparent</item> | 80 | <item name="android:statusBarColor">@android:color/transparent</item> |
| 73 | </style> | 81 | </style> |
| 74 | 82 | ||
| 75 | <style name="tv_StudentHomeworkFilter"> | 83 | <style name="tv_StudentHomeworkFilter"> |
| 76 | <item name="android:textSize">13sp</item> | 84 | <item name="android:textSize">13sp</item> |
| 77 | <item name="android:textColor">@color/color_filter_state</item> | 85 | <item name="android:textColor">@color/color_filter_state</item> |
| 78 | <item name="android:drawableTint">@color/color_filter_state</item> | 86 | <item name="android:drawableTint">@color/color_filter_state</item> |
| 79 | <item name="android:drawableEnd">@drawable/svg_filter_drop_down</item> | 87 | <item name="android:drawableEnd">@drawable/svg_filter_drop_down</item> |
| 80 | <item name="android:drawablePadding">8dp</item> | 88 | <item name="android:drawablePadding">8dp</item> |
| 81 | <item name="android:layout_width">wrap_content</item> | 89 | <item name="android:layout_width">wrap_content</item> |
| 82 | <item name="android:layout_height">wrap_content</item> | 90 | <item name="android:layout_height">wrap_content</item> |
| 83 | </style> | 91 | </style> |
| 84 | 92 | ||
| 85 | <style name="chk_HomeworkFilterItem"> | 93 | <style name="chk_HomeworkFilterItem"> |
| 86 | <item name="android:textSize">13sp</item> | 94 | <item name="android:textSize">13sp</item> |
| 87 | <item name="android:textColor">@color/color_filter_item</item> | 95 | <item name="android:textColor">@color/color_filter_item</item> |
| 88 | <item name="android:gravity">center</item> | 96 | <item name="android:gravity">center</item> |
| 89 | <item name="android:button">@null</item> | 97 | <item name="android:button">@null</item> |
| 90 | <item name="android:background">@drawable/btn_homework_filter_item</item> | 98 | <item name="android:background">@drawable/btn_homework_filter_item</item> |
| 91 | <item name="android:layout_margin">8dp</item> | 99 | <item name="android:layout_margin">8dp</item> |
| 92 | <item name="android:layout_weight">1</item> | 100 | <item name="android:layout_weight">1</item> |
| 93 | <item name="android:layout_width">0dp</item> | 101 | <item name="android:layout_width">0dp</item> |
| 94 | <item name="android:layout_height">26dp</item> | 102 | <item name="android:layout_height">26dp</item> |
| 95 | </style> | 103 | </style> |
| 96 | 104 | ||
| 97 | </resources> | 105 | </resources> |