[new] new project

This commit is contained in:
2026-09-20 13:33:09 +08:00
commit ca6a52fb2d
997 changed files with 140250 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
.gradle/
.kotlin/
**/build/
!src/**/build/
local.properties
*.log
captures/
.externalNativeBuild/
.cxx/
*.aab
*.apk
output-metadata.json
*.hprof
*.dm
*.jks
*.keystore
google-services.json
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml
.DS_Store
xcuserdata/
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
**/xcshareddata/WorkspaceSettings.xcsettings
node_modules/
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Copyright (C) 2025 XingHeYuZhuan
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+124
View File
@@ -0,0 +1,124 @@
<div align="center">
# 拾光课程表
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/XingHeYuZhuan/shiguangschedule/total) ![GitHub License](https://img.shields.io/github/license/XingHeYuZhuan/shiguangschedule) ![GitHub Repo stars](https://img.shields.io/github/stars/XingHeYuZhuan/shiguangschedule)
<a href="https://hellogithub.com/repository/XingHeYuZhuan/shiguangschedule" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=9f09baa3931a4f79940100829d4d0ca4&claim_uid=TRP24EpKZ5sx68l&theme=neutral" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
<a href="https://trendshift.io/repositories/45835?utm_source=trendshift-badge&amp;utm_medium=badge&amp;utm_campaign=badge-trendshift-45835" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/45835/daily?language=Kotlin" alt="XingHeYuZhuan%2Fshiguangschedule | Trendshift" width="250" height="55"/></a>
#### 与我们交流和讨论 ![](https://img.shields.io/badge/QQ_频道-pd68794181-blue)
本仓库为拾光课程表(shiguangschedule)项目的主仓库,包含软件的全部源代码及相关资源。项目采用开源模式,欢迎社区开发者参与贡献和适配。
</div>
## 预览图
| 周课表页面(支持长按调整课程块位置或者高度) | 课表页面个性化配置(深色模式演示) | 小组件选择 |
| :---: | :---: | :---: |
| ![图片1](/picture/Screenshot_1.png) | ![图片2](/picture/Screenshot_2.png) | ![图片3](/picture/Screenshot_3.png) |
## 项目定位
拾光课程表是一款面向中国高校师生的课程表管理工具,支持通过适配脚本导入各类教务系统课程数据,方便用户高效管理个人课表。项目注重开放性和可扩展性,鼓励社区开发者参与适配和功能完善。
## 关于项目版本
> [!WARNING]
> 从**2.x**版本开始项目已迁移到Compose Multiplatform多平台框架
> 不再区分正式版本和开发者版本,开发者功能通过在**更多**页面点击应用图标**5次**启用
> - Android:支持Android 8.0 +的系统版本
> - 其他平台适配正在开发中
## 功能介绍
### 主页面
- 今日课表
> 顾名思义就是看当天的课程
- 课表
> 显示一周的课程,左右滑动可以切换周次,点击顶部周次标题会弹出底部选择器用于快速跳转周次(会标记当前日期所在周)
- 我的
> 也就是设置页面,这里放置所有的配置项
#### 深色适配
- 目前软件所有可以实现深色适配的位置都已全部实现深色适配
- 小组件也拥有深色适配
#### 课表配置
- 支持时间列表与课表绑定,切换不同的课表自动改变时间
- 课表支持独立定义,一周的起始日是周一还是周日
#### 小组件
- 多种功能小组件任其选择
> [全部小组件预览图](/picture/all_widget.png)。
- 小组件支持明日预告
> 超小小组件不支持明日预告,因为只有2x1的尺寸,设计上是用来展示最近一节课的消息
#### 全局课程管理
- 独立的课程管理页面将所有课程以最直接的方式全局显示出来,支持快速添加以及修改
#### 课表页面个性化配置
- 支持自定义背景图片
- 支持调整课表格子高度、圆角、间距及透明度
- 支持自定义课程块颜色
- 支持调整课程块内容样式
- 更多功能等你去发现...
#### 课程导入与导出
- json文件导入与导出,方便课表备份
- 通用ics文件导出,支持多种设备以及平台的日程导入
- 在支持的设备上支持同步日历日程账户
- 支持WebDAV云备份和同步
- 教务导入,开源适配仓库开发者深度适配学校作息时间,一键导入
> 识别课程与对应作息时间是适配的基础功能,更高级的自动配置开学日期等 与开发者是否适配学校可能拥有的接口有关
#### 课程提醒相关
- 课程提醒与上课自动化开启勿扰或者静音
- 获取整年节假日数据防止节假日课程打扰
#### 语言支持
- 简体中文
- 繁体中文
- 英语
-----
## 如何参与
1. Fork 本仓库,提交你的改进或教务适配使用的可调用组件。
2. 提交 Pull Request,等待审核合并(main分支已经开启分支保护,提交需要提交到dev分支)。
3. 如有问题或建议,欢迎在 GitHub 提交 Issue 或加入社区讨论。
## 相关链接
- 项目主页:[https://github.com/XingHeYuZhuan/shiguangschedule](https://github.com/XingHeYuZhuan/shiguangschedule)
- 适配脚本仓库:[https://github.com/XingHeYuZhuan/shiguang_warehouse](https://github.com/XingHeYuZhuan/shiguang_warehouse)
- 查看如何适配,Wiki:[https://github.com/XingHeYuZhuan/shiguangschedule/wiki](https://github.com/XingHeYuZhuan/shiguangschedule/wiki)
- 浏览器测试插件:[https://github.com/XingHeYuZhuan/shiguang_Tester](https://github.com/XingHeYuZhuan/shiguang_Tester)
- ###### 由[@Jursin](https://github.com/Jursin)主导并维护的网站:[https://sgschedule.jursin.top/](https://sgschedule.jursin.top/)
---
如有问题或建议,欢迎提交 Issue 或 PR。
## 贡献
欢迎任何人提交你的贡献
### 教务适配贡献
<a href="https://github.com/XingHeYuZhuan/shiguang_warehouse/graphs/contributors">
<img src="https://contrib.rocks/image?repo=XingHeYuZhuan/shiguang_warehouse" />
</a>
### 软件开发贡献
<a href="https://github.com/XingHeYuZhuan/shiguangschedule/graphs/contributors">
<img src="https://contrib.rocks/image?repo=XingHeYuZhuan/shiguangschedule" />
</a>
## Star 历史
<a href="https://www.star-history.com/?repos=XingHeYuZhuan%2Fshiguangschedule&type=timeline&legend=top-left">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=XingHeYuZhuan/shiguangschedule&type=timeline&theme=dark&legend=top-left" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=XingHeYuZhuan/shiguangschedule&type=timeline&legend=top-left" />
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=XingHeYuZhuan/shiguangschedule&type=timeline&legend=top-left" />
</picture>
</a>
+2
View File
@@ -0,0 +1,2 @@
/build
/release/
@@ -0,0 +1,108 @@
import com.android.build.api.variant.FilterConfiguration
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.koin.compiler)
}
kotlin {
jvmToolchain(21)
}
android {
namespace = "com.xingheyuzhuan.shiguangschedule"
compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig {
applicationId = "com.xingheyuzhuan.shiguangschedule"
minSdk = libs.versions.android.minSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
versionCode = 34
versionName = "2.0.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("debug")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
splits {
abi {
isEnable = true
exclude("mips", "mips64", "armeabi", "riscv64", "x86")
isUniversalApk = false
include("armeabi-v7a", "arm64-v8a", "x86_64")
}
}
buildFeatures {
compose = true
buildConfig = true
}
androidResources {
generateLocaleConfig = true
localeFilters += listOf("zh", "zh-rCN", "zh-rTW", "en")
}
}
dependencies {
implementation(project(":shared"))
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.work.runtime.ktx)
implementation(libs.compose.ui)
implementation(libs.compose.foundation)
implementation(libs.compose.material3)
implementation(libs.compose.animation)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.compose.components.resources)
implementation(libs.androidx.datastore.core)
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.datetime)
implementation(platform(libs.koin.bom))
implementation(libs.koin.core)
implementation(libs.koin.android)
implementation(libs.koin.androidx.workmanager)
implementation(libs.koin.compose)
implementation(libs.koin.compose.viewmodel)
implementation(libs.koin.annotations)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
debugImplementation(libs.compose.ui.tooling)
}
androidComponents {
onVariants { variant ->
val buildType = variant.buildType ?: ""
val versionName = android.defaultConfig.versionName ?: ""
variant.outputs.forEach { output ->
val abiFilter = output.filters.find {
it.filterType == FilterConfiguration.FilterType.ABI
}?.identifier ?: "universal"
// 动态设置输出的 APK 文件名
output.outputFileName.set("shiguangschedule-v${versionName}-${abiFilter}-${buildType}.apk")
}
}
}
+70
View File
@@ -0,0 +1,70 @@
# -------------------------------------------------------------------------
# R8/ProGuard 混淆配置文件
# -------------------------------------------------------------------------
# 基础全局设置 ---
-keepattributes SourceFile,LineNumberTable,Signature,InnerClasses,EnclosingMethod,AnnotationDefault,*Annotation*
# 依赖注入 (Koin) ---
# 保留 Koin 核心类及 DSL 相关
-keep class org.koin.** { *; }
# 保留 Koin Annotations 及其生成的模块 (KSP 路径)
-keep class org.koin.ksp.generated.** { *; }
-keep @org.koin.core.annotation.Module class * { *; }
# 确保 Koin 能够调用被注解类的构造函数进行依赖注入
-keepclassmembers class * {
@org.koin.core.annotation.Single <init>(...);
@org.koin.core.annotation.Factory <init>(...);
@org.koin.core.annotation.KoinViewModel <init>(...);
@org.koin.core.annotation.Named <init>(...);
}
# 原生组件与 WorkManager
-keep public class * extends android.appwidget.AppWidgetProvider {
public void *(android.content.Context, android.content.Intent);
<init>();
}
-keep class com.xingheyuzhuan.shiguangschedule.widget.** { *; }
-keep class * extends androidx.work.ListenableWorker {
public <init>(android.content.Context, androidx.work.WorkerParameters);
}
# 网络库 (Ktor)
-dontwarn io.ktor.**
# 日志与极致优化
-keep class org.slf4j.impl.** { *; }
# 移除 Android 系统调试日志 (v/d/i/w)
-assumenosideeffects class android.util.Log {
public static int v(...);
public static int d(...);
public static int i(...);
public static int w(...);
}
# 数据解析 (Kotlinx Serialization & Wire Protobuf) ---
-keep class kotlin.Metadata { *; }
-keep @kotlinx.serialization.Serializable class * { ** Companion; }
-keepclassmembers class * { *** write$Self(...); <init>(int, ...); }
-keep class **$$serializer { *; }
-keep class * implements com.squareup.wire.Message {
<fields>;
<methods>;
}
-keep class * implements com.squareup.wire.WireEnum { *; }
-keepclassmembers class * implements com.squareup.wire.Message {
public static *** ADAPTER;
}
-keep class * extends com.squareup.wire.ProtoAdapter { *; }
# 数据模型与数据库
-dontwarn androidx.sqlite.**
-keep class androidx.sqlite.** { *; }
-keep class com.xingheyuzhuan.shiguangschedule.shared.** { *; }
-keep class com.xingheyuzhuan.shiguangschedule.data.db.** { *; }
-keep class com.xingheyuzhuan.shiguangschedule.data.model.** { *; }
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.POST_PROMOTED_NOTIFICATIONS" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:networkSecurityConfig="@xml/network_security_config"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.shiguangschedule"
tools:targetApi="33"
android:enableOnBackInvokedCallback="true">
<service
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
android:enabled="false"
android:exported="false">
<meta-data
android:name="autoStoreLocales"
android:value="true" />
</service>
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/Theme.shiguangschedule">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name=".service.CourseAlarmReceiver"
android:enabled="true"
android:exported="false" />
<receiver
android:name=".widget.tiny.TinyNativeProvider"
android:label="@string/widget_name_tiny"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/shiguangschedule_tiny_widget" />
</receiver>
<receiver
android:name=".widget.compact.CompactNativeProvider"
android:label="@string/widget_name_compact"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/shiguangschedule_compact_widget" />
</receiver>
<receiver
android:name=".widget.double_days.DoubleDaysNativeProvider"
android:label="@string/widget_name_double_days"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/shiguangschedule_double_days_widget" />
</receiver>
<receiver
android:name=".widget.list_vertical.ListVerticalNativeProvider"
android:exported="false"
android:label="@string/widget_name_list_vertical">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/shiguangschedule_list_vertical_widget" />
</receiver>
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
tools:node="remove" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

@@ -0,0 +1,18 @@
package com.xingheyuzhuan.shiguangschedule
import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
setContent {
App()
}
}
}
@@ -0,0 +1,37 @@
package com.xingheyuzhuan.shiguangschedule
import android.app.Application
import androidx.work.Configuration
import com.xingheyuzhuan.shiguangschedule.data.di.SharedModule
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.androidx.workmanager.koin.workManagerFactory
import org.koin.core.annotation.ComponentScan
import org.koin.core.annotation.KoinApplication
import org.koin.core.annotation.Module
import org.koin.plugin.module.dsl.startKoin
@Module(includes = [
SharedModule::class
])
@ComponentScan("com.xingheyuzhuan.shiguangschedule")
class AppModule
@KoinApplication(modules = [AppModule::class])
class ScheduleAppConfig
class MyApplication : Application(), Configuration.Provider {
override val workManagerConfiguration: Configuration
get() = Configuration.Builder().build()
override fun onCreate() {
super.onCreate()
startKoin<ScheduleAppConfig> {
androidLogger()
androidContext(this@MyApplication)
workManagerFactory()
}
}
}
@@ -0,0 +1,62 @@
package com.xingheyuzhuan.shiguangschedule.data.sync
import android.content.Context
import android.util.Log
import androidx.work.ExistingWorkPolicy
import androidx.work.OneTimeWorkRequestBuilder
import androidx.work.WorkManager
import com.xingheyuzhuan.shiguangschedule.data.repository.StyleSettingsRepository
import com.xingheyuzhuan.shiguangschedule.service.CourseNotificationWorker
import com.xingheyuzhuan.shiguangschedule.service.DndSchedulerWorker
import com.xingheyuzhuan.shiguangschedule.widget.updateAllWidgets
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import org.koin.core.annotation.Single
/**
* 平台层同步管理器(Android 端)。
* 仅负责响应共享层 (KMP) 的同步完成信号与 Android 本地样式更新,执行系统 Widget 刷新及 WorkManager 调度。
*/
@Single(createdAtStart = true)
class SyncManager(
private val appContext: Context,
private val widgetDataSynchronizer: WidgetDataSynchronizer,
private val styleSettingsRepository: StyleSettingsRepository
) {
private val scope = CoroutineScope(Dispatchers.IO + SupervisorJob())
init {
// 1. 监听 KMP 共享层的同步完成信号(包含了课表变更与通知/自动化设置变更)
widgetDataSynchronizer.syncCompletedFlow
.onEach {
Log.d("SyncManager", "收到共享层同步完成通知,正在调度 Worker 任务及刷新小组件...")
triggerNotificationWorker()
DndSchedulerWorker.enqueueWork(appContext)
updateAllWidgets(appContext)
}
.launchIn(scope)
// 2. 监听 Android 端专属的样式更新事件
styleSettingsRepository.styleUpdatedFlow
.onEach {
Log.d("SyncManager", "收到样式更改通知,正在刷新小组件...")
updateAllWidgets(appContext)
}
.launchIn(scope)
Log.d("SyncManager", "Android 平台同步调度器初始化完毕。")
}
private fun triggerNotificationWorker() {
val workRequest = OneTimeWorkRequestBuilder<CourseNotificationWorker>().build()
WorkManager.getInstance(appContext).enqueueUniqueWork(
"CourseNotificationWorker_Sync_Update",
ExistingWorkPolicy.REPLACE,
workRequest
)
}
}
@@ -0,0 +1,215 @@
package com.xingheyuzhuan.shiguangschedule.service
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.graphics.BitmapFactory
import android.media.AudioManager
import android.os.Build
import android.util.Log
import androidx.core.app.NotificationCompat
import androidx.core.content.edit
import androidx.core.content.getSystemService
import com.xingheyuzhuan.shiguangschedule.MainActivity
import com.xingheyuzhuan.shiguangschedule.R
import com.xingheyuzhuan.shiguangschedule.data.model.AutoControlMode
import com.xingheyuzhuan.shiguangschedule.widget.updateAllWidgets
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import com.xingheyuzhuan.shiguangschedule.data.repository.AppSettingsRepository
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
/**
* 课程闹钟与模式切换广播接收器。
*/
class CourseAlarmReceiver : BroadcastReceiver(), KoinComponent {
private val appSettingsRepository: AppSettingsRepository by inject()
companion object {
const val NOTIFICATION_CHANNEL_ID = "course_notification_channel"
const val EXTRA_COURSE_NAME = "course_name"
const val EXTRA_COURSE_POSITION = "course_position"
const val EXTRA_COURSE_TEACHER = "extra_course_teacher"
const val EXTRA_COURSE_ID = "course_id"
const val EXTRA_DND_ACTION = "extra_dnd_action"
const val DND_ACTION_START = "dnd_action_start"
const val DND_ACTION_END = "dnd_action_end"
const val EXTRA_ALARM_SLOT_ID = "EXTRA_ALARM_SLOT_ID"
// 覆盖 50001 (DND) 到 50110 (Course Reminders)
private const val SLOT_START = 50001
private const val SLOT_END = 50110
const val ACTION_DISMISS_NOTIFICATION = "com.xingheyuzhuan.shiguangschedule.ACTION_DISMISS_NOTIFICATION"
private const val ALARM_IDS_PREFS = "alarm_ids_prefs"
private const val KEY_ACTIVE_ALARM_IDS = "active_alarm_ids"
private const val TAG = "CourseAlarmReceiver"
fun toggleMode(context: Context, enableMode: Boolean, modeType: AutoControlMode) {
val audioManager = context.getSystemService<AudioManager>()
val notificationManager = context.getSystemService<NotificationManager>()
if (audioManager == null || notificationManager == null) return
if (!notificationManager.isNotificationPolicyAccessGranted) return
when (modeType) {
AutoControlMode.DND -> {
notificationManager.setInterruptionFilter(
if (enableMode) NotificationManager.INTERRUPTION_FILTER_PRIORITY
else NotificationManager.INTERRUPTION_FILTER_ALL
)
}
AutoControlMode.SILENT -> {
audioManager.ringerMode = if (enableMode) AudioManager.RINGER_MODE_SILENT
else AudioManager.RINGER_MODE_NORMAL
}
}
}
}
override fun onReceive(context: Context?, intent: Intent?) {
context?.let { ctx ->
if (intent?.action == ACTION_DISMISS_NOTIFICATION) {
val notifyId = intent.getIntExtra("target_notification_id", -1)
if (notifyId != -1) {
val nm = ctx.getSystemService<NotificationManager>()
nm?.cancel(notifyId)
}
return
}
val slotId = intent?.getIntExtra(EXTRA_ALARM_SLOT_ID, -1) ?: -1
val dndAction = intent?.getStringExtra(EXTRA_DND_ACTION)
if (intent?.data != null || (slotId !in SLOT_START..SLOT_END && dndAction.isNullOrEmpty())) {
Log.d(TAG, "已拦截非法或旧版闹钟。")
return
}
val pendingResult = goAsync()
CoroutineScope(Dispatchers.IO).launch {
try {
val appSettings = appSettingsRepository.getAppSettingsOnce()
val modeToUse = appSettings.autoControlMode
val isCompatMode = appSettings.compatWearableSync
if (!dndAction.isNullOrEmpty()) {
when (dndAction) {
DND_ACTION_START -> toggleMode(ctx, true, modeToUse)
DND_ACTION_END -> {
toggleMode(ctx, false, modeToUse)
DndSchedulerWorker.enqueueWork(ctx)
}
}
} else {
val courseName = intent?.getStringExtra(EXTRA_COURSE_NAME).takeUnless { it.isNullOrEmpty() }
?: ctx.getString(R.string.notification_unknown_course)
val position = intent?.getStringExtra(EXTRA_COURSE_POSITION).takeUnless { it.isNullOrEmpty() }
?: ctx.getString(R.string.notification_unknown_position)
val teacher = intent?.getStringExtra(EXTRA_COURSE_TEACHER) ?: ""
val courseIdString = intent?.getStringExtra(EXTRA_COURSE_ID)
if (!courseIdString.isNullOrEmpty()) {
showNotification(ctx, slotId, courseName, position, teacher, isCompatMode)
removeAlarmIdFromPrefs(ctx, courseIdString)
updateAllWidgets(ctx)
}
}
} catch (e: Exception) {
Log.e(TAG, "onReceive 异常", e)
} finally {
pendingResult.finish()
}
}
}
}
private fun showNotification(
context: Context,
notificationId: Int,
name: String,
position: String,
teacher: String,
isCompatMode: Boolean
) {
val nm = context.getSystemService<NotificationManager>() ?: return
val alertTitle = context.getString(R.string.notification_title_course_alert)
val posLabel = context.getString(R.string.label_position)
val teacherLabel = context.getString(R.string.label_teacher)
val closeActionText = context.getString(R.string.action_close)
val liveStatusText = context.getString(R.string.notification_live_status_preparing)
if (nm.getNotificationChannel(NOTIFICATION_CHANNEL_ID) == null) {
val channel = NotificationChannel(
NOTIFICATION_CHANNEL_ID,
context.getString(R.string.item_course_reminder),
NotificationManager.IMPORTANCE_HIGH
)
nm.createNotificationChannel(channel)
}
val dismissIntent = Intent(context, CourseAlarmReceiver::class.java).apply {
action = ACTION_DISMISS_NOTIFICATION
putExtra("target_notification_id", notificationId)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
identifier = notificationId.toString()
}
}
val dismissPI = PendingIntent.getBroadcast(
context, notificationId, dismissIntent,
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
val bigTextStyle = NotificationCompat.BigTextStyle()
.setBigContentTitle(name)
.bigText("$posLabel: $position\n$teacherLabel: $teacher")
val builder = NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_ID)
.setSmallIcon(R.drawable.ic_notification)
.setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher))
.setContentTitle(name)
.setContentText("$posLabel: $position")
.setSubText(alertTitle)
.setStyle(bigTextStyle)
// 非兼容模式应用
.setOngoing(!isCompatMode)
.setAutoCancel(isCompatMode)
.setCategory(NotificationCompat.CATEGORY_EVENT)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setShowWhen(true)
.addAction(0, closeActionText, dismissPI)
.setContentIntent(
PendingIntent.getActivity(
context, 0, Intent(context, MainActivity::class.java),
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
)
// Android 16 实时更新特性
if (Build.VERSION.SDK_INT >= 36) {
builder.setRequestPromotedOngoing(true)
builder.setShortCriticalText(liveStatusText)
}
nm.notify(notificationId, builder.build())
}
private fun removeAlarmIdFromPrefs(context: Context, courseId: String) {
val sp = context.getSharedPreferences(ALARM_IDS_PREFS, Context.MODE_PRIVATE)
val currentIds = sp.getStringSet(KEY_ACTIVE_ALARM_IDS, null)?.toMutableSet()
if (currentIds != null) {
currentIds.remove(courseId)
sp.edit { putStringSet(KEY_ACTIVE_ALARM_IDS, currentIds) }
}
}
}
@@ -0,0 +1,145 @@
package com.xingheyuzhuan.shiguangschedule.service
import android.app.AlarmManager
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.os.Build
import android.util.Log
import androidx.work.CoroutineWorker
import androidx.work.WorkerParameters
import com.xingheyuzhuan.shiguangschedule.data.repository.AppSettingsRepository
import com.xingheyuzhuan.shiguangschedule.data.repository.WidgetRepository
import kotlinx.coroutines.flow.first
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.LocalTime
import java.time.ZoneId
import java.time.format.DateTimeFormatter
import org.koin.android.annotation.KoinWorker
/**
* 课程提醒同步服务
*
*/
@KoinWorker
class CourseNotificationWorker(
appContext: Context,
workerParams: WorkerParameters,
private val appSettingsRepository: AppSettingsRepository,
private val widgetRepository: WidgetRepository
) : CoroutineWorker(appContext, workerParams) {
private val alarmManager = appContext.getSystemService(Context.ALARM_SERVICE) as AlarmManager
companion object {
private const val TAG = "CourseNotificationWorker"
private const val WIDGET_SYNC_DAYS = 7L
private const val ALARM_SLOT_START_ID = 50010
private const val ALARM_SLOT_COUNT = 101
}
override suspend fun doWork(): Result {
return try {
val appSettings = appSettingsRepository.getAppSettings().first()
// 论开关状态,先清空 50010 - 50110 范围内的所有旧闹钟槽位
cancelAllAlarms()
// 如果开关没开,清理完直接结束
if (!appSettings.reminderEnabled) return Result.success()
val remindBeforeMinutes = appSettings.remindBeforeMinutes
val now = LocalDateTime.now()
val startDate = now.toLocalDate().format(DateTimeFormatter.ISO_LOCAL_DATE)
val endDate = now.toLocalDate().plusDays(WIDGET_SYNC_DAYS).format(DateTimeFormatter.ISO_LOCAL_DATE)
// 获取未来课程
val coursesToRemind = widgetRepository.getWidgetCoursesByDateRange(startDate, endDate).first()
.filter { !it.isSkipped }
val zoneId = ZoneId.systemDefault()
// 按顺序为未来课程分配槽位并设置闹钟
coursesToRemind.take(ALARM_SLOT_COUNT).forEachIndexed { index, course ->
val courseDate = LocalDate.parse(course.date)
val startDT = LocalDateTime.of(courseDate, LocalTime.parse(course.startTime))
val remindTime = startDT.minusMinutes(remindBeforeMinutes.toLong())
if (remindTime.isAfter(now)) {
setAlarmInternal(
requestCode = ALARM_SLOT_START_ID + index,
courseId = course.id,
triggerTime = remindTime.atZone(zoneId).toInstant().toEpochMilli(),
name = course.name,
position = course.position,
teacher = course.teacher
)
}
}
Result.success()
} catch (e: Exception) {
Log.e(TAG, "同步课程提醒失败", e)
Result.failure()
}
}
private fun setAlarmInternal(
requestCode: Int,
courseId: String,
triggerTime: Long,
name: String,
position: String,
teacher: String
) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && !alarmManager.canScheduleExactAlarms()) {
Log.w(TAG, "缺少精确闹钟权限,无法设置提醒")
return
}
val intent = Intent(applicationContext, CourseAlarmReceiver::class.java).apply {
this.action = "com.xingheyuzhuan.shiguangschedule.ACTION_COURSE_REMIND"
putExtra(CourseAlarmReceiver.EXTRA_ALARM_SLOT_ID, requestCode)
putExtra(CourseAlarmReceiver.EXTRA_COURSE_ID, courseId)
putExtra(CourseAlarmReceiver.EXTRA_COURSE_NAME, name)
putExtra(CourseAlarmReceiver.EXTRA_COURSE_POSITION, position)
putExtra(CourseAlarmReceiver.EXTRA_COURSE_TEACHER, teacher)
}
val pendingIntent = PendingIntent.getBroadcast(
applicationContext,
requestCode,
intent,
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, triggerTime, pendingIntent)
}
/**
* 清理 50010 - 50110 范围内的所有槽位,确保无残留
*/
private fun cancelAllAlarms() {
for (i in 0 until ALARM_SLOT_COUNT) {
val requestCode = ALARM_SLOT_START_ID + i
val intent = Intent(applicationContext, CourseAlarmReceiver::class.java).apply {
this.action = "com.xingheyuzhuan.shiguangschedule.ACTION_COURSE_REMIND"
}
val pendingIntent = PendingIntent.getBroadcast(
applicationContext,
requestCode,
intent,
PendingIntent.FLAG_NO_CREATE or PendingIntent.FLAG_IMMUTABLE
)
pendingIntent?.let {
alarmManager.cancel(it)
it.cancel()
}
}
Log.d(TAG, "已清理课程提醒所有历史槽位 (50010-50110)")
}
}
@@ -0,0 +1,197 @@
package com.xingheyuzhuan.shiguangschedule.service
import android.app.AlarmManager
import android.app.NotificationManager
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.os.Build
import android.util.Log
import androidx.work.WorkManager
import androidx.work.OneTimeWorkRequestBuilder
import androidx.work.ExistingWorkPolicy
import androidx.work.Constraints
import androidx.work.NetworkType
import androidx.work.CoroutineWorker
import androidx.work.WorkerParameters
import androidx.core.content.getSystemService
import com.xingheyuzhuan.shiguangschedule.data.repository.AppSettingsRepository
import com.xingheyuzhuan.shiguangschedule.data.repository.WidgetRepository
import kotlinx.coroutines.flow.first
import org.koin.android.annotation.KoinWorker
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.LocalTime
import java.time.ZoneId
import java.time.format.DateTimeFormatter
import java.util.Locale
/**
* WorkManager 用于调度上课时行为模式(勿扰/静音)开启/关闭闹钟的 Worker。
*/
@KoinWorker
class DndSchedulerWorker(
appContext: Context,
workerParams: WorkerParameters,
private val appSettingsRepository: AppSettingsRepository,
private val widgetRepository: WidgetRepository
) : CoroutineWorker(appContext, workerParams) {
private val alarmManager = appContext.getSystemService(Context.ALARM_SERVICE) as AlarmManager
private val notificationManager = appContext.getSystemService<NotificationManager>()
?: throw IllegalStateException("NotificationManager not available")
companion object {
const val DND_SCHEDULER_WORK_TAG = "dnd_scheduler_worker_tag"
private const val TAG = "DndSchedulerWorker"
private const val DND_SCHEDULER_CHECK_DAYS = 7L
private val DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd", Locale.ROOT)
// 50000 作为基准 ID
private const val DND_ALARM_ID_BASE = 50000
fun enqueueWork(context: Context) {
val workRequest = OneTimeWorkRequestBuilder<DndSchedulerWorker>()
.setConstraints(Constraints.Builder().setRequiredNetworkType(NetworkType.NOT_REQUIRED).build())
.addTag(DND_SCHEDULER_WORK_TAG)
.build()
WorkManager.getInstance(context).enqueueUniqueWork(
DND_SCHEDULER_WORK_TAG,
ExistingWorkPolicy.REPLACE,
workRequest
)
Log.d(TAG, "上课时自动模式调度器已重新排队。")
}
}
override suspend fun doWork(): Result {
val appSettings = appSettingsRepository.getAppSettings().first()
if (!appSettings.autoModeEnabled) {
Log.d(TAG, "上课时自动模式开关已关闭,取消所有模式闹钟。")
cancelDndAlarms()
return Result.success()
}
if (!notificationManager.isNotificationPolicyAccessGranted) {
Log.w(TAG, "勿扰模式权限未授予")
}
val shouldBeModeOn = isCurrentlyInDndTime()
Log.d(TAG, "当前模式状态校准:$shouldBeModeOn")
// 调度前先清理旧闹钟
cancelDndAlarms()
val (nextStartAlarm, nextEndAlarm) = findNextDndAlarmTimes(DND_SCHEDULER_CHECK_DAYS)
if (nextStartAlarm == null && nextEndAlarm == null) {
return Result.success()
}
nextStartAlarm?.let { scheduleDndAlarm(it, isStartAction = true) }
nextEndAlarm?.let { scheduleDndAlarm(it, isStartAction = false) }
return Result.success()
}
private suspend fun findNextDndAlarmTimes(checkDays: Long): Pair<LocalDateTime?, LocalDateTime?> {
val now = LocalDateTime.now(ZoneId.systemDefault())
val startDate = now.toLocalDate().format(DATE_FORMATTER)
val endDate = now.toLocalDate().plusDays(checkDays - 1).format(DATE_FORMATTER)
val courses = widgetRepository.getWidgetCoursesByDateRange(startDate, endDate).first()
.filter { !it.isSkipped }
var nextStartAlarm: LocalDateTime? = null
var nextEndAlarm: LocalDateTime? = null
for (course in courses) {
val courseDate = LocalDate.parse(course.date, DATE_FORMATTER)
val startDateTime = courseDate.atTime(LocalTime.parse(course.startTime))
val endDateTime = courseDate.atTime(LocalTime.parse(course.endTime))
if (startDateTime.isAfter(now)) {
if (nextStartAlarm == null || startDateTime.isBefore(nextStartAlarm)) nextStartAlarm = startDateTime
}
if (endDateTime.isAfter(now)) {
if (nextEndAlarm == null || endDateTime.isBefore(nextEndAlarm)) nextEndAlarm = endDateTime
}
}
return Pair(nextStartAlarm, nextEndAlarm)
}
private suspend fun isCurrentlyInDndTime(): Boolean {
val now = LocalDateTime.now(ZoneId.systemDefault())
val todayStr = now.toLocalDate().format(DATE_FORMATTER)
val courses = widgetRepository.getWidgetCoursesByDateRange(todayStr, todayStr).first()
.filter { !it.isSkipped }
val nowTime = now.toLocalTime()
for (course in courses) {
val startTime = LocalTime.parse(course.startTime)
val endTime = LocalTime.parse(course.endTime)
if (!nowTime.isBefore(startTime) && nowTime.isBefore(endTime)) return true
}
return false
}
/**
* 设置一个精确的模式闹钟。
*/
private fun scheduleDndAlarm(dateTime: LocalDateTime, isStartAction: Boolean) {
val triggerTimeMillis = dateTime.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli()
// 50001 为开启,50002 为关闭
val dndActionValue = if (isStartAction) CourseAlarmReceiver.DND_ACTION_START else CourseAlarmReceiver.DND_ACTION_END
val requestCode = DND_ALARM_ID_BASE + if (isStartAction) 1 else 2
val intent = Intent(applicationContext, CourseAlarmReceiver::class.java).apply {
this.action = "com.xingheyuzhuan.shiguangschedule.ACTION_COURSE_REMIND"
putExtra(CourseAlarmReceiver.EXTRA_DND_ACTION, dndActionValue)
putExtra(CourseAlarmReceiver.EXTRA_ALARM_SLOT_ID, requestCode)
}
val pendingIntent = PendingIntent.getBroadcast(
applicationContext,
requestCode,
intent,
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
if (!alarmManager.canScheduleExactAlarms()) {
Log.w(TAG, "无法设置精确闹钟:缺少权限")
return
}
}
alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, triggerTimeMillis, pendingIntent)
Log.i(TAG, "已调度模式闹钟 [${if(isStartAction) "开启" else "关闭"}]: $dateTime (ID: $requestCode)")
}
/**
* 取消所有由模式 Scheduler 设置的闹钟。
*/
private fun cancelDndAlarms() {
// 循环注销 50001 (开启) 和 50002 (关闭)
listOf(1, 2).forEach { offset ->
val requestCode = DND_ALARM_ID_BASE + offset
val intent = Intent(applicationContext, CourseAlarmReceiver::class.java).apply {
this.action = "com.xingheyuzhuan.shiguangschedule.ACTION_COURSE_REMIND"
}
val pendingIntent = PendingIntent.getBroadcast(
applicationContext,
requestCode,
intent,
PendingIntent.FLAG_NO_CREATE or PendingIntent.FLAG_IMMUTABLE
)
pendingIntent?.let {
alarmManager.cancel(it)
it.cancel()
val label = if (offset == 1) "开启" else "关闭"
Log.d(TAG, "已从系统注销模式[$label]闹钟,ID: $requestCode")
}
}
}
}
@@ -0,0 +1,45 @@
package com.xingheyuzhuan.shiguangschedule.widget
import android.content.Context
import android.util.Log
import androidx.work.CoroutineWorker
import androidx.work.WorkerParameters
import com.xingheyuzhuan.shiguangschedule.data.sync.WidgetDataSynchronizer
import org.koin.android.annotation.KoinWorker
/**
* 负责每15分钟更新一次小组件UI的Worker。
* 它直接调用所有小组件的UI更新,确保UI及时刷新。
*/
@KoinWorker
class WidgetUiUpdateWorker(
appContext: Context,
workerParams: WorkerParameters
) : CoroutineWorker(appContext, workerParams) {
override suspend fun doWork(): Result {
Log.d("WidgetSync", "WidgetUiUpdateWorker 开始执行")
updateAllWidgets(applicationContext)
return Result.success()
}
}
/**
* 负责每天执行一次完整数据同步的Worker。
* 它调用 WidgetDataSynchronizer 的 syncNow() 方法,同步主数据库数据。
*/
@KoinWorker
class FullDataSyncWorker(
appContext: Context,
workerParams: WorkerParameters,
private val widgetDataSynchronizer: WidgetDataSynchronizer
) : CoroutineWorker(appContext, workerParams) {
override suspend fun doWork(): Result {
Log.d("WidgetSync", "FullDataSyncWorker 开始执行")
try {
widgetDataSynchronizer.syncNow()
return Result.success()
} catch (e: Exception) {
return Result.failure()
}
}
}
@@ -0,0 +1,120 @@
package com.xingheyuzhuan.shiguangschedule.widget
import android.appwidget.AppWidgetManager
import android.content.ComponentName
import android.content.Context
import android.util.Log
import androidx.datastore.core.DataStore
import com.xingheyuzhuan.shiguangschedule.data.model.ScheduleGridStyle
import com.xingheyuzhuan.shiguangschedule.data.model.schedule_style.ScheduleGridStyleProto
import com.xingheyuzhuan.shiguangschedule.data.model.toProto
import com.xingheyuzhuan.shiguangschedule.data.repository.WidgetRepository
import com.xingheyuzhuan.shiguangschedule.widget.compact.CompactNativeProvider
import com.xingheyuzhuan.shiguangschedule.widget.compact.CompactNativeRenderer
import com.xingheyuzhuan.shiguangschedule.widget.double_days.DoubleDaysNativeProvider
import com.xingheyuzhuan.shiguangschedule.widget.double_days.DoubleDaysNativeRenderer
import com.xingheyuzhuan.shiguangschedule.widget.list_vertical.ListVerticalNativeProvider
import com.xingheyuzhuan.shiguangschedule.widget.list_vertical.ListVerticalNativeRenderer
import com.xingheyuzhuan.shiguangschedule.widget.tiny.TinyNativeProvider
import com.xingheyuzhuan.shiguangschedule.widget.tiny.TinyNativeRenderer
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.withTimeoutOrNull
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
import java.time.LocalDate
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
// 创建一个局部的注入代理中心,用于在全局顶层方法中安全提取注入实例
private object WidgetDependencyContainer : KoinComponent {
val repository: WidgetRepository by inject()
val styleDataStore: DataStore<ScheduleGridStyleProto> by inject()
}
/**
* 小组件统一分发中心
* 负责从 Repository 提取数据并分发给所有 4 种规格的原生 Renderer
*/
suspend fun updateAllWidgets(context: Context) {
try {
// 1. 从 Koin 容器中动态获取单例化的仓库与 DataStore
val repository = WidgetDependencyContainer.repository
val styleDataStore = WidgetDependencyContainer.styleDataStore
// 2. 准备基础数据
val today = LocalDate.now()
val tomorrow = today.plusDays(1)
val dbCourses = withTimeoutOrNull(3.seconds) {
repository.getWidgetCoursesByDateRange(today.toString(), tomorrow.toString()).first()
} ?: emptyList()
val currentWeek = withTimeoutOrNull(2.seconds) {
repository.getCurrentWeekFlow().first()
} ?: 0
val currentStyle = withTimeoutOrNull(2.seconds) {
styleDataStore.data.first()
}
val finalStyleToSync = if (currentStyle == null || currentStyle.course_color_maps.isEmpty()) {
ScheduleGridStyle.DEFAULT.toProto()
} else {
currentStyle
}
// 3. 构造数据快照 (Protobuf)
val courseProtoList = dbCourses.map { course ->
WidgetCourseProto(
id = course.id,
name = course.name,
teacher = course.teacher,
position = course.position,
start_time = course.startTime,
end_time = course.endTime,
color_int = course.colorInt,
is_skipped = course.isSkipped,
date = course.date
)
}
val snapshot = WidgetSnapshot(
current_week = currentWeek,
style = finalStyleToSync,
courses = courseProtoList
)
// 4. 定义所有原生尺寸的映射列表
val appWidgetManager = AppWidgetManager.getInstance(context)
val nativeConfigs = listOf(
TinyNativeProvider::class.java to TinyNativeRenderer::render,
CompactNativeProvider::class.java to CompactNativeRenderer::render,
DoubleDaysNativeProvider::class.java to DoubleDaysNativeRenderer::render,
ListVerticalNativeProvider::class.java to ListVerticalNativeRenderer::render
)
// 5. 统一分发更新
nativeConfigs.forEachIndexed { index, (providerClass, renderFunc) ->
val componentName = ComponentName(context, providerClass)
val ids = appWidgetManager.getAppWidgetIds(componentName)
if (ids.isNotEmpty()) {
if (index > 0) {
delay(300.milliseconds)
}
try {
val remoteViews = renderFunc(context, snapshot)
appWidgetManager.updateAppWidget(componentName, remoteViews)
Log.d("WidgetUpdateHelper", "成功刷新规格 ${providerClass.simpleName}")
} catch (e: Exception) {
Log.e("WidgetUpdateHelper", "规格 ${providerClass.simpleName} 渲染失败", e)
}
}
}
} catch (e: Exception) {
Log.e("WidgetUpdateHelper", "更新流程异常: ${e.stackTraceToString()}")
}
}
@@ -0,0 +1,44 @@
// WorkManagerHelper.kt
package com.xingheyuzhuan.shiguangschedule.widget
import android.content.Context
import android.util.Log
import androidx.work.ExistingPeriodicWorkPolicy
import androidx.work.PeriodicWorkRequestBuilder
import androidx.work.WorkManager
import java.util.concurrent.TimeUnit
/**
* 负责调度和取消小组件相关定期任务的通用帮助类。
*/
object WorkManagerHelper {
private const val UI_UPDATE_WORK_NAME = "WidgetUiUpdateWorker_Periodic"
private const val FULL_DATA_SYNC_WORK_NAME = "FullDataSyncWorker_Periodic"
fun schedulePeriodicWork(context: Context) {
Log.d("WidgetWorkManager", "正在调度小组件定期任务...")
// 调度小组件UI更新任务 (每15分钟)
val uiUpdateWorkRequest = PeriodicWorkRequestBuilder<WidgetUiUpdateWorker>(15, TimeUnit.MINUTES).build()
WorkManager.getInstance(context).enqueueUniquePeriodicWork(
UI_UPDATE_WORK_NAME,
ExistingPeriodicWorkPolicy.KEEP,
uiUpdateWorkRequest
)
// 调度完整数据同步任务 (每天一次)
val fullDataSyncWorkRequest = PeriodicWorkRequestBuilder<FullDataSyncWorker>(1, TimeUnit.DAYS).build()
WorkManager.getInstance(context).enqueueUniquePeriodicWork(
FULL_DATA_SYNC_WORK_NAME,
ExistingPeriodicWorkPolicy.UPDATE,
fullDataSyncWorkRequest
)
}
fun cancelAllWork(context: Context) {
Log.d("WidgetWorkManager", "正在取消所有小组件定期任务...")
WorkManager.getInstance(context).cancelUniqueWork(UI_UPDATE_WORK_NAME)
WorkManager.getInstance(context).cancelUniqueWork(FULL_DATA_SYNC_WORK_NAME)
}
}
@@ -0,0 +1,35 @@
package com.xingheyuzhuan.shiguangschedule.widget.compact
import android.appwidget.AppWidgetManager
import android.appwidget.AppWidgetProvider
import android.content.Context
import com.xingheyuzhuan.shiguangschedule.widget.WorkManagerHelper
import com.xingheyuzhuan.shiguangschedule.widget.updateAllWidgets
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
/**
* 今日课程(紧凑版)原生小组件接收器
*/
class CompactNativeProvider : AppWidgetProvider() {
private val scope = MainScope()
override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) {
scope.launch {
// 触发全局刷新逻辑
updateAllWidgets(context)
}
}
override fun onEnabled(context: Context) {
super.onEnabled(context)
// 启动定时任务(15分钟 UI 刷新 + 24小时数据同步)
WorkManagerHelper.schedulePeriodicWork(context)
}
override fun onDisabled(context: Context) {
super.onDisabled(context)
// 只有在确定不再需要后台更新时才取消
WorkManagerHelper.cancelAllWork(context)
}
}
@@ -0,0 +1,178 @@
package com.xingheyuzhuan.shiguangschedule.widget.compact
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.view.View
import android.widget.RemoteViews
import com.xingheyuzhuan.shiguangschedule.MainActivity
import com.xingheyuzhuan.shiguangschedule.R
import com.xingheyuzhuan.shiguangschedule.widget.WidgetSnapshot
import com.xingheyuzhuan.shiguangschedule.widget.WidgetCourseProto
import java.time.LocalDate
import java.time.LocalTime
import java.time.format.DateTimeFormatter
import java.util.Locale
object CompactNativeRenderer {
fun render(context: Context, snapshot: WidgetSnapshot): RemoteViews {
val rv = RemoteViews(context.packageName, R.layout.widget_today_compact_native)
// 状态彻底重置
resetWidgetState(rv)
// 设置点击跳转
val intent = Intent(context, MainActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
}
val pendingIntent = PendingIntent.getActivity(
context, 0, intent,
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
rv.setOnClickPendingIntent(R.id.widget_root, pendingIntent)
// 数据准备
val now = LocalTime.now()
val today = LocalDate.now()
val tomorrow = today.plusDays(1)
val allCourses = snapshot.courses
val currentWeek = if (snapshot.current_week <= 0) null else snapshot.current_week
// 头部基础信息渲染
val dateFormatter = DateTimeFormatter.ofPattern("E", Locale.getDefault())
rv.setTextViewText(R.id.tv_header_title, today.format(dateFormatter))
// 渲染周数
if (currentWeek != null) {
rv.setViewVisibility(R.id.tv_current_week, View.VISIBLE)
rv.setTextViewText(R.id.tv_current_week, context.getString(R.string.status_current_week_format, currentWeek))
} else {
rv.setViewVisibility(R.id.tv_current_week, View.GONE)
}
// 情况 A:假期处理 (直接显示全屏遮罩)
if (currentWeek == null) {
showStatus(rv, context, context.getString(R.string.title_vacation), context.getString(R.string.widget_vacation_expecting), isFullCover = true)
return rv
}
// 核心调度逻辑
val todayStr = today.toString()
val tomorrowStr = tomorrow.toString()
val todayRemaining = allCourses.filter {
(it.date == todayStr || it.date.isBlank()) && !it.is_skipped && try { LocalTime.parse(it.end_time) > now } catch (e: Exception) { true }
}.sortedBy { it.start_time }
val tomorrowCourses = allCourses.filter { it.date == tomorrowStr && !it.is_skipped }.sortedBy { it.start_time }
// 决定渲染路径
when {
todayRemaining.isNotEmpty() -> {
// 状态 1:今日剩余
renderCourseContent(context, rv, todayRemaining, snapshot, false)
}
tomorrowCourses.isNotEmpty() -> {
// 状态 2:明日预告
rv.setTextViewText(R.id.tv_header_title, context.getString(R.string.widget_tomorrow_course_preview))
renderCourseContent(context, rv, tomorrowCourses, snapshot, true)
}
else -> {
// 状态 3:今明无课
val hasCoursesToday = allCourses.any { it.date == todayStr || it.date.isBlank() }
val tip = if (!hasCoursesToday) {
context.getString(R.string.text_no_courses_today)
} else {
context.getString(R.string.widget_today_courses_finished)
}
showStatus(rv, context, tip, "", isFullCover = false)
}
}
return rv
}
/**
* 重置所有 View 的可见性。
*/
private fun resetWidgetState(rv: RemoteViews) {
rv.setViewVisibility(R.id.container_full_status, View.GONE)
rv.setViewVisibility(R.id.inner_content_card, View.VISIBLE)
rv.setViewVisibility(R.id.container_courses, View.GONE)
rv.setViewVisibility(R.id.container_status, View.GONE)
rv.setViewVisibility(R.id.tv_footer, View.GONE)
rv.removeAllViews(R.id.container_courses)
}
/**
* 渲染具体的课程列表
*/
private fun renderCourseContent(context: Context, rv: RemoteViews, courses: List<WidgetCourseProto>, snapshot: WidgetSnapshot, isTomorrow: Boolean) {
rv.setViewVisibility(R.id.container_courses, View.VISIBLE)
rv.setViewVisibility(R.id.container_status, View.GONE)
rv.setViewVisibility(R.id.tv_footer, View.VISIBLE)
courses.forEachIndexed { index, course ->
val itemRv = RemoteViews(context.packageName, R.layout.widget_item_course_common)
itemRv.setTextViewText(R.id.tv_course_name, course.name)
itemRv.setTextViewText(R.id.tv_course_position, course.position)
itemRv.setTextViewText(R.id.tv_course_time, "${course.start_time.take(5)}-${course.end_time.take(5)}")
if (!(course.teacher.isBlank())) {
itemRv.setViewVisibility(R.id.tv_course_teacher, View.VISIBLE)
itemRv.setTextViewText(R.id.tv_course_teacher, course.teacher)
} else {
itemRv.setViewVisibility(R.id.tv_course_teacher, View.GONE)
}
// 颜色处理
val style = snapshot.style
val colorInt = course.color_int
if (style != null && colorInt < style.course_color_maps.size) {
val colorPair = style.course_color_maps[colorInt]
itemRv.setInt(R.id.course_indicator, "setColorFilter",
colorPair.light_color.toInt()
)
itemRv.setInt(R.id.course_indicator_dark, "setColorFilter",
colorPair.dark_color.toInt()
)
}
rv.addView(R.id.container_courses, itemRv)
if (index < courses.size - 1) {
rv.addView(R.id.container_courses, RemoteViews(context.packageName, R.layout.widget_divider_horizontal))
}
}
val footerRes = if (isTomorrow) R.string.widget_course_total_count else R.string.widget_course_remaining_count
rv.setTextViewText(R.id.tv_footer, context.getString(footerRes, courses.size))
}
private fun showStatus(rv: RemoteViews, context: Context, title: String, msg: String?, isFullCover: Boolean) {
if (isFullCover) {
rv.setViewVisibility(R.id.inner_content_card, View.GONE)
rv.setViewVisibility(R.id.container_status, View.GONE)
rv.setViewVisibility(R.id.container_full_status, View.VISIBLE)
rv.setTextViewText(R.id.tv_full_status_title, title)
if (!msg.isNullOrBlank()) {
rv.setTextViewText(R.id.tv_full_status_msg, msg)
rv.setViewVisibility(R.id.tv_full_status_msg, View.VISIBLE)
}
} else {
rv.setViewVisibility(R.id.inner_content_card, View.VISIBLE)
rv.setViewVisibility(R.id.container_courses, View.GONE)
rv.setViewVisibility(R.id.tv_footer, View.GONE)
rv.setViewVisibility(R.id.container_status, View.VISIBLE)
rv.setViewVisibility(R.id.container_full_status, View.GONE)
rv.setTextViewText(R.id.tv_status_title, title)
if (!msg.isNullOrBlank()) {
rv.setTextViewText(R.id.tv_status_msg, msg)
rv.setViewVisibility(R.id.tv_status_msg, View.VISIBLE)
} else {
rv.setViewVisibility(R.id.tv_status_msg, View.GONE)
}
}
}
}
@@ -0,0 +1,34 @@
package com.xingheyuzhuan.shiguangschedule.widget.double_days
import android.appwidget.AppWidgetManager
import android.appwidget.AppWidgetProvider
import android.content.Context
import com.xingheyuzhuan.shiguangschedule.widget.WorkManagerHelper
import com.xingheyuzhuan.shiguangschedule.widget.updateAllWidgets
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
class DoubleDaysNativeProvider : AppWidgetProvider() {
// 使用 MainScope 处理异步任务
private val scope = MainScope()
override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) {
scope.launch {
// 当系统请求更新(或数据变化手动触发)时渲染 UI
updateAllWidgets(context)
}
}
override fun onEnabled(context: Context) {
super.onEnabled(context)
// 启用更新计划任务表
WorkManagerHelper.schedulePeriodicWork(context)
}
// 移除最后一个小组件时清除任务表
override fun onDisabled(context: Context) {
super.onDisabled(context)
WorkManagerHelper.cancelAllWork(context)
}
}
@@ -0,0 +1,167 @@
package com.xingheyuzhuan.shiguangschedule.widget.double_days
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.view.View
import android.widget.RemoteViews
import com.xingheyuzhuan.shiguangschedule.MainActivity
import com.xingheyuzhuan.shiguangschedule.R
import com.xingheyuzhuan.shiguangschedule.widget.WidgetCourseProto
import com.xingheyuzhuan.shiguangschedule.widget.WidgetSnapshot
import java.time.LocalDate
import java.time.LocalTime
import java.time.format.DateTimeFormatter
import java.util.Locale
object DoubleDaysNativeRenderer {
fun render(context: Context, snapshot: WidgetSnapshot): RemoteViews {
val rv = RemoteViews(context.packageName, R.layout.widget_double_days_native)
// 状态彻底重置
resetWidgetState(rv)
// 点击跳转逻辑
val intent = Intent(context, MainActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
}
val pendingIntent = PendingIntent.getActivity(
context, 0, intent,
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
rv.setOnClickPendingIntent(R.id.widget_root, pendingIntent)
// 全局状态判断
val currentWeek = if (snapshot.current_week <= 0) null else snapshot.current_week
if (currentWeek == null) {
rv.setViewVisibility(R.id.inner_content_card, View.GONE)
rv.setViewVisibility(R.id.container_vacation, View.VISIBLE)
rv.setTextViewText(R.id.tv_vacation_title, context.getString(R.string.title_vacation))
rv.setTextViewText(R.id.tv_vacation_msg, context.getString(R.string.widget_vacation_expecting))
return rv
}
rv.setViewVisibility(R.id.inner_content_card, View.VISIBLE)
rv.setViewVisibility(R.id.container_vacation, View.GONE)
rv.setTextViewText(R.id.tv_current_week, context.getString(R.string.status_current_week_format, currentWeek))
val now = LocalTime.now()
val today = LocalDate.now()
val tomorrow = today.plusDays(1)
val allCourses = snapshot.courses
// 渲染左侧:今日
val todayCourses = allCourses.filter { it.date == today.toString() || it.date.isBlank() }
val remainingToday = todayCourses.filter {
!it.is_skipped && try { LocalTime.parse(it.end_time) > now } catch (_: Exception) { true }
}.sortedBy { it.start_time }
renderColumn(
context, rv,
R.id.container_today, R.id.tv_today_date, R.id.tv_today_footer,
R.id.empty_today_container,
today, remainingToday, remainingToday.size,
true, snapshot
)
// 渲染右侧:明日
val tomorrowCourses = allCourses.filter { it.date == tomorrow.toString() }
val effectiveTomorrow = tomorrowCourses.filter { (!it.is_skipped) }.sortedBy { it.start_time }
renderColumn(
context, rv,
R.id.container_tomorrow, R.id.tv_tomorrow_date, R.id.tv_tomorrow_footer,
R.id.empty_tomorrow_container,
tomorrow, effectiveTomorrow, effectiveTomorrow.size,
false, snapshot
)
return rv
}
private fun resetWidgetState(rv: RemoteViews) {
rv.setViewVisibility(R.id.inner_content_card, View.VISIBLE)
rv.setViewVisibility(R.id.container_vacation, View.GONE)
rv.removeAllViews(R.id.container_today)
rv.removeAllViews(R.id.container_tomorrow)
rv.setViewVisibility(R.id.empty_today_container, View.GONE)
rv.setViewVisibility(R.id.empty_tomorrow_container, View.GONE)
}
private fun renderColumn(
context: Context,
rootRv: RemoteViews,
containerId: Int,
dateId: Int,
footerId: Int,
emptyContainerId: Int,
date: LocalDate,
displayCourses: List<WidgetCourseProto>,
totalCount: Int,
isToday: Boolean,
snapshot: WidgetSnapshot
) {
// 设置日期标题
val prefix = if (isToday) {
context.getString(R.string.widget_title_today)
} else {
context.getString(R.string.widget_title_tomorrow)
}
val datePattern = date.format(DateTimeFormatter.ofPattern("M.dd E", Locale.getDefault()))
rootRv.setTextViewText(dateId, "$prefix $datePattern")
if (totalCount == 0) {
rootRv.setViewVisibility(containerId, View.GONE)
rootRv.setViewVisibility(emptyContainerId, View.VISIBLE)
rootRv.setViewVisibility(footerId, View.GONE)
val emptyTextViewId = if (isToday) R.id.empty_today else R.id.empty_tomorrow
rootRv.setTextViewText(emptyTextViewId, context.getString(R.string.text_no_course))
} else {
rootRv.setViewVisibility(containerId, View.VISIBLE)
rootRv.setViewVisibility(emptyContainerId, View.GONE)
rootRv.setViewVisibility(footerId, View.VISIBLE)
// 设置统计文案:今日显示“剩余”,其他显示“共有”
val countRes = if (isToday) R.string.widget_course_remaining_count else R.string.widget_course_total_count
rootRv.setTextViewText(footerId, context.getString(countRes, totalCount))
// 循环渲染所有课程
displayCourses.forEachIndexed { index, course ->
val itemRv = RemoteViews(context.packageName, R.layout.widget_item_course_common)
itemRv.setTextViewText(R.id.tv_course_name, course.name)
itemRv.setTextViewText(R.id.tv_course_position, course.position)
val timeRange = "${course.start_time.take(5)}-${course.end_time.take(5)}"
itemRv.setTextViewText(R.id.tv_course_time, timeRange)
if (course.teacher.isNotBlank()) {
itemRv.setViewVisibility(R.id.tv_course_teacher, View.VISIBLE)
itemRv.setTextViewText(R.id.tv_course_teacher, course.teacher)
} else {
itemRv.setViewVisibility(R.id.tv_course_teacher, View.GONE)
}
val style = snapshot.style
val colorInt = course.color_int
if (style != null && colorInt < style.course_color_maps.size) {
val colorPair = style.course_color_maps[colorInt]
itemRv.setInt(R.id.course_indicator, "setColorFilter",
colorPair.light_color.toInt()
)
itemRv.setInt(R.id.course_indicator_dark, "setColorFilter",
colorPair.dark_color.toInt()
)
}
rootRv.addView(containerId, itemRv)
// 无限显示逻辑:只要不是最后一项,就添加横向分割线
if (index < displayCourses.size - 1) {
rootRv.addView(containerId, RemoteViews(context.packageName, R.layout.widget_divider_horizontal))
}
}
}
}
}
@@ -0,0 +1,43 @@
package com.xingheyuzhuan.shiguangschedule.widget.list_vertical
import android.appwidget.AppWidgetManager
import android.appwidget.AppWidgetProvider
import android.content.Context
import com.xingheyuzhuan.shiguangschedule.widget.WorkManagerHelper
import com.xingheyuzhuan.shiguangschedule.widget.updateAllWidgets
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
/**
* 垂直列表版小组件接收器
* 负责响应系统刷新广播并触发 ListVerticalNativeRenderer 进行渲染
*/
class ListVerticalNativeProvider : AppWidgetProvider() {
private val scope = MainScope()
/**
* 当小组件需要更新时调用(系统定时或手动请求)
*/
override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) {
scope.launch {
updateAllWidgets(context)
}
}
/**
* 当第一个该类型的小组件添加到桌面时调用
*/
override fun onEnabled(context: Context) {
super.onEnabled(context)
// 确保后台任务正在运行
WorkManagerHelper.schedulePeriodicWork(context)
}
/**
* 当该类型的最后一个小组件从桌面移除时调用
*/
override fun onDisabled(context: Context) {
super.onDisabled(context)
WorkManagerHelper.cancelAllWork(context)
}
}
@@ -0,0 +1,142 @@
package com.xingheyuzhuan.shiguangschedule.widget.list_vertical
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.view.View
import android.widget.RemoteViews
import com.xingheyuzhuan.shiguangschedule.MainActivity
import com.xingheyuzhuan.shiguangschedule.R
import com.xingheyuzhuan.shiguangschedule.widget.WidgetSnapshot
import com.xingheyuzhuan.shiguangschedule.widget.WidgetCourseProto
import java.time.LocalDate
import java.time.LocalTime
object ListVerticalNativeRenderer {
fun render(context: Context, snapshot: WidgetSnapshot): RemoteViews {
val rv = RemoteViews(context.packageName, R.layout.widget_list_vertical_native)
resetWidgetState(rv)
val intent = Intent(context, MainActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
}
val pendingIntent = PendingIntent.getActivity(
context, 0, intent,
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
rv.setOnClickPendingIntent(R.id.widget_root, pendingIntent)
val now = LocalTime.now()
val today = LocalDate.now()
val tomorrow = today.plusDays(1)
val allCourses = snapshot.courses
val currentWeek = if (snapshot.current_week <= 0) null else snapshot.current_week
if (currentWeek == null) {
showFullStatus(
rv,
context.getString(R.string.title_vacation),
context.getString(R.string.widget_vacation_expecting)
)
return rv
}
val todayStr = today.toString()
val tomorrowStr = tomorrow.toString()
val todayRemaining = allCourses.filter {
(it.date == todayStr || it.date.isBlank()) && !it.is_skipped && try { LocalTime.parse(it.end_time) > now } catch (_: Exception) { true }
}.sortedBy { it.start_time }
val tomorrowCourses = allCourses.filter {
it.date == tomorrowStr && !it.is_skipped
}.sortedBy { it.start_time }
val weekDaysArray = context.resources.getStringArray(R.array.week_days_full_names)
val dayOfWeekStr = weekDaysArray[today.dayOfWeek.value - 1]
when {
todayRemaining.isNotEmpty() -> {
val weekText = context.getString(R.string.title_current_week, currentWeek.toString())
rv.setTextViewText(R.id.tv_header_title, "$weekText $dayOfWeekStr")
rv.setTextViewText(R.id.tv_header_count_summary, context.getString(R.string.widget_remaining_courses_format_today, todayRemaining.size))
renderCourseContent(context, rv, todayRemaining, snapshot)
}
tomorrowCourses.isNotEmpty() -> {
rv.setTextViewText(R.id.tv_header_title, context.getString(R.string.widget_tomorrow_course_preview))
rv.setTextViewText(R.id.tv_header_count_summary, context.getString(R.string.widget_remaining_courses_format_tomorrow, tomorrowCourses.size))
renderCourseContent(context, rv, tomorrowCourses, snapshot)
}
else -> {
val hasCoursesToday = allCourses.any { it.date == todayStr || it.date.isBlank() }
val tip = if (!hasCoursesToday) context.getString(R.string.text_no_courses_today) else context.getString(R.string.widget_today_courses_finished)
val weekText = context.getString(R.string.title_current_week, currentWeek.toString())
rv.setTextViewText(R.id.tv_header_title, "$weekText $dayOfWeekStr")
showInnerStatus(rv, tip)
rv.setTextViewText(R.id.tv_header_count_summary, "")
}
}
return rv
}
private fun resetWidgetState(rv: RemoteViews) {
rv.setViewVisibility(R.id.container_full_status, View.GONE)
rv.setViewVisibility(R.id.inner_content_card, View.VISIBLE)
rv.setViewVisibility(R.id.container_courses, View.GONE)
rv.setViewVisibility(R.id.container_status, View.GONE)
rv.removeAllViews(R.id.container_courses)
}
private fun renderCourseContent(context: Context, rv: RemoteViews, courses: List<WidgetCourseProto>, snapshot: WidgetSnapshot) {
rv.setViewVisibility(R.id.container_courses, View.VISIBLE)
courses.forEachIndexed { index, course ->
val itemRv = RemoteViews(context.packageName, R.layout.widget_item_course_list_node)
itemRv.setTextViewText(R.id.tv_course_name, course.name)
itemRv.setTextViewText(R.id.tv_course_position, course.position)
itemRv.setTextViewText(R.id.tv_course_start_time, course.start_time.take(5))
itemRv.setTextViewText(R.id.tv_course_end_time, course.end_time.take(5))
if (course.teacher.isNotBlank()) {
itemRv.setViewVisibility(R.id.tv_course_teacher, View.VISIBLE)
itemRv.setTextViewText(R.id.tv_course_teacher, course.teacher)
} else {
itemRv.setViewVisibility(R.id.tv_course_teacher, View.GONE)
}
val style = snapshot.style
val colorInt = course.color_int
if (style != null && colorInt < style.course_color_maps.size) {
val colorPair = style.course_color_maps[colorInt]
itemRv.setInt(R.id.course_indicator, "setColorFilter",
colorPair.light_color.toInt()
)
itemRv.setInt(R.id.course_indicator_dark, "setColorFilter",
colorPair.dark_color.toInt()
)
}
rv.addView(R.id.container_courses, itemRv)
if (index < courses.size - 1) {
rv.addView(R.id.container_courses, RemoteViews(context.packageName, R.layout.widget_divider_horizontal))
}
}
}
private fun showFullStatus(rv: RemoteViews, title: String, msg: String) {
rv.setViewVisibility(R.id.inner_content_card, View.GONE)
rv.setViewVisibility(R.id.container_full_status, View.VISIBLE)
rv.setTextViewText(R.id.tv_full_status_title, title)
rv.setTextViewText(R.id.tv_full_status_msg, msg)
}
private fun showInnerStatus(rv: RemoteViews, title: String) {
rv.setViewVisibility(R.id.container_courses, View.GONE)
rv.setViewVisibility(R.id.container_status, View.VISIBLE)
rv.setTextViewText(R.id.tv_status_title, title)
}
}
@@ -0,0 +1,29 @@
package com.xingheyuzhuan.shiguangschedule.widget.tiny
import android.appwidget.AppWidgetManager
import android.appwidget.AppWidgetProvider
import android.content.Context
import com.xingheyuzhuan.shiguangschedule.widget.WorkManagerHelper
import com.xingheyuzhuan.shiguangschedule.widget.updateAllWidgets
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
class TinyNativeProvider : AppWidgetProvider() {
private val scope = MainScope()
override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) {
scope.launch {
updateAllWidgets(context)
}
}
override fun onEnabled(context: Context) {
super.onEnabled(context)
WorkManagerHelper.schedulePeriodicWork(context)
}
override fun onDisabled(context: Context) {
super.onDisabled(context)
WorkManagerHelper.cancelAllWork(context)
}
}
@@ -0,0 +1,110 @@
package com.xingheyuzhuan.shiguangschedule.widget.tiny
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.view.View
import android.widget.RemoteViews
import com.xingheyuzhuan.shiguangschedule.MainActivity
import com.xingheyuzhuan.shiguangschedule.R
import com.xingheyuzhuan.shiguangschedule.widget.WidgetSnapshot
import java.time.LocalDate
import java.time.LocalTime
object TinyNativeRenderer {
fun render(context: Context, snapshot: WidgetSnapshot): RemoteViews {
val rv = RemoteViews(context.packageName, R.layout.widget_tiny_native)
// 状态彻底重置
resetWidgetState(rv)
// 设置点击跳转
val intent = Intent(context, MainActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
}
val pendingIntent = PendingIntent.getActivity(context, 0, intent,
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
rv.setOnClickPendingIntent(R.id.widget_root, pendingIntent)
// 数据准备
val allCourses = snapshot.courses
val currentWeek = if (snapshot.current_week <= 0) null else snapshot.current_week
val now = LocalTime.now()
val todayStr = LocalDate.now().toString()
// 状态渲染逻辑
// 情况 A:假期处理
if (currentWeek == null) {
showStatus(rv, context.getString(R.string.title_vacation), context.getString(R.string.widget_vacation_expecting))
return rv
}
// 情况 B:开学期间数据过滤
val todayAllCourses = allCourses.filter { it.date == todayStr || it.date.isBlank() }
val nextCourse = todayAllCourses.firstOrNull {
!it.is_skipped && try {
LocalTime.parse(it.end_time) > now
} catch (_: Exception) { true }
}
if (nextCourse != null) {
// 有课显示逻辑
rv.setViewVisibility(R.id.container_info, View.VISIBLE)
rv.setViewVisibility(R.id.bubble_frame, View.VISIBLE)
rv.setViewVisibility(R.id.container_status, View.GONE)
rv.setTextViewText(R.id.tv_course_name, nextCourse.name)
val timeText = "${nextCourse.start_time.take(5)} - ${nextCourse.end_time.take(5)}"
rv.setTextViewText(R.id.tv_course_time, timeText)
rv.setTextViewText(R.id.tv_course_position, nextCourse.position)
// 剩余课程数统计 (基于原始列表索引)
val nextCourseIndex = todayAllCourses.indexOf(nextCourse)
val remainingCount = todayAllCourses.size - nextCourseIndex
rv.setTextViewText(R.id.tv_remaining_count, remainingCount.toString())
// 颜色渲染
val style = snapshot.style
val colorInt = nextCourse.color_int
if (style != null && colorInt < style.course_color_maps.size) {
val colorPair = style.course_color_maps[colorInt]
rv.setInt(R.id.bubble_bg_image, "setColorFilter", colorPair.light_color.toInt())
rv.setInt(R.id.bubble_bg_image_dark, "setColorFilter", colorPair.dark_color.toInt())
}
} else {
// 无课状态
val tip = if (todayAllCourses.isEmpty()) {
context.getString(R.string.text_no_courses_today)
} else {
context.getString(R.string.widget_today_courses_finished)
}
showStatus(rv, tip)
}
return rv
}
/**
* 核心优化:每次渲染前强制归零可见性,消除跨状态残留
*/
private fun resetWidgetState(rv: RemoteViews) {
rv.setViewVisibility(R.id.container_info, View.GONE)
rv.setViewVisibility(R.id.bubble_frame, View.GONE)
rv.setViewVisibility(R.id.container_status, View.GONE)
}
private fun showStatus(rv: RemoteViews, title: String, message: String? = null) {
rv.setViewVisibility(R.id.container_status, View.VISIBLE)
rv.setTextViewText(R.id.tv_status_title, title)
if (!message.isNullOrBlank()) {
rv.setTextViewText(R.id.tv_status_msg, message)
rv.setViewVisibility(R.id.tv_status_msg, View.VISIBLE)
} else {
rv.setViewVisibility(R.id.tv_status_msg, View.GONE)
}
}
}
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/widget_bg" />
<corners android:radius="21dp" />
</shape>
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="960" android:viewportWidth="960" android:width="24dp">
<path android:fillColor="@android:color/white" android:pathData="M320,560Q337,560 348.5,548.5Q360,537 360,520Q360,503 348.5,491.5Q337,480 320,480Q303,480 291.5,491.5Q280,503 280,520Q280,537 291.5,548.5Q303,560 320,560ZM480,560Q497,560 508.5,548.5Q520,537 520,520Q520,503 508.5,491.5Q497,480 480,480Q463,480 451.5,491.5Q440,503 440,520Q440,537 451.5,548.5Q463,560 480,560ZM640,560Q657,560 668.5,548.5Q680,537 680,520Q680,503 668.5,491.5Q657,480 640,480Q623,480 611.5,491.5Q600,503 600,520Q600,537 611.5,548.5Q623,560 640,560ZM480,880Q405,880 339.5,851.5Q274,823 225.5,774.5Q177,726 148.5,660.5Q120,595 120,520Q120,445 148.5,379.5Q177,314 225.5,265.5Q274,217 339.5,188.5Q405,160 480,160Q555,160 620.5,188.5Q686,217 734.5,265.5Q783,314 811.5,379.5Q840,445 840,520Q840,595 811.5,660.5Q783,726 734.5,774.5Q686,823 620.5,851.5Q555,880 480,880ZM480,520Q480,520 480,520Q480,520 480,520Q480,520 480,520Q480,520 480,520Q480,520 480,520Q480,520 480,520Q480,520 480,520Q480,520 480,520ZM224,94L280,150L110,320L54,264L224,94ZM736,94L906,264L850,320L680,150L736,94ZM480,800Q597,800 678.5,718.5Q760,637 760,520Q760,403 678.5,321.5Q597,240 480,240Q363,240 281.5,321.5Q200,403 200,520Q200,637 281.5,718.5Q363,800 480,800Z"/>
</vector>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/widget_bg" />
<corners android:radius="18dp" />
</shape>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF" />
<corners android:radius="10dp" />
<size android:width="4dp" android:height="40dp" />
</shape>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/widget_bg" />
<corners android:radius="21dp" />
</shape>
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"> <solid android:color="#3498DB" />
</shape>
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingHorizontal="4dp">
<ImageView
android:id="@+id/course_indicator_dark"
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:src="@drawable/widget_indicator_shape" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="6dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_course_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/widget_text_primary"
android:textSize="12dp"
android:textStyle="bold"
tools:text="高等数学" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp">
<TextView
android:id="@+id/tv_course_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_toStartOf="@+id/tv_course_time"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/widget_text_secondary"
android:textSize="10dp"
tools:text="教一 101" />
<TextView
android:id="@+id/tv_course_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:includeFontPadding="false"
android:textColor="@color/widget_text_secondary"
android:textSize="10dp"
tools:text="08:00-09:35" />
</RelativeLayout>
<TextView
android:id="@+id/tv_course_teacher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/widget_text_hint"
android:textSize="9dp"
tools:text="张老师" />
</LinearLayout>
</LinearLayout>
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_vertical"
android:minHeight="60dp"
android:paddingVertical="8dp"
android:paddingHorizontal="4dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/course_indicator_dark"
android:layout_width="4dp"
android:layout_height="32dp"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/widget_indicator_shape" />
<LinearLayout
android:id="@+id/container_time_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/course_indicator_dark"
android:layout_centerVertical="true"
android:layout_marginStart="6dp"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_course_start_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/widget_text_primary"
android:textSize="10.5dp"
android:textStyle="bold"
tools:text="14:00" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="2dp" />
<TextView
android:id="@+id/tv_course_end_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/widget_text_secondary"
android:textSize="10.5dp"
android:textStyle="bold"
tools:text="15:35" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/container_time_vertical"
android:layout_marginStart="8dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_course_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/widget_text_primary"
android:textSize="13dp"
android:textStyle="bold"
tools:text="设计模式原理" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="2dp" />
<TextView
android:id="@+id/tv_course_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/widget_text_secondary"
android:textSize="10dp"
tools:text="实验楼 B402" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="1dp" />
<TextView
android:id="@+id/tv_course_teacher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/widget_text_hint"
android:textSize="9dp"
tools:text="张建国 教授" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bubble_bg_dark"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/bubble_bg_image_dark"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/widget_shape_circle_base" />
</FrameLayout>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginHorizontal="6dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:background="@color/widget_divider" />
@@ -0,0 +1,202 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/widget_root"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/inner_content_card"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/widget_bg_rounded"
android:orientation="vertical"
android:padding="14dp">
<TextView
android:id="@+id/tv_current_week"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:textColor="@color/widget_text_secondary"
android:textSize="10dp"
tools:text="第 18 周" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_today_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_secondary"
android:textSize="11dp"
android:textStyle="bold"
tools:text="今日 1.07 周三" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal" />
<TextView
android:id="@+id/tv_today_footer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_hint"
android:textSize="8dp"
tools:text="剩余 2 节" />
</LinearLayout>
<LinearLayout
android:id="@+id/container_today"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="vertical">
<include layout="@layout/widget_item_course_common" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/empty_today_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="gone">
<TextView
android:id="@+id/empty_today"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="无课程"
android:textColor="@color/widget_text_hint"
android:textSize="12dp" />
</LinearLayout>
</RelativeLayout>
<ImageView
android:id="@+id/widget_divider"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginHorizontal="8dp"
android:layout_marginVertical="8dp"
android:alpha="0.2"
android:background="@color/widget_divider" />
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_tomorrow_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_secondary"
android:textSize="11dp"
android:textStyle="bold"
tools:text="明日 1.08 周四" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal" />
<TextView
android:id="@+id/tv_tomorrow_footer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_hint"
android:textSize="8dp"
tools:text="共有 4 节" />
</LinearLayout>
<LinearLayout
android:id="@+id/container_tomorrow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="vertical">
<include layout="@layout/widget_item_course_common" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/empty_tomorrow_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="gone">
<TextView
android:id="@+id/empty_tomorrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="无课程"
android:textColor="@color/widget_text_hint"
android:textSize="12dp" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/container_vacation"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/widget_bg_rounded"
android:gravity="center"
android:orientation="vertical"
android:padding="14dp"
android:visibility="gone">
<FrameLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" />
<TextView
android:id="@+id/tv_vacation_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_primary"
android:textSize="18dp"
android:textStyle="bold"
tools:text="暑假快乐" />
<TextView
android:id="@+id/tv_vacation_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="@color/widget_text_secondary"
android:textSize="13dp"
tools:text="愿你的假期充满阳光" />
<FrameLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" />
</LinearLayout>
</RelativeLayout>
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingHorizontal="4dp">
<ImageView
android:id="@+id/course_indicator"
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:src="@drawable/widget_indicator_shape" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="6dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_course_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/widget_text_primary"
android:textSize="12dp"
android:textStyle="bold"
tools:text="高等数学" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp">
<TextView
android:id="@+id/tv_course_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_toStartOf="@+id/tv_course_time"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/widget_text_secondary"
android:textSize="10dp"
tools:text="教一 101" />
<TextView
android:id="@+id/tv_course_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:includeFontPadding="false"
android:textColor="@color/widget_text_secondary"
android:textSize="10dp"
tools:text="08:00-09:35" />
</RelativeLayout>
<TextView
android:id="@+id/tv_course_teacher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/widget_text_hint"
android:textSize="9dp"
tools:text="张老师" />
</LinearLayout>
</LinearLayout>
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_vertical"
android:minHeight="60dp"
android:paddingVertical="8dp"
android:paddingHorizontal="4dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/course_indicator"
android:layout_width="4dp"
android:layout_height="32dp"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/widget_indicator_shape" />
<LinearLayout
android:id="@+id/container_time_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/course_indicator"
android:layout_centerVertical="true"
android:layout_marginStart="6dp"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_course_start_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/widget_text_primary"
android:textSize="10.5dp"
android:textStyle="bold"
tools:text="14:00" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="2dp" />
<TextView
android:id="@+id/tv_course_end_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/widget_text_secondary"
android:textSize="10.5dp"
android:textStyle="bold"
tools:text="15:35" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/container_time_vertical"
android:layout_marginStart="8dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_course_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/widget_text_primary"
android:textSize="13dp"
android:textStyle="bold"
tools:text="设计模式原理" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="2dp" />
<TextView
android:id="@+id/tv_course_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="@color/widget_text_secondary"
android:textSize="10dp"
tools:text="实验楼 B402" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="1dp" />
<TextView
android:id="@+id/tv_course_teacher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/widget_text_hint"
android:textSize="9dp"
tools:text="张建国 教授" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/widget_root"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/inner_content_card"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/widget_bg_rounded"
android:orientation="vertical"
android:padding="12dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:id="@+id/tv_header_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_primary"
android:textSize="14dp"
android:textStyle="bold"
tools:text="第 8 周 周五" />
<TextView
android:id="@+id/tv_header_count_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:textColor="@color/widget_text_secondary"
android:textSize="11dp"
tools:text="今日还有 3 节课" />
</RelativeLayout>
<LinearLayout
android:id="@+id/container_courses"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:visibility="visible">
<include layout="@layout/widget_item_course_list_node" />
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/widget_divider"
android:alpha="0.2" />
<include layout="@layout/widget_item_course_list_node" />
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/widget_divider"
android:alpha="0.2" />
<include layout="@layout/widget_item_course_list_node" />
</LinearLayout>
<LinearLayout
android:id="@+id/container_status"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/tv_status_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_secondary"
android:textSize="13dp"
tools:text="今日课程已结束" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/container_full_status"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/widget_bg_rounded"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/tv_full_status_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_primary"
android:textSize="16dp"
android:textStyle="bold"
tools:text="假期中" />
<TextView
android:id="@+id/tv_full_status_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="@color/widget_text_secondary"
android:textSize="12dp"
tools:text="期待新学期" />
</LinearLayout>
</FrameLayout>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget_loading_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:background="@drawable/widget_loading_background">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="正在加载课程..."
android:textColor="@color/loading_text_color" />
</LinearLayout>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bubble_bg"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/bubble_bg_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/widget_shape_circle_base" /> </FrameLayout>
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/widget_root"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/inner_content_card"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/widget_bg_rounded"
android:orientation="vertical"
android:padding="14dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/container_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toStartOf="@+id/bubble_frame"
android:orientation="vertical"
tools:visibility="visible">
<TextView
android:id="@+id/tv_course_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/widget_text_primary"
android:textSize="14dp"
android:textStyle="bold"
tools:text="计算机网络" />
<TextView
android:id="@+id/tv_course_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:textColor="@color/widget_text_secondary"
android:textSize="12dp"
tools:text="08:30 - 23:59" />
<TextView
android:id="@+id/tv_course_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/widget_text_hint"
android:textSize="12dp"
tools:text="实验楼 402" />
</LinearLayout>
<FrameLayout
android:id="@+id/bubble_frame"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
tools:visibility="visible">
<include layout="@layout/widget_tiny_circle" />
<TextView
android:id="@+id/tv_remaining_count"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="@color/widget_text_primary"
android:textSize="11dp"
android:textStyle="bold"
tools:text="1" />
</FrameLayout>
<LinearLayout
android:id="@+id/container_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<TextView
android:id="@+id/tv_status_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_primary"
android:textSize="15dp"
android:textStyle="bold"
tools:text="假期中" />
<TextView
android:id="@+id/tv_status_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:textColor="@color/widget_text_secondary"
android:textSize="11dp"
tools:text="期待新学期" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/widget_root"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/inner_content_card"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/widget_bg_rounded"
android:orientation="vertical"
android:padding="14dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_header_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_secondary"
android:textSize="11dp"
android:textStyle="bold"
tools:text="周三" />
<LinearLayout
android:layout_width="8dp"
android:layout_height="wrap_content"
android:orientation="horizontal" />
<TextView
android:id="@+id/tv_footer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_hint"
android:textSize="8dp"
tools:text="剩余 3 节" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal" />
<TextView
android:id="@+id/tv_current_week"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_secondary"
android:textSize="10dp"
tools:text="第 18 周" />
</LinearLayout>
<LinearLayout
android:id="@+id/container_courses"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="vertical">
<include layout="@layout/widget_item_course_common" />
<include layout="@layout/widget_item_course_common" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/container_status"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">
<TextView
android:id="@+id/tv_status_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_primary"
android:textSize="16dp"
android:textStyle="bold"
tools:text="今日课程已结束" />
</LinearLayout>
<LinearLayout
android:id="@+id/container_full_status"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/widget_bg_rounded"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone"
android:padding="14dp">
<FrameLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" />
<TextView
android:id="@+id/tv_full_status_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widget_text_primary"
android:textSize="18dp"
android:textStyle="bold"
tools:text="假期中" />
<TextView
android:id="@+id/tv_full_status_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="@color/widget_text_secondary"
android:textSize="13dp"
tools:text="期待新学期" />
<FrameLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" />
</LinearLayout>
</RelativeLayout>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@@ -0,0 +1 @@
unqualifiedResLocale=zh-CN
@@ -0,0 +1,572 @@
<resources>
<!-- Basic App Information -->
<string name="app_name">Shiguang Schedule</string>
<!-- Common Buttons and Messages -->
<string name="action_confirm">Confirm</string>
<string name="action_cancel">Cancel</string>
<string name="a11y_save">Save</string>
<string name="a11y_delete">Delete</string>
<string name="a11y_edit">Edit</string>
<string name="a11y_back">Back</string>
<string name="action_add">Add</string>
<string name="action_next_step">Next</string>
<string name="title_loading">Loading...</string>
<string name="text_error">Error</string>
<string name="label_none">None</string>
<string name="action_select_all">Select all</string>
<string name="action_deselect_all">Deselect All</string>
<string name="a11y_state_selected">Selected</string>
<string name="a11y_state_not_selected">Not selected</string>
<string name="confirm_delete">Confirm Delete</string>
<string name="common_dialog_title_abandon_changes">Discard changes?</string>
<string name="common_dialog_msg_unsaved_changes">You have unsaved changes. Are you sure you want to exit and lose them?</string>
<string name="common_action_exit_without_save">Exit</string>
<string name="common_action_continue_editing">Keep editing</string>
<string name="label_recent_visit">Recent Visit</string>
<!-- Main Interface and Today's Schedule -->
<string name="action_reset">Reset</string>
<string name="floating_course_hint">Suspended. Swipe weeks and tap a blank space to drop.</string>
<string name="nav_today_schedule">Today</string>
<string name="nav_course_schedule">Schedule</string>
<string name="nav_settings">Settings</string>
<string name="title_today_schedule">Today\'s schedule</string>
<string name="text_no_courses_today">No courses today</string>
<string name="title_vacation_until_start">Vacation (%1$s days left)</string>
<string name="title_semester_not_set">Please set semester start date</string>
<string name="date_format_year_month_day">MMM d, yyyy</string>
<!-- Add Course -->
<string name="toast_save_success">Saved successfully</string>
<string name="toast_delete_success">Deleted successfully</string>
<string name="title_edit_course">Edit course</string>
<string name="title_add_course">Add course</string>
<string name="label_course_name">Course name*</string>
<string name="toast_name_empty">Course name cannot be empty</string>
<string name="label_teacher">Instructor</string>
<string name="label_position">Location</string>
<string name="label_course_time">Class time</string>
<string name="label_day_of_week">Day of week</string>
<string name="label_start_section">Start period</string>
<string name="label_end_section">End period</string>
<string name="toast_time_invalid">Start period cannot be greater than end period</string>
<string name="label_course_weeks">Course weeks</string>
<string name="action_single_week">Odd weeks</string>
<string name="action_double_week">Even weeks</string>
<string name="label_course_color">Course color</string>
<string name="button_select_color">Select color</string>
<string name="snackbar_add_course_within_semester">Please add or adjust courses during the semester</string>
<string name="label_section_range_suffix">Period(s)</string>
<string name="title_select_time">Select class time</string>
<string name="button_select_weeks">Select weeks</string>
<string name="text_weeks_selected">Selected: %1$s</string>
<string name="title_select_weeks">Select course weeks</string>
<string name="title_select_color">Select course color</string>
<string name="a11y_color_selected">Selected</string>
<string name="label_custom_time_range">Custom Time Range</string>
<string name="label_select_custom_time">Select Custom Time</string>
<string name="toast_custom_time_empty">Start time or end time cannot be empty</string>
<string name="label_custom_time">Custom Time</string>
<string name="label_start_time">Start Time</string>
<string name="label_end_time">End Time</string>
<!-- Course Related -->
<string name="label_remark">Remark</string>
<string name="course_time_description">Time: Period %1$s-%2$s (%3$s-%4$s)</string>
<string name="course_position_prefix">Location: %1$s</string>
<string name="course_teacher_prefix">Instructor: %1$s</string>
<string name="title_course_overlap">Overlapping Courses</string>
<string name="label_courses_overlap">%d overlapping</string>
<string name="course_time_sections_count">(%1$s periods)</string>
<string name="title_select_week">Select week</string>
<string name="title_current_week">Week %1$s</string>
<string name="title_vacation">On vacation</string>
<string name="status_semester_ended">Semester ended %d days ago</string>
<string name="status_week_calc_error">Week calculation error</string>
<!-- Time and Day Formats -->
<string-array name="week_days_short_names">
<item>MON</item>
<item>TUE</item>
<item>WED</item>
<item>THU</item>
<item>FRI</item>
<item>SAT</item>
<item>SUN</item>
</string-array>
<string-array name="week_days_full_names">
<item>Monday</item>
<item>Tuesday</item>
<item>Wednesday</item>
<item>Thursday</item>
<item>Friday</item>
<item>Saturday</item>
<item>Sunday</item>
</string-array>
<!-- Notifications and Alarms -->
<string name="format_week_display">Wk %1$d</string>
<string name="notification_channel_desc_course_alert">Course reminder notifications</string>
<string name="notification_title_course_alert">Class reminder</string>
<string name="item_auto_mode">Auto mode during class</string>
<string name="text_auto_mode_dependency">Requires \"Course reminders\" to be enabled</string>
<string name="toast_enable_reminder_first">Please enable \"Course reminders\" first</string>
<string name="alarm_option_none">No reminder</string>
<string name="alarm_option_on_time">On time</string>
<string name="notification_live_status_preparing">Pre-class</string>
<string name="notification_unknown_course">Unknown Course</string>
<string name="notification_unknown_position">Unknown Location</string>
<!-- Widget Related -->
<string name="widget_name_tiny">Tiny 2x1</string>
<string name="widget_name_compact">Compact 2x2</string>
<string name="widget_name_double_days">Recent Days 4x2</string>
<string name="widget_name_list_vertical">Vertical Course List 4xN</string>
<string name="widget_tomorrow_course_preview">Tomorrow</string>
<string name="widget_no_courses_tomorrow">No courses tomorrow</string>
<string name="widget_today_courses_finished">Today\'s classes ended.</string>
<string name="widget_vacation_expecting">Looking forward to new semester</string>
<string name="widget_remaining_courses_format_today">%1$d courses left today</string>
<string name="widget_remaining_courses_format_tomorrow">%1$d courses tomorrow</string>
<string name="widget_title_today">Today</string>
<string name="widget_title_tomorrow">Tomorrow</string>
<!-- Notification Settings -->
<string name="widget_course_total_count">%1$d total</string>
<string name="title_course_notification_settings">Course reminder settings</string>
<string name="section_title_general">General</string>
<string name="section_title_advanced">Advanced</string>
<string name="text_permission_importance_title">Permissions are crucial for Android reminders.</string>
<string name="text_permission_importance_detail">To ensure timely reminders, you need to:\n1. Grant exact alarm permission (Android 12+)\n2. Enable app auto-start\n3. Disable battery optimization\n4. Grant Do Not Disturb permission (for auto mode)\n\nPlease manually enable these permissions in the settings below.</string>
<string name="item_course_reminder">Course reminders</string>
<string name="item_remind_time_before">Remind before</string>
<string name="remind_time_minutes_format">%1$s minutes</string>
<string name="item_exact_alarm_permission">Exact alarm permission</string>
<string name="item_dnd_permission">Do Not Disturb permission</string>
<string name="status_enabled">Enabled</string>
<string name="status_disabled">Disabled</string>
<string name="status_authorized">Authorized</string>
<string name="status_unauthorized">Unauthorized</string>
<string name="item_background_and_autostart">Background run &amp; Auto-start</string>
<string name="item_ignore_battery_optimization">Ignore battery optimization</string>
<string name="section_title_skip_dates">Skip dates feature</string>
<string name="text_skip_dates_experimental">Experimental feature, not guaranteed to work</string>
<string name="item_update_holiday_info">Update holiday information</string>
<string name="update_holiday_info_hint">May be unstable (holiday info usually published at year-end)</string>
<string name="item_clear_skipped_dates">Clear skipped dates</string>
<string name="item_view_skipped_dates">View skipped dates</string>
<string name="skipped_dates_count_format">%1$d dates</string>
<string name="skipped_dates_none">None</string>
<string name="toast_holidays_update_success">Holiday information updated successfully!</string>
<string name="toast_update_failed">Update failed: %1$s</string>
<string name="toast_clear_success">All skipped dates cleared!</string>
<string name="toast_clear_failed">Clear failed: %1$s</string>
<string name="dialog_title_auto_mode_selection">Select auto mode</string>
<string name="auto_mode_dnd_permission_warning">(Missing DND permission, DND/Silent may not work)</string>
<string name="dialog_title_set_remind_time">Set reminder time</string>
<string name="label_minutes_input">Minutes</string>
<string name="error_input_empty">Please enter minutes</string>
<string name="error_input_range">Please enter a number between 0 and 60</string>
<string name="dialog_title_exact_alarm_permission">Exact alarm permission needed</string>
<string name="dialog_text_exact_alarm_permission">To ensure reminders arrive on time, please grant exact alarm permission.</string>
<string name="action_go_to_settings">Go to settings</string>
<string name="dialog_title_clear_confirmation">Confirm clear</string>
<string name="dialog_text_clear_confirmation">This will permanently delete all skipped dates and cannot be undone. Continue?</string>
<string name="dialog_title_dnd_permission">Do not disturb permission needed</string>
<string name="dialog_text_dnd_permission">To enable auto mode during class, please grant Do Not Disturb permission.</string>
<string name="auto_mode_off">Off</string>
<string name="auto_mode_dnd">Do not disturb (DND)</string>
<string name="auto_mode_silent">Silent mode</string>
<string name="dialog_title_view_skipped_dates">Skipped reminder dates</string>
<string name="text_no_skipped_dates">No skipped dates set.</string>
<string name="action_close">Close</string>
<string name="toast_notification_permission_denied">Notification permission denied, cannot receive course reminders.</string>
<string name="item_compat_wearable_sync">Wearable Sync Compatibility</string>
<string name="desc_compat_wearable_sync">Android 16\'s dynamic notification updates conflict with some wearable sync apps. Enabling this will improve compatibility but disable real-time "Ongoing" update effects.</string>
<!-- Settings Options -->
<string name="title_schedule_settings">Schedule settings</string>
<string name="section_title_general_settings">General settings</string>
<string name="item_show_weekends">Show weekends</string>
<string name="item_show_non_current_week">Show non-current week courses</string>
<string name="desc_show_non_current_week">Display courses that are outside of the current week in the schedule</string>
<string name="desc_show_weekends">When enabled, weekend courses will be displayed</string>
<string name="item_set_start_date">Set semester start date</string>
<string name="desc_set_start_date">Select Monday of the first week (as per academic system)</string>
<string name="status_not_set">Not set</string>
<string name="item_total_weeks">Total weeks</string>
<string name="desc_total_weeks">Set total number of weeks in semester</string>
<string name="status_total_weeks_format">%1$d weeks</string>
<string name="item_current_week">Current week</string>
<string name="desc_current_week_manual">Manually adjust current week</string>
<string name="status_set_start_date_first">Please set start date first</string>
<string name="status_current_week_format">Week %1$d</string>
<string name="item_first_day_of_week">Week starts on</string>
<string name="desc_first_day_of_week">Set which day the week starts on</string>
<string name="day_of_week_monday">Monday</string>
<string name="day_of_week_sunday">Sunday</string>
<string name="item_schedule_tweak">Schedule adjustment</string>
<string name="desc_schedule_tweak">Move all courses from one date to another</string>
<string name="section_title_advanced_features">Advanced features</string>
<string name="item_course_conversion">Import/Export schedule</string>
<string name="desc_course_conversion">Supports file, academic affairs import and sync</string>
<string name="desc_notification_settings">Manage course reminder notifications</string>
<string name="desc_manage_course_tables">Manage multiple schedules, switch or delete</string>
<string name="item_time_slot_customization">Custom time periods</string>
<string name="desc_time_slot_customization">Edit course time period settings</string>
<string name="item_more_options">More</string>
<string name="desc_more_options">Additional information and options</string>
<string name="a11y_more_options">More options</string>
<string name="dialog_title_select_total_weeks">Select total weeks</string>
<string name="dialog_title_manual_set_week">Manually set current week</string>
<string name="dialog_title_set_first_day_of_week">Set week start day</string>
<string name="text_no_course_tables">No schedules available</string>
<string name="course_table_id_prefix">ID: %s</string>
<string name="course_table_created_at_prefix">Created: %s</string>
<string name="label_current">Current</string>
<!-- Manage Course Tables -->
<string name="title_manage_course_tables">Manage schedules</string>
<string name="dialog_title_add_table">Add new schedule</string>
<string name="a11y_add_new_table">Add new schedule</string>
<string name="label_table_name">Schedule name</string>
<string name="text_no_tables_hint">No schedules yet, tap the button below to add one.</string>
<string name="toast_switch_table_success">Switched to schedule: %1$s</string>
<string name="toast_add_table_success">Schedule \'%1$s\' added</string>
<string name="dialog_title_edit_table">Edit schedule name</string>
<string name="toast_edit_table_success">Schedule name updated</string>
<string name="dialog_text_confirm_delete">Are you sure you want to delete schedule \'%1$s\'? This cannot be undone.</string>
<string name="toast_delete_table_success">%1$s deleted</string>
<string name="toast_delete_last_table_failed">Cannot delete the last schedule</string>
<string name="a11y_current_table">Current schedule</string>
<string name="item_course_management">Course Management</string>
<string name="desc_course_management">View and edit all courses by name</string>
<!-- Course Management -->
<string name="title_selected_items_count">%1$d items selected</string>
<string name="text_no_unique_courses_hint">No course data available in the current schedule</string>
<string name="a11y_cancel_selection">Cancel multiple selection</string>
<string name="a11y_exit_selection_mode">Exit selection mode</string>
<string name="a11y_enter_selection_mode">Enter selection mode</string>
<string name="a11y_not_selected">Not selected</string>
<string name="label_weeks_format">Weeks: %1$s</string>
<!-- Time Slot Management -->
<string name="title_time_slot_management">Time period management</string>
<string name="a11y_add_time_slot">Add time period</string>
<string name="a11y_save_all_settings">Save all settings</string>
<string name="toast_settings_saved">All settings saved to database</string>
<string name="title_default_duration_settings">Default duration settings</string>
<string name="label_class_duration_minutes">Class duration (minutes)</string>
<string name="toast_class_duration_positive">Class duration must be greater than 0 minutes</string>
<string name="label_break_duration_minutes">Break duration (minutes)</string>
<string name="toast_break_duration_non_negative">Break duration cannot be negative</string>
<string name="text_no_time_slots_hint">No time periods yet. Tap the \'+\' icon to add one.</string>
<string name="toast_slot_removed_unsaved">Time period removed from list, tap save to update database</string>
<string name="time_slot_section_number">Period %1$s</string>
<string name="a11y_delete_time_slot">Delete time period</string>
<string name="dialog_title_edit_time_slot">Edit time period</string>
<string name="dialog_title_add_time_slot">Add new time period</string>
<string name="label_time_picker_start">Start</string>
<string name="label_time_picker_end">End</string>
<string name="label_time_picker_hour">Hour</string>
<string name="label_time_picker_minute">Minute</string>
<string name="action_save_changes">Save changes</string>
<string name="toast_end_time_must_be_later">End time must be later than start time</string>
<string name="toast_slot_modified_unsaved">Time period modified, tap save to update database</string>
<string name="toast_slot_added_unsaved">Time period added to list, tap save to update database</string>
<!-- Import/Export Schedule -->
<string name="label_time_slot_alias">Alias (Optional)</string>
<string name="toast_time_conflict">The selected time exceeds the limits of the adjacent class periods</string>
<string name="title_conversion">Import/Export schedule</string>
<string name="section_file_conversion">File import/export</string>
<string name="item_import_course_file">Import course file</string>
<string name="desc_import_json">Import JSON file</string>
<string name="item_export_course_file">Export course file</string>
<string name="desc_export_json_with_config">Export JSON course file with time period configuration</string>
<string name="item_export_ics_file">Export calendar file</string>
<string name="desc_export_ics_with_alarm">Export ICS file with specified reminder time</string>
<string name="section_school_import">Academic system import</string>
<string name="item_school_system_import">Import from academic system</string>
<string name="desc_school_import_quick">Import courses from academic system, quick and easy</string>
<string name="dialog_title_select_import_table">Select target schedule for import</string>
<string name="dialog_title_select_export_table">Select schedule to export</string>
<string name="dialog_title_ics_export_settings">Calendar export settings</string>
<string name="label_select_alarm_time">Select reminder time:</string>
<string name="a11y_import">Import</string>
<string name="a11y_export">Export</string>
<string name="a11y_details">Details</string>
<string name="snackbar_cannot_open_file">Cannot open file.</string>
<string name="snackbar_file_selection_canceled">File selection canceled.</string>
<string name="snackbar_cannot_save_file">Cannot save file.</string>
<string name="snackbar_file_save_canceled">File save canceled.</string>
<string name="dialog_title_file_saved">File saved</string>
<string name="dialog_text_file_saved_share_prompt">File successfully exported to Downloads folder. Would you like to share it?</string>
<string name="snackbar_file_copy_failed_for_share">File copy failed, cannot share.</string>
<string name="action_share">Share</string>
<string name="toast_import_success">Schedule imported successfully!</string>
<string name="toast_ics_export_success">Calendar file exported successfully!</string>
<string name="error_export_table_not_found">Export failed: Schedule not found</string>
<string name="error_export_failed">Export failed: %1$s</string>
<string name="error_import_failed">Import failed: %1$s</string>
<string name="error_ics_export_data_failed">Calendar export failed: Failed to get data</string>
<string name="error_ics_export_failed">Calendar export failed: %1$s</string>
<!-- More Settings -->
<string name="section_sync">Sync</string>
<string name="item_sync_to_system_calendar">Sync to System Calendar</string>
<string name="desc_sync_to_system_calendar">Sync the current schedule to your phone\\\'s system calendar with one click</string>
<string name="toast_sync_calendar_success">Synced successfully</string>
<string name="error_sync_calendar_failed">Sync failed. Please check calendar permissions.</string>
<string name="title_more_options">More</string>
<string name="a11y_app_icon">App icon</string>
<string name="a11y_navigate">Navigate</string>
<string name="a11y_acknowledgment">Acknowledgment</string>
<string name="label_special_thanks">Special thanks</string>
<string name="text_acknowledgment_body">Heartfelt thanks to every developer who contributed to this app and the academic system adapter repository. Your dedication drives continuous improvement!</string>
<string name="item_github_repo">Project GitHub repository</string>
<string name="item_open_source_licenses">View open source licenses</string>
<string name="title_open_source_licenses">Open source licenses</string>
<string name="item_update_repo">Update academic adapter repository</string>
<string name="item_contributors">Contributors list</string>
<string name="label_version_prefix">Version: %1$s</string>
<string name="default_app_name">Unknown app</string>
<string name="item_check_software_update">Check for Software Updates</string>
<string name="item_language_settings">Language Settings</string>
<string name="language_follow_system">Follow System</string>
<string name="dialog_checking_update">Checking for update...</string>
<string name="tip_please_wait">Connecting to server, please wait.</string>
<string name="dialog_new_version_found">New version found %s</string>
<string name="dialog_current_version_latest">Current version is the latest</string>
<string name="dialog_update_check_failed">Update check failed</string>
<string name="label_error_message">Error message: %s</string>
<string name="btn_download_update">Download update</string>
<string name="btn_update_now">Update now</string>
<string name="tip_non_mandatory_update">Tip: The cancel button is not shown for mandatory updates.</string>
<string name="dialog_select_update_channel">Select update channel</string>
<string name="a11y_selected">Selected</string>
<string name="item_start_screen_settings">Startup Page Settings</string>
<string name="dialog_select_start_screen">Select default startup page</string>
<!-- Schedule Adjustment -->
<string name="title_tweak_schedule">Schedule adjustment</string>
<string name="a11y_save_tweak">Save schedule adjustment</string>
<string name="label_select_tweak_table">Select schedule to adjust</string>
<string name="action_select_table">Select schedule</string>
<string name="label_tweak_from_date">Original date</string>
<string name="label_tweak_to_date">New date</string>
<string name="text_tweak_hint">Please confirm the course information for both dates, then tap save to complete the adjustment.</string>
<string name="title_tweak_from_course">Courses to move</string>
<string name="a11y_arrow">Arrow</string>
<string name="title_tweak_to_course">Destination date courses</string>
<string name="text_no_course">No courses</string>
<string name="error_tweak_no_table_or_semester">Please select a schedule and set semester start date first</string>
<string name="error_tweak_same_day">Original and new dates cannot be the same</string>
<string name="toast_tweak_success">Schedule adjusted successfully!</string>
<string name="error_tweak_failed">Schedule adjustment failed: %1$s</string>
<string name="course_time_day_section_details_tweak">%1$s | Periods %2$s-%3$s</string>
<string name="course_time_day_time_details_tweak">%1$s | Time: %2$s - %3$s</string>
<string name="tweak_mode_merge">Merge (A + B)</string>
<string name="tweak_mode_overwrite">Overwrite (A → B)</string>
<string name="tweak_mode_exchange">Exchange (A ↔ B)</string>
<!-- Academic System Import -->
<string name="title_select_school">Select school</string>
<string name="search_hint_school">Search school name or initials</string>
<string name="text_no_adapter_for_category">No adapters available for this category, please select another or check data source.</string>
<string name="text_no_school_found">No matching schools found</string>
<string name="a11y_search">Search</string>
<string name="a11y_clear_search">Clear search</string>
<string name="a11y_school_icon">School icon</string>
<string name="category_bachelor_associate">Undergraduate/Associate</string>
<string name="category_postgraduate">Postgraduate</string>
<string name="category_general_tool">General tools</string>
<string name="category_other">Other</string>
<string name="a11y_back_to_school_list">Back to school list</string>
<string name="text_no_detailed_description">No detailed description.</string>
<string name="label_contributor_unknown">Unknown</string>
<string name="label_contributor_format">Contributor: %1$s</string>
<string name="text_no_adapter_for_category_school">No adapter available for this school in \"%1$s\" category.</string>
<string name="title_enter_url">Enter URL</string>
<string name="a11y_cancel_editing">Cancel editing</string>
<string name="placeholder_enter_url_full">Enter URL (https://...)</string>
<string name="a11y_load">Load</string>
<string name="a11y_enter_url">Enter URL</string>
<string name="action_refresh">Refresh</string>
<string name="a11y_refresh">Refresh</string>
<string name="action_switch_to_phone_mode">Switch to mobile mode</string>
<string name="action_switch_to_desktop_mode">Switch to desktop mode</string>
<string name="toast_switched_to_desktop">Switched to desktop mode</string>
<string name="toast_switched_to_phone">Switched to mobile mode</string>
<string name="toast_url_empty_enter_first">URL is empty, please enter a URL first.</string>
<string name="item_devtools_debug">DevTools web debugging</string>
<string name="a11y_devtools">DevTools</string>
<string name="toast_devtools_enabled_format">DevTools web debugging %1$s.</string>
<string name="text_import_guide">Please log in to the academic system and navigate to a page showing the schedule before importing. Tap \"More\" for additional options</string>
<string name="action_execute_import">Execute import</string>
<string name="toast_no_script_manual_import">This adapter has no script, please import manually.</string>
<string name="dialog_title_select_table_for_import">Select a schedule to import courses</string>
<string name="toast_executing_import_script">Executing import script...</string>
<string name="toast_import_script_not_found">Import script file not found: %1$s</string>
<string name="toast_load_import_script_failed">Failed to load import script: %1$s</string>
<string name="toast_no_import_script">This adapter has no import script</string>
<string name="toast_import_script_finished">Import script completed, returning to schedule page.</string>
<string name="dialog_ssl_error_title">SSL Certificate Error</string>
<string name="dialog_ssl_error_message">SSL certificate verification failed, which may indicate an insecure connection. Continue browsing?</string>
<string name="action_continue_browsing">Continue</string>
<string name="toast_ssl_error_cancelled">SSL certificate verification failed, connection canceled.</string>
<string name="toast_web_load_error_format">Web page load error: %1$s</string>
<!-- Contributors List -->
<string name="title_contribution_list">Contributors</string>
<string name="tab_adapter_development">Academic adapters</string>
<string name="tab_app_development">App development</string>
<string name="text_no_contributors">No contributor information for this category.</string>
<string name="text_loading_failed">Loading failed: %1$s</string>
<string name="action_retry">Retry</string>
<string name="label_github">GitHub</string>
<string name="a11y_back_to_previous">Back to previous</string>
<string name="a11y_contributor_avatar">Contributor avatar: %1$s</string>
<!-- Academic Adapter Repository -->
<string name="title_update_repo_screen">Update academic adapter repository</string>
<string name="label_select_repo">Select repository</string>
<string name="text_select_repo_hint">Please select repository</string>
<string name="action_update">Update</string>
<string name="action_updating">Updating...</string>
<string name="label_repo_url">Repository URL</string>
<string name="label_repo_branch">Branch</string>
<string name="label_private_repo_credentials">Private repository credentials (Username/Token)</string>
<string name="label_username_or_token_key">Username or token key</string>
<string name="label_password_or_token_value">Password or token value</string>
<string name="title_update_log">Update log</string>
<!-- Color Picker -->
<string name="color_picker_title_edit">Adjust Color</string>
<string name="color_picker_title_precise">Precise Values</string>
<string name="color_picker_mode_visual">Slider Mode</string>
<string name="color_picker_mode_input">Digital Mode</string>
<string name="color_picker_label_hue">Hue</string>
<string name="color_picker_label_saturation">Saturation</string>
<string name="color_picker_label_value">Value</string>
<string name="color_picker_label_alpha">Alpha</string>
<string name="a11y_switch_color_mode">Switch input mode</string>
<!-- Personalization -->
<string name="item_personalization">Personalization</string>
<string name="desc_personalization">Adjust schedule grid height, corner radius, spacing, and opacity</string>
<string name="style_category_interface">Interface</string>
<string name="style_category_grid_size">Grid Size</string>
<string name="style_category_course_block">Course Block Settings</string>
<string name="style_category_color_scheme">Color Scheme (Tap circle to edit)</string>
<string name="label_wallpaper">Schedule Wallpaper</string>
<string name="desc_wallpaper_set">Set (Long press to clear)</string>
<string name="desc_wallpaper_unset">Not set (Tap to select image)</string>
<string name="label_hide_section_time">Hide specific section times</string>
<string name="label_hide_date_under_day">Hide date (below day of week)</string>
<string name="label_hide_grid_lines">Hide Grid Lines</string>
<string name="label_show_start_time">Show start time on course cells</string>
<string name="label_section_height">Grid Height</string>
<string name="label_time_column_width">Sidebar Width</string>
<string name="label_day_header_height">Top Header Height</string>
<string name="label_hide_location">Hide Location</string>
<string name="label_hide_teacher">Hide Teacher</string>
<string name="label_remove_location_at">Remove @ symbol before location</string>
<string name="label_font_scale">Font Scale</string>
<string name="label_corner_radius">Corner Radius</string>
<string name="label_inner_padding">Inner Padding</string>
<string name="label_outer_padding">Outer Spacing</string>
<string name="label_opacity">Opacity</string>
<string name="title_light_color_pool">Light Mode Color Pool</string>
<string name="title_dark_color_pool">Dark Mode Color Pool</string>
<string name="preview_light_mode">Light Mode Preview\nFixed dark text</string>
<string name="preview_dark_mode">Dark Mode Preview\nFixed light text</string>
<string name="action_reset_style">Reset to default style</string>
<string name="dialog_reset_title">Reset Style</string>
<string name="dialog_reset_message">Are you sure you want to reset all style settings to default? This action cannot be undone.</string>
<string name="action_confirm_crop">Confirm Crop</string>
<string name="label_text_align_center_h">Horizontal Center</string>
<string name="label_text_align_center_v">Vertical Center</string>
<string name="label_border_type">Border Style</string>
<string name="border_type_solid">Solid</string>
<string name="border_type_dashed">Dashed</string>
<string name="label_range">Range</string>
<string name="placeholder_input_value">Enter value</string>
<!-- Quick Actions -->
<string name="label_course_text_color">Course block text color</string>
<string name="label_schedule_mode_24h">24-Hour Timeline Mode</string>
<string name="item_quick_actions">Quick Actions</string>
<string name="desc_quick_actions">Includes schedule tweaks, temporary changes, etc.</string>
<string name="label_quick_action_category_schedule">Schedule Adjustments</string>
<string name="item_quick_delete">Quick Delete Courses</string>
<string name="quick_delete_subtitle">Batch clear schedule by weeks, days, or dates</string>
<!-- Quick Delete Courses -->
<string name="label_dimension_weeks_days">Method 1: By Weeks &amp; Days</string>
<string name="label_dimension_dates">Method 2: By Specific Dates</string>
<string name="hint_no_selection">Please select weeks, days, or dates</string>
<string name="hint_affected_count">%1$d course records will be removed</string>
<string name="dialog_delete_confirm_msg">This action cannot be undone. Affected records will be erased from the selected time points, but basic course info will remain.</string>
<string name="btn_add_date">Add Date</string>
<string name="quick_delete_filter_weeks_days_hint">Set recurring weeks &amp; days (Optional)</string>
<string name="quick_delete_filter_date_range_hint">Set specific date range (Optional)</string>
<string name="quick_delete_label_days_prefix">Days: %1$s</string>
<string name="quick_delete_dialog_select_date_title">Select Date Range</string>
<string name="quick_delete_success">Schedule cleared successfully</string>
<string name="error_load_failed">Failed to initialize, please try again</string>
<string name="error_op_failed">Operation failed: %1$s</string>
<string name="theme_follow_system">Follow System</string>
<string name="theme_light">Light Mode</string>
<string name="theme_dark">Dark Mode</string>
<string name="theme_settings_title">Theme Settings</string>
<string name="theme_mode_label">Theme Mode</string>
<string name="dynamic_color_title">Dynamic Color (Material You)</string>
<string name="dynamic_color_desc">Generate color schemes based on system wallpaper (Android 12+ only)</string>
<string name="custom_color_title">Custom Primary Color</string>
<string name="light_primary_color">Light Primary Color</string>
<string name="dark_primary_color">Dark Primary Color</string>
<string name="theme_color_hint">Note: After changing this color, the system will use it as a seed color to recalculate the entire app\\\'s color scheme.</string>
<string name="label_page_text_color">Schedule text color</string>
<string name="widget_course_remaining_count">%1$d left</string>
<string name="backup_err_empty">The backup file is empty and cannot be restored</string>
<string name="backup_err_corrupted">Failed to parse file; the data may be corrupted</string>
<string name="backup_err_version_too_new">This backup version is too new. Please upgrade the app and try again</string>
<string name="item_backup_restore">Backup &amp; Restore</string>
<string name="desc_backup_restore">Supports multi-channel backup via cloud drives and local files to secure your schedule data</string>
<string name="section_data_maintenance">Data Maintenance</string>
<string name="item_backup_data">Backup Data</string>
<string name="desc_backup_data">Pack and save your current schedule and configurations</string>
<string name="item_restore_data">Restore Data</string>
<string name="desc_restore_data">Download and overwrite local schedule and config data</string>
<string name="section_service_config">Service Configuration</string>
<string name="item_webdav_config">WebDAV Configuration</string>
<string name="desc_webdav_unconfigured">Cloud drive connection not configured</string>
<string name="desc_webdav_connected">Connected: %1$s</string>
<string name="dialog_title_backup_target">Select Backup Destination</string>
<string name="dialog_title_restore_source">Select Restore Source</string>
<string name="dialog_title_config_webdav">Configure WebDAV</string>
<string name="label_webdav_url">Server Address (URL)</string>
<string name="label_webdav_account">Account</string>
<string name="label_webdav_pwd_saved">Password saved (leave blank to keep unchanged)</string>
<string name="label_webdav_pwd_empty">App-specific password</string>
<string name="label_webdav_path">Cloud Backup Path</string>
<string name="desc_webdav_path_hint">Actual data will be isolated and saved in the /Backup folder under this directory</string>
<string name="toast_operation_success">Operation completed successfully</string>
<string name="toast_operation_failed">Operation failed: %1$s</string>
<string name="error_webdav_unconfigured">Please configure the WebDAV service first</string>
<string name="error_stream_open_failed">Cannot open data stream</string>
<string name="backup_err_connect_failed">Connection failed. Please check your configuration or network</string>
<string name="backup_err_upload_failed">Failed to upload file</string>
<string name="backup_err_download_failed">Failed to download backup</string>
<string name="backup_err_local_export_failed">Local export failed</string>
<string name="backup_err_restore_failed_prefix">Restore failed: %1$s</string>
<string name="backup_target_webdav">WebDAV Cloud Sync</string>
<string name="backup_target_local_zip">Local ZIP File</string>
</resources>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="loading_text_color">#FFFFFFFF</color>
<color name="widget_bg">#141218</color> # 深色背景:使用深灰色,避免纯黑拖影
<color name="widget_text_primary">#F2F2F7</color> # 主文字:在深色背景下改为接近纯白的亮灰色
<color name="widget_text_secondary">#AEA9AF</color> # 次要文字:中灰色,保持视觉层级
<color name="widget_text_hint">#8E8E93</color> # 提示文字:深灰色,起到弱化作用
<color name="widget_divider">#2C2C2E</color> # 深色分割线:比背景略亮的灰色
<color name="widget_course_fallback">#3A3A3C</color> # 深色模式下的课程指示条兜底色
</resources>
@@ -0,0 +1,575 @@
<resources>
<!-- 应用基础信息 -->
<string name="app_name">拾光课程表</string>
<!-- 通用按钮和提示信息 -->
<string name="action_confirm">确定</string>
<string name="action_cancel">取消</string>
<string name="a11y_save">保存</string>
<string name="a11y_delete">删除</string>
<string name="a11y_edit">编辑</string>
<string name="a11y_back">返回</string>
<string name="action_add">添加</string>
<string name="action_next_step">下一步</string>
<string name="title_loading">加载中...</string>
<string name="text_error">错误</string>
<string name="label_none">无</string>
<string name="action_select_all">全选</string>
<string name="action_deselect_all">取消全选</string>
<string name="a11y_state_selected">已选中</string>
<string name="a11y_state_not_selected">未选中</string>
<string name="confirm_delete">确认删除</string>
<string name="common_dialog_title_abandon_changes">放弃更改?</string>
<string name="common_dialog_msg_unsaved_changes">当前内容已修改,退出将丢失未保存的数据。</string>
<string name="common_action_exit_without_save">退出</string>
<string name="common_action_continue_editing">继续编辑</string>
<string name="label_recent_visit">最近访问</string>
<string name="action_reset">重置</string>
<string name="floating_course_hint">已挂起,左右滑周点击空白处放下</string>
<!-- 主界面及今日课表 -->
<string name="nav_today_schedule">今日课表</string>
<string name="nav_course_schedule">课表</string>
<string name="nav_settings">我的</string>
<string name="title_today_schedule">今日课表</string>
<string name="text_no_courses_today">今天没有课程</string>
<string name="title_vacation_until_start">假期中(距离开学还有%1$s天)</string>
<string name="title_semester_not_set">请设置开学日期</string>
<string name="date_format_year_month_day">yyyy年M月d日</string>
<!-- 添加课程 -->
<string name="toast_save_success">保存成功</string>
<string name="toast_delete_success">删除成功</string>
<string name="title_edit_course">编辑课程</string>
<string name="title_add_course">添加课程</string>
<string name="label_course_name">课程名称*</string>
<string name="toast_name_empty">课程名称不能为空</string>
<string name="label_teacher">教师</string>
<string name="label_position">地点</string>
<string name="label_course_time">上课时间</string>
<string name="label_day_of_week">星期</string>
<string name="label_start_section">开始节次</string>
<string name="label_end_section">结束节次</string>
<string name="toast_time_invalid">开始节次不能大于结束节次</string>
<string name="label_course_weeks">上课周次</string>
<string name="action_single_week">单周</string>
<string name="action_double_week">双周</string>
<string name="label_course_color">课程颜色</string>
<string name="button_select_color">选择颜色</string>
<string name="snackbar_add_course_within_semester">请在教学周期间添加或调整课程</string>
<string name="label_section_range_suffix">节</string>
<string name="title_select_time">选择上课时间</string>
<string name="button_select_weeks">选择周数</string>
<string name="text_weeks_selected">已选: %1$s</string>
<string name="title_select_weeks">选择上课周次</string>
<string name="title_select_color">选择课程颜色</string>
<string name="a11y_color_selected">已选择</string>
<string name="label_custom_time_range">自定义时间段</string>
<string name="label_select_custom_time">选择自定义时间</string>
<string name="toast_custom_time_empty">起始时间或结束时间不能为空</string>
<string name="label_custom_time">自定义时间</string>
<string name="label_start_time">开始时间</string>
<string name="label_end_time">结束时间</string>
<string name="label_remark">备注</string>
<!-- 课程相关 -->
<string name="course_time_description">时间: 第%1$s-%2$s节 (%3$s-%4$s)</string>
<string name="course_position_prefix">地点: %1$s</string>
<string name="course_teacher_prefix">老师: %1$s</string>
<string name="title_course_overlap">重叠课程列表</string>
<string name="label_courses_overlap">%d门重叠</string>
<string name="course_time_sections_count">(%1$s节)</string>
<string name="title_select_week">选择周次</string>
<string name="title_current_week">第 %1$s 周</string>
<string name="title_vacation">假期中</string>
<string name="status_semester_ended">学期已结束 %d 天</string>
<string name="status_week_calc_error">周次计算错误</string>
<!-- 时间与星期格式 -->
<string-array name="week_days_short_names">
<item>一</item>
<item>二</item>
<item>三</item>
<item>四</item>
<item>五</item>
<item>六</item>
<item>日</item>
</string-array>
<string-array name="week_days_full_names">
<item>周一</item>
<item>周二</item>
<item>周三</item>
<item>周四</item>
<item>周五</item>
<item>周六</item>
<item>周日</item>
</string-array>
<string name="format_week_display">%1$d周</string>
<!-- 通知与闹钟 -->
<string name="notification_channel_desc_course_alert">上课提醒通知</string>
<string name="notification_title_course_alert">上课提醒</string>
<string name="item_auto_mode">上课自动模式</string>
<string name="text_auto_mode_dependency">依赖于「课程提醒」的开启</string>
<string name="toast_enable_reminder_first">请先开启「课程提醒」</string>
<string name="alarm_option_none">不提醒</string>
<string name="alarm_option_on_time">准时提醒</string>
<string name="notification_live_status_preparing">准备上课</string>
<string name="notification_unknown_course">未知课程</string>
<string name="notification_unknown_position">地点未知</string>
<!-- 小组件相关 -->
<string name="widget_name_tiny">超小课程2x1</string>
<string name="widget_name_compact">紧凑课程2x2</string>
<string name="widget_name_double_days">近日课程4x2</string>
<string name="widget_name_list_vertical">垂直列表课表4xN</string>
<string name="widget_tomorrow_course_preview">明日预告</string>
<string name="widget_no_courses_tomorrow">明天没有课程</string>
<string name="widget_today_courses_finished">今日课程已结束</string>
<string name="widget_vacation_expecting">期待新学期</string>
<string name="widget_remaining_courses_format_today">今日还有 %1$d 节课</string>
<string name="widget_remaining_courses_format_tomorrow">明天有 %1$d 节课</string>
<string name="widget_title_today">今天</string>
<string name="widget_title_tomorrow">明天</string>
<string name="widget_course_remaining_count">剩余 %1$d 节</string>
<string name="widget_course_total_count">共有 %1$d 节</string>
<!-- 通知设置 -->
<string name="title_course_notification_settings">课程提醒设置</string>
<string name="section_title_general">常规</string>
<string name="section_title_advanced">高级</string>
<string name="text_permission_importance_title">权限设置对于 Android 提醒非常重要</string>
<string name="text_permission_importance_detail">为了确保提醒按时送达,你需要:\n1. 授予精确闹钟权限 (Android 12及以上)\n2. 开启应用的自启动权限\n3. 关闭应用的电池优化功能\n4. 授予勿扰模式权限(用于自动模式切换)\n\n请在下方的设置项中手动开启这些权限。</string>
<string name="item_course_reminder">课程提醒</string>
<string name="item_remind_time_before">提前提醒时间</string>
<string name="remind_time_minutes_format">%1$s 分钟</string>
<string name="item_exact_alarm_permission">精确闹钟权限</string>
<string name="item_dnd_permission">勿扰模式权限</string>
<string name="status_enabled">已开启</string>
<string name="status_disabled">已关闭</string>
<string name="status_authorized">已授权</string>
<string name="status_unauthorized">未授权</string>
<string name="item_background_and_autostart">后台运行和自启</string>
<string name="item_ignore_battery_optimization">忽略电池优化</string>
<string name="section_title_skip_dates">跳过日期功能</string>
<string name="text_skip_dates_experimental">实验性的功能,不保证一定有用</string>
<string name="item_update_holiday_info">更新节假日信息</string>
<string name="update_holiday_info_hint">可能不稳定(一般情况下只有年末才公布下一年的节假日信息)</string>
<string name="item_clear_skipped_dates">清空跳过日期</string>
<string name="item_view_skipped_dates">查看跳过的日期</string>
<string name="skipped_dates_count_format">%1$d 个日期</string>
<string name="skipped_dates_none">无</string>
<string name="toast_holidays_update_success">节假日信息更新成功!</string>
<string name="toast_update_failed">更新失败:%1$s</string>
<string name="toast_clear_success">已清空所有跳过日期!</string>
<string name="toast_clear_failed">清空失败:%1$s</string>
<string name="dialog_title_auto_mode_selection">上课自动模式选择</string>
<string name="auto_mode_dnd_permission_warning">(缺少勿扰权限,启用勿扰/静音可能无效)</string>
<string name="dialog_title_set_remind_time">设置提前提醒时间</string>
<string name="label_minutes_input">分钟数</string>
<string name="error_input_empty">请输入分钟数</string>
<string name="error_input_range">请输入 0 到 60 之间的数字</string>
<string name="dialog_title_exact_alarm_permission">需要精确闹钟权限</string>
<string name="dialog_text_exact_alarm_permission">为了确保提醒能在准确时间送达,请授予精确闹钟权限。</string>
<string name="action_go_to_settings">去设置</string>
<string name="dialog_title_clear_confirmation">确认清空</string>
<string name="dialog_text_clear_confirmation">这会永久清除所有跳过的日期,无法恢复。确定要继续吗?</string>
<string name="dialog_title_dnd_permission">需要勿扰模式权限</string>
<string name="dialog_text_dnd_permission">为了启用上课自动模式,请授予应用访问勿扰模式设置的权限。</string>
<string name="auto_mode_off">关闭</string>
<string name="auto_mode_dnd">勿扰模式 (DND)</string>
<string name="auto_mode_silent">静音模式 (SILENT)</string>
<string name="dialog_title_view_skipped_dates">跳过的提醒日期</string>
<string name="text_no_skipped_dates">没有设置跳过的日期。</string>
<string name="action_close">关闭</string>
<string name="toast_notification_permission_denied">通知权限被拒绝,无法接收课程提醒。</string>
<string name="item_compat_wearable_sync">兼容穿戴设备同步通知</string>
<string name="desc_compat_wearable_sync">因 Android 16 实时通知属性与部分穿戴设备通知同步软件存在兼容性冲突,开启此项将优化同步兼容性,但会停用实时更新效果</string>
<!-- 设置选项 -->
<string name="title_schedule_settings">课程表设置</string>
<string name="section_title_general_settings">通用设置</string>
<string name="item_show_non_current_week">显示非本周课程</string>
<string name="desc_show_non_current_week">在课表中展示当前周次以外的课程</string>
<string name="item_show_weekends">是否显示周末</string>
<string name="desc_show_weekends">开启后,课程表中将显示周末的课程安排</string>
<string name="item_set_start_date">设置开学日期</string>
<string name="desc_set_start_date">选择学期第一周(教务系统参考的第一周)的周一</string>
<string name="status_not_set">未设置</string>
<string name="item_total_weeks">本学期总周数</string>
<string name="desc_total_weeks">设置学期总共持续多少周</string>
<string name="status_total_weeks_format">%1$d 周</string>
<string name="item_current_week">当前周数</string>
<string name="desc_current_week_manual">手动调整当前周数</string>
<string name="status_set_start_date_first">请设置开始日期</string>
<string name="status_current_week_format">第 %1$d 周</string>
<string name="item_first_day_of_week">设置每周起始日</string>
<string name="desc_first_day_of_week">设置一周从哪天开始计算和显示</string>
<string name="day_of_week_monday">周一</string>
<string name="day_of_week_sunday">周日</string>
<string name="item_schedule_tweak">课程调动</string>
<string name="desc_schedule_tweak">一键将指定日期的所有课程调整到新日期</string>
<string name="section_title_advanced_features">高级功能</string>
<string name="item_course_conversion">课表导入/导出</string>
<string name="desc_course_conversion">支持文件、教务导入及同步功能</string>
<string name="desc_notification_settings">管理您的课程提醒通知</string>
<string name="desc_manage_course_tables">管理多份课程表,可切换、删除</string>
<string name="item_time_slot_customization">自定义时间段</string>
<string name="desc_time_slot_customization">编辑您的课程时间段设置</string>
<string name="item_more_options">更多</string>
<string name="desc_more_options">提供我们的更多信息</string>
<string name="a11y_more_options">更多选项</string>
<string name="dialog_title_select_total_weeks">选择总周数</string>
<string name="dialog_title_manual_set_week">手动设置当前周数</string>
<string name="dialog_title_set_first_day_of_week">设置每周起始日</string>
<string name="text_no_course_tables">暂无课表可选择</string>
<string name="course_table_id_prefix">ID: %s</string>
<string name="course_table_created_at_prefix">创建于: %s</string>
<string name="label_current">当前</string>
<!-- 管理课表 -->
<string name="title_manage_course_tables">管理课表</string>
<string name="dialog_title_add_table">添加新课表</string>
<string name="a11y_add_new_table">添加新课表</string>
<string name="label_table_name">课表名称</string>
<string name="text_no_tables_hint">暂无课表,点击右下角按钮添加。</string>
<string name="toast_switch_table_success">已切换到课表: %1$s</string>
<string name="toast_add_table_success">课表 \'%1$s\' 已添加</string>
<string name="dialog_title_edit_table">编辑课表名称</string>
<string name="toast_edit_table_success">课表名称已更新</string>
<string name="dialog_text_confirm_delete">您确定要删除课表 \'%1$s\' 吗?此操作无法撤销。</string>
<string name="toast_delete_table_success">%1$s 已删除</string>
<string name="toast_delete_last_table_failed">不能删除最后一个课表</string>
<string name="a11y_current_table">当前课表</string>
<string name="item_course_management">课程管理</string>
<string name="desc_course_management">按名称查看和编辑所有课程</string>
<!-- 管理课程 -->
<string name="title_selected_items_count">已选择 %1$d 项</string>
<string name="text_no_unique_courses_hint">当前课表暂无课程数据</string>
<string name="a11y_cancel_selection">取消多选</string>
<string name="a11y_exit_selection_mode">退出选择模式</string>
<string name="a11y_enter_selection_mode">进入选择模式</string>
<string name="a11y_not_selected">未选中</string>
<string name="label_weeks_format">周次: %1$s</string>
<!-- 时间段管理 -->
<string name="title_time_slot_management">时间段管理</string>
<string name="a11y_add_time_slot">添加时间段</string>
<string name="a11y_save_all_settings">保存所有设置</string>
<string name="toast_settings_saved">所有设置已保存到数据库</string>
<string name="title_default_duration_settings">默认时长设置</string>
<string name="label_class_duration_minutes">一节课时长 (分钟)</string>
<string name="toast_class_duration_positive">课程时长必须大于0分钟</string>
<string name="label_break_duration_minutes">课间休息 (分钟)</string>
<string name="toast_break_duration_non_negative">休息时长不能为负</string>
<string name="text_no_time_slots_hint">当前没有时间段。点击右上角 \'+\' 添加。</string>
<string name="toast_slot_removed_unsaved">时间段已从列表移除,请点击保存以更新数据库</string>
<string name="time_slot_section_number">第 %1$s 节</string>
<string name="a11y_delete_time_slot">删除时间段</string>
<string name="dialog_title_edit_time_slot">编辑时间段</string>
<string name="dialog_title_add_time_slot">添加新时间段</string>
<string name="label_time_picker_start">开始</string>
<string name="label_time_picker_end">结束</string>
<string name="label_time_picker_hour">小时</string>
<string name="label_time_picker_minute">分钟</string>
<string name="action_save_changes">保存更改</string>
<string name="toast_end_time_must_be_later">结束时间必须晚于开始时间</string>
<string name="toast_slot_modified_unsaved">时间段已修改,请点击保存以更新数据库</string>
<string name="toast_slot_added_unsaved">时间段已添加至列表,请点击保存以更新数据库</string>
<string name="label_time_slot_alias">别名(可选)</string>
<string name="toast_time_conflict">选择的时间超出了前后课时限制范围</string>
<!-- 课表导入/导出 -->
<string name="title_conversion">课表导入/导出</string>
<string name="section_file_conversion">文件导入/导出</string>
<string name="item_import_course_file">课程文件导入</string>
<string name="desc_import_json">导入json文件</string>
<string name="item_export_course_file">课程文件导出</string>
<string name="desc_export_json_with_config">导出携带时间段配置的json课程文件</string>
<string name="item_export_ics_file">日历文件导出</string>
<string name="desc_export_ics_with_alarm">导出ics文件,点击生成指定提醒时间参数的文件</string>
<string name="section_school_import">教务导入</string>
<string name="item_school_system_import">教务系统导入</string>
<string name="desc_school_import_quick">从教务系统导入课程,方便快捷</string>
<string name="dialog_title_select_import_table">选择要导入的目标课表</string>
<string name="dialog_title_select_export_table">选择要导出的课表</string>
<string name="dialog_title_ics_export_settings">日历导出设置</string>
<string name="label_select_alarm_time">选择提醒时间:</string>
<string name="a11y_import">导入</string>
<string name="a11y_export">导出</string>
<string name="a11y_details">详情</string>
<string name="snackbar_cannot_open_file">无法打开文件。</string>
<string name="snackbar_file_selection_canceled">文件选择已取消。</string>
<string name="snackbar_cannot_save_file">无法保存文件。</string>
<string name="snackbar_file_save_canceled">文件保存已取消。</string>
<string name="dialog_title_file_saved">文件已保存</string>
<string name="dialog_text_file_saved_share_prompt">文件已成功导出到您的下载目录,您想分享它吗?</string>
<string name="snackbar_file_copy_failed_for_share">文件复制失败,无法分享。</string>
<string name="action_share">分享</string>
<string name="toast_import_success">课表导入成功!</string>
<string name="toast_ics_export_success">日历文件导出成功!</string>
<string name="error_export_table_not_found">导出失败:找不到课表</string>
<string name="error_export_failed">导出失败:%1$s</string>
<string name="error_import_failed">导入失败:%1$s</string>
<string name="error_ics_export_data_failed">日历文件导出失败:获取数据失败</string>
<string name="error_ics_export_failed">日历文件导出失败:%1$s</string>
<string name="section_sync">同步</string>
<string name="item_sync_to_system_calendar">同步到系统日历</string>
<string name="desc_sync_to_system_calendar">将当前课表一键同步至手机系统日历</string>
<string name="toast_sync_calendar_success">同步成功</string>
<string name="error_sync_calendar_failed">同步失败,请检查日历权限</string>
<!-- 更多设置 -->
<string name="title_more_options">更多</string>
<string name="a11y_app_icon">应用图标</string>
<string name="a11y_navigate">跳转</string>
<string name="a11y_acknowledgment">鸣谢</string>
<string name="label_special_thanks">特别鸣谢</string>
<string name="text_acknowledgment_body">衷心感谢为本应用软件和教务适配代码仓库的开发和维护做出贡献的每一位开发者。您的奉献是应用持续更新和完善的动力!</string>
<string name="item_github_repo">本项目GitHub仓库</string>
<string name="item_open_source_licenses">查看开源许可证</string>
<string name="title_open_source_licenses">开源许可证</string>
<string name="item_update_repo">更新教务适配仓库</string>
<string name="item_contributors">贡献者列表</string>
<string name="label_version_prefix">版本: %1$s</string>
<string name="default_app_name">未知应用</string>
<string name="item_check_software_update">检查软件更新</string>
<string name="item_language_settings">语言设置</string>
<string name="language_follow_system">跟随系统</string>
<string name="dialog_checking_update">正在检查更新...</string>
<string name="tip_please_wait">正在连接服务器,请稍候。</string>
<string name="dialog_new_version_found">发现新版本 %s</string>
<string name="dialog_current_version_latest">当前版本已是最新</string>
<string name="dialog_update_check_failed">更新检查失败</string>
<string name="label_error_message">错误信息:%s</string>
<string name="btn_download_update">下载更新</string>
<string name="btn_update_now">立即更新</string>
<string name="tip_non_mandatory_update">提示:强制更新不会显示此取消按钮。</string>
<string name="dialog_select_update_channel">选择更新渠道</string>
<string name="a11y_selected">已选中</string>
<string name="item_start_screen_settings">启动页面设置</string>
<string name="dialog_select_start_screen">选择启动时显示的页面</string>
<!-- 课程调动 -->
<string name="title_tweak_schedule">调课</string>
<string name="a11y_save_tweak">保存调课更改</string>
<string name="label_select_tweak_table">选择要调整的课表</string>
<string name="action_select_table">选择课表</string>
<string name="label_tweak_from_date">被调整日期</string>
<string name="label_tweak_to_date">调整到日期</string>
<string name="text_tweak_hint">请确认以下两个日期的课程信息,点击右上角保存即可完成调课。</string>
<string name="title_tweak_from_course">被调整的课程</string>
<string name="a11y_arrow">箭头</string>
<string name="title_tweak_to_course">调整到日期的课程</string>
<string name="text_no_course">无课程</string>
<string name="error_tweak_no_table_or_semester">请先选择课表并设置学期开始日期</string>
<string name="error_tweak_same_day">被调整日期和调整到日期不能是同一天</string>
<string name="toast_tweak_success">调课成功!</string>
<string name="error_tweak_failed">调课失败:%1$s</string>
<string name="course_time_day_section_details_tweak">%1$s | 节次 %2$s-%3$s</string>
<string name="course_time_day_time_details_tweak">%1$s | 时间 %2$s-%3$s</string>
<string name="tweak_mode_merge">合并 (A + B)</string>
<string name="tweak_mode_overwrite">覆盖 (A → B)</string>
<string name="tweak_mode_exchange">交换 (A ↔ B)</string>
<!-- 教务导入 -->
<string name="title_select_school">选择学校</string>
<string name="search_hint_school">搜索学校名称或首字母</string>
<string name="text_no_adapter_for_category">当前类别暂无适配,请选择其他类别或检查数据源。</string>
<string name="text_no_school_found">没有找到匹配的学校</string>
<string name="a11y_search">搜索</string>
<string name="a11y_clear_search">清除搜索</string>
<string name="a11y_school_icon">学校图标</string>
<string name="category_bachelor_associate">本科/专科</string>
<string name="category_postgraduate">研究生</string>
<string name="category_general_tool">通用工具</string>
<string name="category_other">其他</string>
<string name="a11y_back_to_school_list">返回学校列表</string>
<string name="text_no_detailed_description">无详细描述。</string>
<string name="label_contributor_unknown">未知</string>
<string name="label_contributor_format">贡献者: %1$s</string>
<string name="text_no_adapter_for_category_school">该学校在「%1$s」类别下暂无适配器。</string>
<string name="title_enter_url">输入网址</string>
<string name="a11y_cancel_editing">取消编辑</string>
<string name="placeholder_enter_url_full">输入网址 (https://...)</string>
<string name="a11y_load">加载</string>
<string name="a11y_enter_url">输入网址</string>
<string name="action_refresh">刷新</string>
<string name="a11y_refresh">刷新</string>
<string name="action_switch_to_phone_mode">切换到手机模式</string>
<string name="action_switch_to_desktop_mode">切换到电脑模式</string>
<string name="toast_switched_to_desktop">已切换到电脑模式</string>
<string name="toast_switched_to_phone">已切换到手机模式</string>
<string name="toast_url_empty_enter_first">URL为空,请先输入网址。</string>
<string name="item_devtools_debug">DevTools 网页调试</string>
<string name="a11y_devtools">DevTools</string>
<string name="toast_devtools_enabled_format">DevTools 网页调试 %1$s。</string>
<string name="text_import_guide">请登录教务系统后切换到有课表显示的页面再点击导入课程,点击右上角的更多查看其他选项</string>
<string name="action_execute_import">执行导入</string>
<string name="toast_no_script_manual_import">该适配器没有脚本,请手动导入。</string>
<string name="dialog_title_select_table_for_import">选择一个课表以导入课程</string>
<string name="toast_executing_import_script">正在执行导入脚本...</string>
<string name="toast_import_script_not_found">导入脚本文件不存在: %1$s</string>
<string name="toast_load_import_script_failed">加载导入脚本失败: %1$s</string>
<string name="toast_no_import_script">该适配器没有导入脚本</string>
<string name="toast_import_script_finished">导入脚本执行完毕,返回课表页面。</string>
<string name="dialog_ssl_error_title">SSL 证书错误</string>
<string name="dialog_ssl_error_message">SSL证书验证失败,这可能意味着连接不安全。是否继续浏览?</string>
<string name="action_continue_browsing">继续浏览</string>
<string name="toast_ssl_error_cancelled">SSL证书验证失败,已取消连接。</string>
<string name="toast_web_load_error_format">网页加载错误: %1$s</string>
<!-- 贡献者列表 -->
<string name="title_contribution_list">贡献列表</string>
<string name="tab_adapter_development">教务适配</string>
<string name="tab_app_development">软件开发</string>
<string name="text_no_contributors">当前类别暂无贡献者信息。</string>
<string name="text_loading_failed">加载失败: %1$s</string>
<string name="action_retry">重试</string>
<string name="label_github">GitHub</string>
<string name="a11y_back_to_previous">返回上一页</string>
<string name="a11y_contributor_avatar">贡献者头像: %1$s</string>
<!-- 教务适配仓库 -->
<string name="title_update_repo_screen">更新教务适配仓库</string>
<string name="label_select_repo">选择仓库</string>
<string name="text_select_repo_hint">请选择仓库</string>
<string name="action_update">更新</string>
<string name="action_updating">更新中...</string>
<string name="label_repo_url">仓库 URL</string>
<string name="label_repo_branch">分支 (Branch)</string>
<string name="label_private_repo_credentials">私有仓库凭证 (Username/Token)</string>
<string name="label_username_or_token_key">用户名或 Token Key</string>
<string name="label_password_or_token_value">密码或 Token Value</string>
<string name="title_update_log">更新日志</string>
<!-- 色彩编辑器 -->
<string name="color_picker_title_edit">颜色调节</string>
<string name="color_picker_title_precise">精准数值</string>
<string name="color_picker_mode_visual">滑块模式</string>
<string name="color_picker_mode_input">数字模式</string>
<string name="color_picker_label_hue">色相</string>
<string name="color_picker_label_saturation">饱和度</string>
<string name="color_picker_label_value">亮度</string>
<string name="color_picker_label_alpha">透明度</string>
<string name="a11y_switch_color_mode">切换输入方式</string>
<!-- 个性化配置 -->
<string name="item_personalization">个性化配置</string>
<string name="desc_personalization">调整课表格子高度、圆角、间距及透明度</string>
<string name="style_category_interface">界面显示</string>
<string name="style_category_grid_size">网格尺寸</string>
<string name="style_category_course_block">课程块配置</string>
<string name="style_category_color_scheme">颜色方案 (点击圆形编辑)</string>
<string name="label_wallpaper">课表背景壁纸</string>
<string name="desc_wallpaper_set">已设置 (长按可清除)</string>
<string name="desc_wallpaper_unset">未设置 (点击选择图片)</string>
<string name="label_hide_section_time">隐藏节次具体时间</string>
<string name="label_hide_date_under_day">隐藏日期 (周几下方)</string>
<string name="label_hide_grid_lines">隐藏网格线</string>
<string name="label_show_start_time">显示课程格开始时间</string>
<string name="label_section_height">格子高度</string>
<string name="label_time_column_width">侧边栏宽度</string>
<string name="label_day_header_height">顶部表头高度</string>
<string name="label_hide_location">隐藏上课地点</string>
<string name="label_hide_teacher">隐藏授课老师</string>
<string name="label_remove_location_at">移除地点前的 @ 符号</string>
<string name="label_font_scale">文字缩放比例</string>
<string name="label_corner_radius">圆角半径</string>
<string name="label_inner_padding">内部填充</string>
<string name="label_outer_padding">外部间距</string>
<string name="label_opacity">不透明度</string>
<string name="title_light_color_pool">浅色模式颜色池</string>
<string name="title_dark_color_pool">深色模式颜色池</string>
<string name="preview_light_mode">浅色模式预览\n固定深色文字</string>
<string name="preview_dark_mode">深色模式预览\n固定浅色文字</string>
<string name="action_reset_style">恢复默认样式设置</string>
<string name="dialog_reset_title">重置样式</string>
<string name="dialog_reset_message">确定要将所有样式设置恢复为默认值吗?此操作不可撤销。</string>
<string name="action_confirm_crop">确定裁剪</string>
<string name="label_text_align_center_h">文字水平居中</string>
<string name="label_text_align_center_v">文字垂直居中</string>
<string name="label_border_type">边框样式</string>
<string name="border_type_solid">实线</string>
<string name="border_type_dashed">虚线</string>
<string name="label_range">范围</string>
<string name="placeholder_input_value">请输入数值</string>
<string name="label_page_text_color">课表页面文字颜色</string>
<string name="label_course_text_color">课程块文字颜色</string>
<string name="label_schedule_mode_24h">24小时时间轴模式</string>
<!-- 快捷操作 -->
<string name="item_quick_actions">快捷操作</string>
<string name="desc_quick_actions">包含调课、课程临时变动等功能</string>
<string name="label_quick_action_category_schedule">课表调整</string>
<string name="item_quick_delete">快速删除课程</string>
<string name="quick_delete_subtitle">按周次、星期或特定日期批量清理课表</string>
<!-- 快速删除课程 -->
<string name="label_dimension_weeks_days">维度一:按周次和星期</string>
<string name="label_dimension_dates">维度二:按特定日期</string>
<string name="hint_no_selection">请选择周次、星期或日期</string>
<string name="hint_affected_count">预计从课表中移除 %1$d 节课程记录</string>
<string name="dialog_delete_confirm_msg">此操作不可撤销。受影响的课程记录将从选定的时间点中抹除,但课程的基础信息仍会保留。</string>
<string name="btn_add_date">添加日期</string>
<string name="quick_delete_filter_weeks_days_hint">设置重复周次与星期 (可选)</string>
<string name="quick_delete_filter_date_range_hint">设置特定日期范围 (可选)</string>
<string name="quick_delete_label_days_prefix">星期: %1$s</string>
<string name="quick_delete_dialog_select_date_title">选择日期范围</string>
<string name="quick_delete_success">课表清理成功</string>
<string name="error_load_failed">初始化失败,请重试</string>
<string name="error_op_failed">操作失败: %1$s</string>
<!-- 主题设置 -->
<string name="theme_follow_system">跟随系统</string>
<string name="theme_light">浅色模式</string>
<string name="theme_dark">深色模式</string>
<string name="theme_settings_title">主题设置</string>
<string name="theme_mode_label">主题模式切换</string>
<string name="dynamic_color_title">动态取色 (Material You)</string>
<string name="dynamic_color_desc">基于系统壁纸自动生成配色方案(仅支持 Android 12+)</string>
<string name="custom_color_title">自定义主色调</string>
<string name="light_primary_color">浅色模式主色</string>
<string name="dark_primary_color">深色模式主色</string>
<string name="theme_color_hint">说明:改变此颜色后,系统将作为种子色重新计算全应用配色方案。</string>
<!-- 备份和还原 -->
<string name="backup_err_empty">备份文件为空,无法恢复</string>
<string name="backup_err_corrupted">文件解析失败,数据可能已损坏</string>
<string name="backup_err_version_too_new">该备份数据版本过新,请升级 App 后再试</string>
<string name="item_backup_restore">备份与恢复</string>
<string name="desc_backup_restore">支持云盘与本地文件多渠道备份,保障课表数据安全</string>
<string name="section_data_maintenance">数据维护</string>
<string name="item_backup_data">备份数据</string>
<string name="desc_backup_data">将当前的课表及配置打包保存</string>
<string name="item_restore_data">恢复数据</string>
<string name="desc_restore_data">下载并覆盖本地课表配置数据</string>
<string name="section_service_config">服务配置</string>
<string name="item_webdav_config">WebDAV 参数配置</string>
<string name="desc_webdav_unconfigured">未配置网盘连接</string>
<string name="desc_webdav_connected">已连接: %1$s</string>
<string name="dialog_title_backup_target">选择备份目标渠道</string>
<string name="dialog_title_restore_source">选择恢复数据来源</string>
<string name="dialog_title_config_webdav">配置 WebDAV</string>
<string name="label_webdav_url">服务器地址 (URL)</string>
<string name="label_webdav_account">账号</string>
<string name="label_webdav_pwd_saved">密码已保存 (留空不修改)</string>
<string name="label_webdav_pwd_empty">应用独立密码</string>
<string name="label_webdav_path">云端备份位置</string>
<string name="desc_webdav_path_hint">实际数据将隔离保存在该目录下的 /Backup 文件夹中</string>
<string name="toast_operation_success">操作成功完成</string>
<string name="toast_operation_failed">操作失败: %1$s</string>
<string name="error_webdav_unconfigured">请先配置 WebDAV 服务</string>
<string name="error_stream_open_failed">无法打开数据流</string>
<string name="backup_err_connect_failed">连接失败,请检查配置或网络</string>
<string name="backup_err_upload_failed">文件上传失败</string>
<string name="backup_err_download_failed">下载备份失败</string>
<string name="backup_err_local_export_failed">本地导出失败</string>
<string name="backup_err_restore_failed_prefix">还原失败: %1$s</string>
<string name="backup_target_webdav">WebDAV 云同步</string>
<string name="backup_target_local_zip">本地 ZIP 文件</string>
</resources>
@@ -0,0 +1,572 @@
<resources>
<!-- 應用基礎資訊 -->
<string name="app_name">拾光課程表</string>
<!-- 通用按鈕和提示資訊 -->
<string name="action_confirm">確定</string>
<string name="action_cancel">取消</string>
<string name="a11y_save">儲存</string>
<string name="a11y_delete">刪除</string>
<string name="a11y_edit">編輯</string>
<string name="a11y_back">返回</string>
<string name="action_add">新增</string>
<string name="action_next_step">下一步</string>
<string name="title_loading">載入中...</string>
<string name="text_error">錯誤</string>
<string name="label_none">無</string>
<string name="action_select_all">全選</string>
<string name="action_deselect_all">取消全選</string>
<string name="a11y_state_selected">已選取</string>
<string name="a11y_state_not_selected">未選取</string>
<string name="confirm_delete">確認刪除</string>
<string name="common_dialog_title_abandon_changes">放棄更改?</string>
<string name="common_dialog_msg_unsaved_changes">目前內容已修改,退出將丟失未儲存的數據。</string>
<string name="common_action_exit_without_save">退出</string>
<string name="common_action_continue_editing">繼續編輯</string>
<string name="label_recent_visit">最近訪問</string>
<!-- 主介面及今日課表 -->
<string name="action_reset">重置</string>
<string name="floating_course_hint">已掛起,左右滑周點擊空白處放下</string>
<string name="nav_today_schedule">今日課表</string>
<string name="nav_course_schedule">課表</string>
<string name="nav_settings">我的</string>
<string name="title_today_schedule">今日課表</string>
<string name="text_no_courses_today">今天沒有課程</string>
<string name="title_vacation_until_start">假期中(距離開學還有%1$s天)</string>
<string name="title_semester_not_set">請設定開學日期</string>
<string name="date_format_year_month_day">yyyy年M月d日</string>
<!-- 新增課程 -->
<string name="toast_save_success">儲存成功</string>
<string name="toast_delete_success">刪除成功</string>
<string name="title_edit_course">編輯課程</string>
<string name="title_add_course">新增課程</string>
<string name="label_course_name">課程名稱*</string>
<string name="toast_name_empty">課程名稱不能為空</string>
<string name="label_teacher">教師</string>
<string name="label_position">地點</string>
<string name="label_course_time">上課時間</string>
<string name="label_day_of_week">星期</string>
<string name="label_start_section">開始節次</string>
<string name="label_end_section">結束節次</string>
<string name="toast_time_invalid">開始節次不能大於結束節次</string>
<string name="label_course_weeks">上課週次</string>
<string name="action_single_week">單週</string>
<string name="action_double_week">雙週</string>
<string name="label_course_color">課程顏色</string>
<string name="button_select_color">選擇顏色</string>
<string name="snackbar_add_course_within_semester">請於學期教學週期間新增或調整課程</string>
<string name="label_section_range_suffix">節</string>
<string name="title_select_time">選擇上課時間</string>
<string name="button_select_weeks">選擇週數</string>
<string name="text_weeks_selected">已選: %1$s</string>
<string name="title_select_weeks">選擇上課週次</string>
<string name="title_select_color">選擇課程顏色</string>
<string name="a11y_color_selected">已選擇</string>
<string name="label_custom_time_range">自訂時間段</string>
<string name="label_select_custom_time">選擇自訂時間</string>
<string name="toast_custom_time_empty">起始時間或結束時間不能為空</string>
<string name="label_custom_time">自訂時間</string>
<string name="label_start_time">開始時間</string>
<string name="label_end_time">結束時間</string>
<!-- 課程相關 -->
<string name="label_remark">備註</string>
<string name="course_time_description">時間: 第%1$s-%2$s節 (%3$s-%4$s)</string>
<string name="course_position_prefix">地點: %1$s</string>
<string name="course_teacher_prefix">老師: %1$s</string>
<string name="title_course_overlap">重疊課程列表</string>
<string name="label_courses_overlap">%d門重疊</string>
<string name="course_time_sections_count">(%1$s節)</string>
<string name="title_select_week">選擇週次</string>
<string name="title_current_week">第 %1$s 週</string>
<string name="title_vacation">假期中</string>
<string name="status_semester_ended">學期已結束 %d 天</string>
<string name="status_week_calc_error">週次計算錯誤</string>
<!-- 時間與星期格式 -->
<string-array name="week_days_short_names">
<item>一</item>
<item>二</item>
<item>三</item>
<item>四</item>
<item>五</item>
<item>六</item>
<item>日</item>
</string-array>
<string-array name="week_days_full_names">
<item>週一</item>
<item>週二</item>
<item>週三</item>
<item>週四</item>
<item>週五</item>
<item>週六</item>
<item>週日</item>
</string-array>
<!-- 通知與鬧鐘 -->
<string name="format_week_display">%1$d週</string>
<string name="notification_channel_desc_course_alert">上課提醒通知</string>
<string name="notification_title_course_alert">上課提醒</string>
<string name="item_auto_mode">上課自動模式</string>
<string name="text_auto_mode_dependency">依賴於「課程提醒」的開啟</string>
<string name="toast_enable_reminder_first">請先開啟「課程提醒」</string>
<string name="alarm_option_none">不提醒</string>
<string name="alarm_option_on_time">準時提醒</string>
<string name="notification_live_status_preparing">準備上課</string>
<string name="notification_unknown_course">未知課程</string>
<string name="notification_unknown_position">地點未知</string>
<!-- 小工具相關 -->
<string name="widget_name_tiny">超小課程2x1</string>
<string name="widget_name_compact">緊湊課程2x2</string>
<string name="widget_name_double_days">近日課程4x2</string>
<string name="widget_name_list_vertical">垂直列表課表4xN</string>
<string name="widget_tomorrow_course_preview">明日預告</string>
<string name="widget_no_courses_tomorrow">明天沒有課程</string>
<string name="widget_today_courses_finished">今日課程已結束</string>
<string name="widget_vacation_expecting">期待新學期</string>
<string name="widget_remaining_courses_format_today">今日還有 %1$d 節課</string>
<string name="widget_remaining_courses_format_tomorrow">明天有 %1$d 節課</string>
<string name="widget_title_today">今天</string>
<string name="widget_title_tomorrow">明天</string>
<!-- 通知設定 -->
<string name="widget_course_total_count">共有 %1$d 節</string>
<string name="title_course_notification_settings">課程提醒設定</string>
<string name="section_title_general">一般</string>
<string name="section_title_advanced">進階</string>
<string name="text_permission_importance_title">權限設定對於 Android 提醒非常重要</string>
<string name="text_permission_importance_detail">為了確保提醒準時送達,你需要:\n1. 授予精確鬧鐘權限 (Android 12及以上)\n2. 開啟應用程式的自動啟動權限\n3. 關閉應用程式的電池最佳化功能\n4. 授予勿擾模式權限(用於自動模式切換)\n\n請在下方的設定項目中手動開啟這些權限。</string>
<string name="item_course_reminder">課程提醒</string>
<string name="item_remind_time_before">提前提醒時間</string>
<string name="remind_time_minutes_format">%1$s 分鐘</string>
<string name="item_exact_alarm_permission">精確鬧鐘權限</string>
<string name="item_dnd_permission">勿擾模式權限</string>
<string name="status_enabled">已開啟</string>
<string name="status_disabled">已關閉</string>
<string name="status_authorized">已授權</string>
<string name="status_unauthorized">未授權</string>
<string name="item_background_and_autostart">背景執行和自動啟動</string>
<string name="item_ignore_battery_optimization">忽略電池最佳化</string>
<string name="section_title_skip_dates">跳過日期功能</string>
<string name="text_skip_dates_experimental">實驗性功能,不保證一定有效</string>
<string name="item_update_holiday_info">更新節假日資訊</string>
<string name="update_holiday_info_hint">可能不穩定(一般情況下只有年底才公布下一年的節假日資訊)</string>
<string name="item_clear_skipped_dates">清空跳過日期</string>
<string name="item_view_skipped_dates">檢視跳過的日期</string>
<string name="skipped_dates_count_format">%1$d 個日期</string>
<string name="skipped_dates_none">無</string>
<string name="toast_holidays_update_success">節假日資訊更新成功!</string>
<string name="toast_update_failed">更新失敗:%1$s</string>
<string name="toast_clear_success">已清空所有跳過日期!</string>
<string name="toast_clear_failed">清空失敗:%1$s</string>
<string name="dialog_title_auto_mode_selection">上課自動模式選擇</string>
<string name="auto_mode_dnd_permission_warning">(缺少勿擾權限,啟用勿擾/靜音可能無效)</string>
<string name="dialog_title_set_remind_time">設定提前提醒時間</string>
<string name="label_minutes_input">分鐘數</string>
<string name="error_input_empty">請輸入分鐘數</string>
<string name="error_input_range">請輸入0到60之間的數字</string>
<string name="dialog_title_exact_alarm_permission">需要精確鬧鐘權限</string>
<string name="dialog_text_exact_alarm_permission">為了確保提醒能在準確時間送達,請授予精確鬧鐘權限。</string>
<string name="action_go_to_settings">前往設定</string>
<string name="dialog_title_clear_confirmation">確認清空</string>
<string name="dialog_text_clear_confirmation">這會永久清除所有跳過的日期,無法復原。確定要繼續嗎?</string>
<string name="dialog_title_dnd_permission">需要勿擾模式權限</string>
<string name="dialog_text_dnd_permission">為了啟用上課自動模式,請授予應用程式存取勿擾模式設定的權限。</string>
<string name="auto_mode_off">關閉</string>
<string name="auto_mode_dnd">勿擾模式 (DND)</string>
<string name="auto_mode_silent">靜音模式 (SILENT)</string>
<string name="dialog_title_view_skipped_dates">跳過的提醒日期</string>
<string name="text_no_skipped_dates">沒有設定跳過的日期。</string>
<string name="action_close">關閉</string>
<string name="toast_notification_permission_denied">通知權限被拒絕,無法接收課程提醒。</string>
<string name="item_compat_wearable_sync">兼容穿戴設備同步通知</string>
<string name="desc_compat_wearable_sync">因 Android 16 實時通知特性與部分穿戴設備通知同步軟件存在兼容性衝突,開啟此項將優化同步兼容性,但會停用實時更新效果。</string>
<!-- 設定選項 -->
<string name="title_schedule_settings">課程表設定</string>
<string name="section_title_general_settings">一般設定</string>
<string name="item_show_non_current_week">顯示非本週課程</string>
<string name="desc_show_non_current_week">在課表中展示當前週次以外的課程</string>
<string name="item_show_weekends">是否顯示週末</string>
<string name="desc_show_weekends">開啟後,課程表中將顯示週末的課程安排</string>
<string name="item_set_start_date">設定開學日期</string>
<string name="desc_set_start_date">選擇學期第一週(教務系統參考的第一週)的週一</string>
<string name="status_not_set">未設定</string>
<string name="item_total_weeks">本學期總週數</string>
<string name="desc_total_weeks">設定學期總共持續多少週</string>
<string name="status_total_weeks_format">%1$d 週</string>
<string name="item_current_week">目前週數</string>
<string name="desc_current_week_manual">手動調整目前週數</string>
<string name="status_set_start_date_first">請設定開始日期</string>
<string name="status_current_week_format">第 %1$d 週</string>
<string name="item_first_day_of_week">設定每週起始日</string>
<string name="desc_first_day_of_week">設定一週從哪天開始計算和顯示</string>
<string name="day_of_week_monday">週一</string>
<string name="day_of_week_sunday">週日</string>
<string name="item_schedule_tweak">課程調動</string>
<string name="desc_schedule_tweak">一鍵將指定日期的所有課程調整到新日期</string>
<string name="section_title_advanced_features">進階功能</string>
<string name="item_course_conversion">課表匯入/匯出</string>
<string name="desc_course_conversion">支援檔案、教務導入及同步功能</string>
<string name="desc_notification_settings">管理您的課程提醒通知</string>
<string name="desc_manage_course_tables">管理多份課程表,可切換、刪除</string>
<string name="item_time_slot_customization">自訂時間段</string>
<string name="desc_time_slot_customization">編輯您的課程時間段設定</string>
<string name="item_more_options">更多</string>
<string name="desc_more_options">提供我們的更多資訊</string>
<string name="a11y_more_options">更多選項</string>
<string name="dialog_title_select_total_weeks">選擇總週數</string>
<string name="dialog_title_manual_set_week">手動設定目前週數</string>
<string name="dialog_title_set_first_day_of_week">設定每週起始日</string>
<string name="text_no_course_tables">目前沒有課表可選擇</string>
<string name="course_table_id_prefix">ID: %s</string>
<string name="course_table_created_at_prefix">建立於: %s</string>
<string name="label_current">目前</string>
<!-- 管理課表 -->
<string name="title_manage_course_tables">管理課表</string>
<string name="dialog_title_add_table">新增課表</string>
<string name="a11y_add_new_table">新增課表</string>
<string name="label_table_name">課表名稱</string>
<string name="text_no_tables_hint">目前沒有課表,點選右下角按鈕新增。</string>
<string name="toast_switch_table_success">已切換到課表: %1$s</string>
<string name="toast_add_table_success">課表 \'%1$s\' 已新增</string>
<string name="dialog_title_edit_table">編輯課表名稱</string>
<string name="toast_edit_table_success">課表名稱已更新</string>
<string name="dialog_text_confirm_delete">您確定要刪除課表 \'%1$s\' 嗎?此操作無法復原。</string>
<string name="toast_delete_table_success">%1$s 已刪除</string>
<string name="toast_delete_last_table_failed">不能刪除最後一個課表</string>
<string name="a11y_current_table">目前課表</string>
<string name="item_course_management">課程管理</string>
<string name="desc_course_management">按名稱查看和編輯所有課程</string>
<!-- 課程管理 -->
<string name="title_selected_items_count">已選擇 %1$d 項</string>
<string name="text_no_unique_courses_hint">目前課表暫無課程資料</string>
<string name="a11y_cancel_selection">取消多選</string>
<string name="a11y_exit_selection_mode">退出選擇模式</string>
<string name="a11y_enter_selection_mode">進入選擇模式</string>
<string name="a11y_not_selected">未選中</string>
<string name="label_weeks_format">週次: %1$s</string>
<!-- 時間段管理 -->
<string name="title_time_slot_management">時間段管理</string>
<string name="a11y_add_time_slot">新增時間段</string>
<string name="a11y_save_all_settings">儲存所有設定</string>
<string name="toast_settings_saved">所有設定已儲存到資料庫</string>
<string name="title_default_duration_settings">預設時長設定</string>
<string name="label_class_duration_minutes">一節課時長 (分鐘)</string>
<string name="toast_class_duration_positive">課程時長必須大於0分鐘</string>
<string name="label_break_duration_minutes">課間休息 (分鐘)</string>
<string name="toast_break_duration_non_negative">休息時長不能為負</string>
<string name="text_no_time_slots_hint">目前沒有時間段。點選右上角 \'+\' 新增。</string>
<string name="toast_slot_removed_unsaved">時間段已從清單移除,請點選儲存以更新資料庫</string>
<string name="time_slot_section_number">第 %1$s 節</string>
<string name="a11y_delete_time_slot">刪除時間段</string>
<string name="dialog_title_edit_time_slot">編輯時間段</string>
<string name="dialog_title_add_time_slot">新增時間段</string>
<string name="label_time_picker_start">開始</string>
<string name="label_time_picker_end">結束</string>
<string name="label_time_picker_hour">小時</string>
<string name="label_time_picker_minute">分鐘</string>
<string name="action_save_changes">儲存變更</string>
<string name="toast_end_time_must_be_later">結束時間必須晚於開始時間</string>
<string name="toast_slot_modified_unsaved">時間段已修改,請點選儲存以更新資料庫</string>
<string name="toast_slot_added_unsaved">時間段已新增至清單,請點選儲存以更新資料庫</string>
<!-- 課表匯入/匯出 -->
<string name="label_time_slot_alias">別名 (選填)</string>
<string name="toast_time_conflict">選擇的時間超出了前後課時限制範圍</string>
<string name="title_conversion">課表匯入/匯出</string>
<string name="section_file_conversion">檔案匯入/匯出</string>
<string name="item_import_course_file">課程檔案匯入</string>
<string name="desc_import_json">匯入json檔案</string>
<string name="item_export_course_file">課程檔案匯出</string>
<string name="desc_export_json_with_config">匯出包含時間段設定的json課程檔案</string>
<string name="item_export_ics_file">行事曆檔案匯出</string>
<string name="desc_export_ics_with_alarm">匯出ics檔案,點選產生指定提醒時間參數的檔案</string>
<string name="section_school_import">教務匯入</string>
<string name="item_school_system_import">教務系統匯入</string>
<string name="desc_school_import_quick">從教務系統匯入課程,方便快捷</string>
<string name="dialog_title_select_import_table">選擇要匯入的目標課表</string>
<string name="dialog_title_select_export_table">選擇要匯出的課表</string>
<string name="dialog_title_ics_export_settings">行事曆匯出設定</string>
<string name="label_select_alarm_time">選擇提醒時間:</string>
<string name="a11y_import">匯入</string>
<string name="a11y_export">匯出</string>
<string name="a11y_details">詳情</string>
<string name="snackbar_cannot_open_file">無法開啟檔案。</string>
<string name="snackbar_file_selection_canceled">檔案選擇已取消。</string>
<string name="snackbar_cannot_save_file">無法儲存檔案。</string>
<string name="snackbar_file_save_canceled">檔案儲存已取消。</string>
<string name="dialog_title_file_saved">檔案已儲存</string>
<string name="dialog_text_file_saved_share_prompt">檔案已成功匯出到您的下載目錄,您想分享它嗎?</string>
<string name="snackbar_file_copy_failed_for_share">檔案複製失敗,無法分享。</string>
<string name="action_share">分享</string>
<string name="toast_import_success">課表匯入成功!</string>
<string name="toast_ics_export_success">行事曆檔案匯出成功!</string>
<string name="error_export_table_not_found">匯出失敗:找不到課表</string>
<string name="error_export_failed">匯出失敗:%1$s</string>
<string name="error_import_failed">匯入失敗:%1$s</string>
<string name="error_ics_export_data_failed">行事曆檔案匯出失敗:取得資料失敗</string>
<string name="error_ics_export_failed">行事曆檔案匯出失敗:%1$s</string>
<!-- 更多設定 -->
<string name="error_sync_calendar_failed">同步失敗,請檢查行事曆權限</string>
<string name="title_more_options">更多</string>
<string name="a11y_app_icon">應用程式圖示</string>
<string name="a11y_navigate">跳轉</string>
<string name="a11y_acknowledgment">鳴謝</string>
<string name="label_special_thanks">特別鳴謝</string>
<string name="text_acknowledgment_body">衷心感謝為本應用軟體和教務適配程式碼倉庫的開發和維護做出貢獻的每一位開發者。您的奉獻是應用程式持續更新和完善的動力!</string>
<string name="item_github_repo">本專案GitHub倉庫</string>
<string name="item_open_source_licenses">檢視開放原始碼授權</string>
<string name="title_open_source_licenses">開放原始碼授權</string>
<string name="item_update_repo">更新教務適配倉庫</string>
<string name="item_contributors">貢獻者清單</string>
<string name="label_version_prefix">版本: %1$s</string>
<string name="default_app_name">未知應用程式</string>
<string name="item_check_software_update">檢查軟體更新</string>
<string name="item_language_settings">語言設定</string>
<string name="language_follow_system">跟隨系統</string>
<string name="dialog_checking_update">正在檢查更新...</string>
<string name="tip_please_wait">正在連線伺服器,請稍候。</string>
<string name="dialog_new_version_found">發現新版本 %s</string>
<string name="dialog_current_version_latest">目前版本已是最新</string>
<string name="dialog_update_check_failed">更新檢查失敗</string>
<string name="label_error_message">錯誤資訊:%s</string>
<string name="btn_download_update">下載更新</string>
<string name="btn_update_now">立即更新</string>
<string name="tip_non_mandatory_update">提示:強制更新不會顯示此取消按鈕。</string>
<string name="dialog_select_update_channel">選擇更新渠道</string>
<string name="a11y_selected">已選中</string>
<string name="item_start_screen_settings">啟動頁面設置</string>
<string name="dialog_select_start_screen">選擇啟動時顯示的頁面</string>
<!-- 課程調動 -->
<string name="title_tweak_schedule">調課</string>
<string name="a11y_save_tweak">儲存調課變更</string>
<string name="label_select_tweak_table">選擇要調整的課表</string>
<string name="action_select_table">選擇課表</string>
<string name="label_tweak_from_date">被調整日期</string>
<string name="label_tweak_to_date">調整到日期</string>
<string name="text_tweak_hint">請確認以下兩個日期的課程資訊,點選右上角儲存即可完成調課。</string>
<string name="title_tweak_from_course">被調整的課程</string>
<string name="a11y_arrow">箭頭</string>
<string name="title_tweak_to_course">調整到日期的課程</string>
<string name="text_no_course">無課程</string>
<string name="error_tweak_no_table_or_semester">請先選擇課表並設定學期開始日期</string>
<string name="error_tweak_same_day">被調整日期和調整到日期不能是同一天</string>
<string name="toast_tweak_success">調課成功!</string>
<string name="error_tweak_failed">調課失敗:%1$s</string>
<string name="course_time_day_section_details_tweak">%1$s | 節次 %2$s-%3$s</string>
<string name="course_time_day_time_details_tweak">%1$s | 時間 %2$s-%3$s</string>
<string name="tweak_mode_merge">合併 (A + B)</string>
<string name="tweak_mode_overwrite">覆蓋 (A → B)</string>
<string name="tweak_mode_exchange">交換 (A ↔ B)</string>
<!-- 教務匯入 -->
<string name="title_select_school">選擇學校</string>
<string name="search_hint_school">搜尋學校名稱或首字母</string>
<string name="text_no_adapter_for_category">目前類別暫無適配,請選擇其他類別或檢查資料來源。</string>
<string name="text_no_school_found">沒有找到符合的學校</string>
<string name="a11y_search">搜尋</string>
<string name="a11y_clear_search">清除搜尋</string>
<string name="a11y_school_icon">學校圖示</string>
<string name="category_bachelor_associate">大學/專科</string>
<string name="category_postgraduate">研究所</string>
<string name="category_general_tool">通用工具</string>
<string name="category_other">其他</string>
<string name="a11y_back_to_school_list">返回學校清單</string>
<string name="text_no_detailed_description">無詳細說明。</string>
<string name="label_contributor_unknown">未知</string>
<string name="label_contributor_format">貢獻者: %1$s</string>
<string name="text_no_adapter_for_category_school">該學校在「%1$s」類別下暫無適配器。</string>
<string name="title_enter_url">輸入網址</string>
<string name="a11y_cancel_editing">取消編輯</string>
<string name="placeholder_enter_url_full">輸入網址 (https://...)</string>
<string name="a11y_load">載入</string>
<string name="a11y_enter_url">輸入網址</string>
<string name="action_refresh">重新整理</string>
<string name="a11y_refresh">重新整理</string>
<string name="action_switch_to_phone_mode">切換到手機模式</string>
<string name="action_switch_to_desktop_mode">切換到電腦模式</string>
<string name="toast_switched_to_desktop">已切換到電腦模式</string>
<string name="toast_switched_to_phone">已切換到手機模式</string>
<string name="toast_url_empty_enter_first">URL為空,請先輸入網址。</string>
<string name="item_devtools_debug">DevTools 網頁除錯</string>
<string name="a11y_devtools">DevTools</string>
<string name="toast_devtools_enabled_format">DevTools 網頁除錯 %1$s。</string>
<string name="text_import_guide">請登入教務系統後切換到有課表顯示的頁面再點選匯入課程,點選右上角的更多檢視其他選項</string>
<string name="action_execute_import">執行匯入</string>
<string name="toast_no_script_manual_import">該適配器沒有指令碼,請手動匯入。</string>
<string name="dialog_title_select_table_for_import">選擇一個課表以匯入課程</string>
<string name="toast_executing_import_script">正在執行匯入指令碼...</string>
<string name="toast_import_script_not_found">匯入指令碼檔案不存在: %1$s</string>
<string name="toast_load_import_script_failed">載入匯入指令碼失敗: %1$s</string>
<string name="toast_no_import_script">該適配器沒有匯入指令碼</string>
<string name="toast_import_script_finished">匯入指令碼執行完畢,返回課表頁面。</string>
<string name="dialog_ssl_error_title">SSL 憑證錯誤</string>
<string name="dialog_ssl_error_message">SSL憑證驗證失敗,這可能意味著連線不安全。是否繼續瀏覽?</string>
<string name="action_continue_browsing">繼續瀏覽</string>
<string name="toast_ssl_error_cancelled">SSL憑證驗證失敗,已取消連線。</string>
<string name="toast_web_load_error_format">網頁載入錯誤: %1$s</string>
<!-- 貢獻者清單 -->
<string name="title_contribution_list">貢獻清單</string>
<string name="tab_adapter_development">教務適配</string>
<string name="tab_app_development">軟體開發</string>
<string name="text_no_contributors">目前類別暫無貢獻者資訊。</string>
<string name="text_loading_failed">載入失敗: %1$s</string>
<string name="action_retry">重試</string>
<string name="label_github">GitHub</string>
<string name="a11y_back_to_previous">返回上一頁</string>
<string name="a11y_contributor_avatar">貢獻者頭像: %1$s</string>
<!-- 教務適配倉庫 -->
<string name="title_update_repo_screen">更新教務適配倉庫</string>
<string name="label_select_repo">選擇倉庫</string>
<string name="text_select_repo_hint">請選擇倉庫</string>
<string name="action_update">更新</string>
<string name="action_updating">更新中...</string>
<string name="label_repo_url">倉庫 URL</string>
<string name="label_repo_branch">分支 (Branch)</string>
<string name="label_private_repo_credentials">私人倉庫憑證 (Username/Token)</string>
<string name="label_username_or_token_key">使用者名稱或 Token Key</string>
<string name="label_password_or_token_value">密碼或 Token Value</string>
<string name="title_update_log">更新日誌</string>
<!-- 色彩編輯器 -->
<string name="color_picker_title_edit">顏色調節</string>
<string name="color_picker_title_precise">精準數值</string>
<string name="color_picker_mode_visual">滑塊模式</string>
<string name="color_picker_mode_input">數字模式</string>
<string name="color_picker_label_hue">色相</string>
<string name="color_picker_label_saturation">飽和度</string>
<string name="color_picker_label_value">亮度</string>
<string name="color_picker_label_alpha">透明度</string>
<string name="a11y_switch_color_mode">切換輸入方式</string>
<!-- 客製化配置 -->
<string name="item_personalization">客製化配置</string>
<string name="desc_personalization">調整課表格子高度、圓角、間距及透明度</string>
<string name="style_category_interface">介面顯示</string>
<string name="style_category_grid_size">網格尺寸</string>
<string name="style_category_course_block">課程塊配置</string>
<string name="style_category_color_scheme">顏色方案 (點擊圓形編輯)</string>
<string name="label_wallpaper">課表背景桌布</string>
<string name="desc_wallpaper_set">已設置 (長按可清除)</string>
<string name="desc_wallpaper_unset">未設置 (點擊選擇圖片)</string>
<string name="label_hide_section_time">隱藏節次具體時間</string>
<string name="label_hide_date_under_day">隱藏日期 (週幾下方)</string>
<string name="label_hide_grid_lines">隱藏網格線</string>
<string name="label_show_start_time">顯示課程格開始時間</string>
<string name="label_section_height">格子高度</string>
<string name="label_time_column_width">側邊欄寬度</string>
<string name="label_day_header_height">頂部表頭高度</string>
<string name="label_hide_location">隱藏上課地點</string>
<string name="label_hide_teacher">隱藏授課老師</string>
<string name="label_remove_location_at">移除地點前的 @ 符號</string>
<string name="label_font_scale">文字縮放比例</string>
<string name="label_corner_radius">圓角半徑</string>
<string name="label_inner_padding">內部填充</string>
<string name="label_outer_padding">外部間距</string>
<string name="label_opacity">不透明度</string>
<string name="title_light_color_pool">淺色模式顏色池</string>
<string name="title_dark_color_pool">深色模式顏色池</string>
<string name="preview_light_mode">淺色模式預覽\n固定深色文字</string>
<string name="preview_dark_mode">深色模式預覽\n固定淺色文字</string>
<string name="action_reset_style">恢復預設樣式設置</string>
<string name="dialog_reset_title">重置樣式</string>
<string name="dialog_reset_message">確定要將所有樣式設置恢復為預設值嗎?此操作不可撤銷。</string>
<string name="action_confirm_crop">確定裁剪</string>
<string name="label_text_align_center_h">文字水平置中</string>
<string name="label_text_align_center_v">文字垂直置中</string>
<string name="label_border_type">邊框樣式</string>
<string name="border_type_solid">實線</string>
<string name="border_type_dashed">虛線</string>
<string name="label_range">範圍</string>
<string name="placeholder_input_value">請輸入數值</string>
<!-- 快捷操作 -->
<string name="label_course_text_color">課程區塊文字顏色</string>
<string name="label_schedule_mode_24h">24小時時間軸模式</string>
<string name="item_quick_actions">快捷操作</string>
<string name="desc_quick_actions">包含調課、課程臨時變動等功能</string>
<string name="label_quick_action_category_schedule">課表調整</string>
<string name="item_quick_delete">快速刪除課程</string>
<string name="quick_delete_subtitle">按周次、星期或特定日期批量清理課表</string>
<!-- 快速刪除課程 -->
<string name="label_dimension_weeks_days">維度一:按周次和星期</string>
<string name="label_dimension_dates">維度二:按特定日期</string>
<string name="hint_no_selection">請選擇周次、星期或日期</string>
<string name="hint_affected_count">預計從課表中移除 %1$d 節課程記錄</string>
<string name="dialog_delete_confirm_msg">此操作不可撤銷。受影響的課程記錄將從選定的時間點中抹除,但課程的基礎資訊仍會保留。</string>
<string name="btn_add_date">添加日期</string>
<string name="quick_delete_filter_weeks_days_hint">設置重複周次與星期 (可選)</string>
<string name="quick_delete_filter_date_range_hint">設置特定日期範圍 (可選)</string>
<string name="quick_delete_label_days_prefix">星期: %1$s</string>
<string name="quick_delete_dialog_select_date_title">選擇日期範圍</string>
<string name="quick_delete_success">課表清理成功</string>
<string name="error_load_failed">初始化失敗,請重試</string>
<string name="error_op_failed">操作失敗: %1$s</string>
<string name="theme_follow_system">跟隨系統</string>
<string name="theme_light">淺色模式</string>
<string name="theme_dark">深色模式</string>
<string name="theme_settings_title">主題設置</string>
<string name="theme_mode_label">主題模式切換</string>
<string name="dynamic_color_title">動態取色 (Material You)</string>
<string name="dynamic_color_desc">基於系統桌布自動生成配色方案(僅支持 Android 12+)</string>
<string name="custom_color_title">自定義主色調</string>
<string name="light_primary_color">淺色模式主色</string>
<string name="dark_primary_color">深色模式主色</string>
<string name="theme_color_hint">說明:改變此顏色後,系統將作為種子色重新計算全應用配色方案。</string>
<string name="label_page_text_color">課表頁面文字顏色</string>
<string name="widget_course_remaining_count">剩餘 %1$d 節</string>
<string name="section_sync">同步</string>
<string name="item_sync_to_system_calendar">同步至系統行事曆</string>
<string name="desc_sync_to_system_calendar">將目前课表一鍵同步至手機系統行事曆</string>
<string name="toast_sync_calendar_success">同步成功</string>
<string name="backup_err_empty">備份檔案為空,無法復原</string>
<string name="backup_err_corrupted">檔案解析失敗,數據可能已損壞</string>
<string name="backup_err_version_too_new">該備份數據版本過新,請升級 App 後再試</string>
<string name="item_backup_restore">備份與復原</string>
<string name="desc_backup_restore">支援雲端硬碟與本地檔案多管道備份,保障課表數據安全</string>
<string name="section_data_maintenance">數據維護</string>
<string name="item_backup_data">備份數據</string>
<string name="desc_backup_data">將目前的課表及設定打包儲存</string>
<string name="item_restore_data">復原數據</string>
<string name="desc_restore_data">下載並覆蓋本地課表設定數據</string>
<string name="section_service_config">服務設定</string>
<string name="item_webdav_config">WebDAV 參數設定</string>
<string name="desc_webdav_unconfigured">未設定網盤連線</string>
<string name="desc_webdav_connected">已連線: %1$s</string>
<string name="dialog_title_backup_target">選擇備份目標管道</string>
<string name="dialog_title_restore_source">選擇復原數據來源</string>
<string name="dialog_title_config_webdav">設定 WebDAV</string>
<string name="label_webdav_url">伺服器位址 (URL)</string>
<string name="label_webdav_account">帳號</string>
<string name="label_webdav_pwd_saved">密碼已儲存 (留空不修改)</string>
<string name="label_webdav_pwd_empty">應用程式獨立密碼</string>
<string name="label_webdav_path">雲端備份位置</string>
<string name="desc_webdav_path_hint">實際數據將隔離儲存在該目錄下的 /Backup 資料夾中</string>
<string name="toast_operation_success">操作成功完成</string>
<string name="toast_operation_failed">操作失敗: %1$s</string>
<string name="error_webdav_unconfigured">請先設定 WebDAV 服務</string>
<string name="error_stream_open_failed">無法開啟數據流</string>
<string name="backup_err_connect_failed">連線失敗,請檢查設定或網路</string>
<string name="backup_err_upload_failed">檔案上傳失敗</string>
<string name="backup_err_download_failed">下載備份失敗</string>
<string name="backup_err_local_export_failed">本地匯出失敗</string>
<string name="backup_err_restore_failed_prefix">還原失敗: %1$s</string>
<string name="backup_target_webdav">WebDAV 雲端同步</string>
<string name="backup_target_local_zip">本地 ZIP 檔案</string>
</resources>
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="loading_text_color">#FF000000</color>
<color name="widget_bg">#FEF7FF</color> # 小组件最底层的圆角卡片背景色
<color name="widget_text_primary">#2C3E50</color> # 主文字颜色:用于课程名、日期标题、假期大标题
<color name="widget_text_secondary">#5D6D7E</color> # 次要文字颜色:用于周次、教师名、上课地点
<color name="widget_text_hint">#808B96</color> # 提示文字颜色:用于无课提示、底部的统计页脚
<color name="widget_divider">#EAECEE</color> # 分割线颜色:用于垂直分割线和课程间的水平线
<color name="widget_course_fallback">#F2F4F4</color> # 课程指示条兜底色:数据异常时的默认灰色
</resources>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#73CAF8</color>
</resources>
@@ -0,0 +1,575 @@
<resources>
<!-- 应用基础信息 -->
<string name="app_name">拾光课程表</string>
<!-- 通用按钮和提示信息 -->
<string name="action_confirm">确定</string>
<string name="action_cancel">取消</string>
<string name="a11y_save">保存</string>
<string name="a11y_delete">删除</string>
<string name="a11y_edit">编辑</string>
<string name="a11y_back">返回</string>
<string name="action_add">添加</string>
<string name="action_next_step">下一步</string>
<string name="title_loading">加载中...</string>
<string name="text_error">错误</string>
<string name="label_none">无</string>
<string name="action_select_all">全选</string>
<string name="action_deselect_all">取消全选</string>
<string name="a11y_state_selected">已选中</string>
<string name="a11y_state_not_selected">未选中</string>
<string name="confirm_delete">确认删除</string>
<string name="common_dialog_title_abandon_changes">放弃更改?</string>
<string name="common_dialog_msg_unsaved_changes">当前内容已修改,退出将丢失未保存的数据。</string>
<string name="common_action_exit_without_save">退出</string>
<string name="common_action_continue_editing">继续编辑</string>
<string name="label_recent_visit">最近访问</string>
<string name="action_reset">重置</string>
<string name="floating_course_hint">已挂起,左右滑周点击空白处放下</string>
<!-- 主界面及今日课表 -->
<string name="nav_today_schedule">今日课表</string>
<string name="nav_course_schedule">课表</string>
<string name="nav_settings">我的</string>
<string name="title_today_schedule">今日课表</string>
<string name="text_no_courses_today">今天没有课程</string>
<string name="title_vacation_until_start">假期中(距离开学还有%1$s天)</string>
<string name="title_semester_not_set">请设置开学日期</string>
<string name="date_format_year_month_day">yyyy年M月d日</string>
<!-- 添加课程 -->
<string name="toast_save_success">保存成功</string>
<string name="toast_delete_success">删除成功</string>
<string name="title_edit_course">编辑课程</string>
<string name="title_add_course">添加课程</string>
<string name="label_course_name">课程名称*</string>
<string name="toast_name_empty">课程名称不能为空</string>
<string name="label_teacher">教师</string>
<string name="label_position">地点</string>
<string name="label_course_time">上课时间</string>
<string name="label_day_of_week">星期</string>
<string name="label_start_section">开始节次</string>
<string name="label_end_section">结束节次</string>
<string name="toast_time_invalid">开始节次不能大于结束节次</string>
<string name="label_course_weeks">上课周次</string>
<string name="action_single_week">单周</string>
<string name="action_double_week">双周</string>
<string name="label_course_color">课程颜色</string>
<string name="button_select_color">选择颜色</string>
<string name="snackbar_add_course_within_semester">请在教学周期间添加或调整课程</string>
<string name="label_section_range_suffix">节</string>
<string name="title_select_time">选择上课时间</string>
<string name="button_select_weeks">选择周数</string>
<string name="text_weeks_selected">已选: %1$s</string>
<string name="title_select_weeks">选择上课周次</string>
<string name="title_select_color">选择课程颜色</string>
<string name="a11y_color_selected">已选择</string>
<string name="label_custom_time_range">自定义时间段</string>
<string name="label_select_custom_time">选择自定义时间</string>
<string name="toast_custom_time_empty">起始时间或结束时间不能为空</string>
<string name="label_custom_time">自定义时间</string>
<string name="label_start_time">开始时间</string>
<string name="label_end_time">结束时间</string>
<string name="label_remark">备注</string>
<!-- 课程相关 -->
<string name="course_time_description">时间: 第%1$s-%2$s节 (%3$s-%4$s)</string>
<string name="course_position_prefix">地点: %1$s</string>
<string name="course_teacher_prefix">老师: %1$s</string>
<string name="title_course_overlap">重叠课程列表</string>
<string name="label_courses_overlap">%d门重叠</string>
<string name="course_time_sections_count">(%1$s节)</string>
<string name="title_select_week">选择周次</string>
<string name="title_current_week">第 %1$s 周</string>
<string name="title_vacation">假期中</string>
<string name="status_semester_ended">学期已结束 %d 天</string>
<string name="status_week_calc_error">周次计算错误</string>
<!-- 时间与星期格式 -->
<string-array name="week_days_short_names">
<item>一</item>
<item>二</item>
<item>三</item>
<item>四</item>
<item>五</item>
<item>六</item>
<item>日</item>
</string-array>
<string-array name="week_days_full_names">
<item>周一</item>
<item>周二</item>
<item>周三</item>
<item>周四</item>
<item>周五</item>
<item>周六</item>
<item>周日</item>
</string-array>
<string name="format_week_display">%1$d周</string>
<!-- 通知与闹钟 -->
<string name="notification_channel_desc_course_alert">上课提醒通知</string>
<string name="notification_title_course_alert">上课提醒</string>
<string name="item_auto_mode">上课自动模式</string>
<string name="text_auto_mode_dependency">依赖于「课程提醒」的开启</string>
<string name="toast_enable_reminder_first">请先开启「课程提醒」</string>
<string name="alarm_option_none">不提醒</string>
<string name="alarm_option_on_time">准时提醒</string>
<string name="notification_live_status_preparing">准备上课</string>
<string name="notification_unknown_course">未知课程</string>
<string name="notification_unknown_position">地点未知</string>
<!-- 小组件相关 -->
<string name="widget_name_tiny">超小课程2x1</string>
<string name="widget_name_compact">紧凑课程2x2</string>
<string name="widget_name_double_days">近日课程4x2</string>
<string name="widget_name_list_vertical">垂直列表课表4xN</string>
<string name="widget_tomorrow_course_preview">明日预告</string>
<string name="widget_no_courses_tomorrow">明天没有课程</string>
<string name="widget_today_courses_finished">今日课程已结束</string>
<string name="widget_vacation_expecting">期待新学期</string>
<string name="widget_remaining_courses_format_today">今日还有 %1$d 节课</string>
<string name="widget_remaining_courses_format_tomorrow">明天有 %1$d 节课</string>
<string name="widget_title_today">今天</string>
<string name="widget_title_tomorrow">明天</string>
<string name="widget_course_remaining_count">剩余 %1$d 节</string>
<string name="widget_course_total_count">共有 %1$d 节</string>
<!-- 通知设置 -->
<string name="title_course_notification_settings">课程提醒设置</string>
<string name="section_title_general">常规</string>
<string name="section_title_advanced">高级</string>
<string name="text_permission_importance_title">权限设置对于 Android 提醒非常重要</string>
<string name="text_permission_importance_detail">为了确保提醒按时送达,你需要:\n1. 授予精确闹钟权限 (Android 12及以上)\n2. 开启应用的自启动权限\n3. 关闭应用的电池优化功能\n4. 授予勿扰模式权限(用于自动模式切换)\n\n请在下方的设置项中手动开启这些权限。</string>
<string name="item_course_reminder">课程提醒</string>
<string name="item_remind_time_before">提前提醒时间</string>
<string name="remind_time_minutes_format">%1$s 分钟</string>
<string name="item_exact_alarm_permission">精确闹钟权限</string>
<string name="item_dnd_permission">勿扰模式权限</string>
<string name="status_enabled">已开启</string>
<string name="status_disabled">已关闭</string>
<string name="status_authorized">已授权</string>
<string name="status_unauthorized">未授权</string>
<string name="item_background_and_autostart">后台运行和自启</string>
<string name="item_ignore_battery_optimization">忽略电池优化</string>
<string name="section_title_skip_dates">跳过日期功能</string>
<string name="text_skip_dates_experimental">实验性的功能,不保证一定有用</string>
<string name="item_update_holiday_info">更新节假日信息</string>
<string name="update_holiday_info_hint">可能不稳定(一般情况下只有年末才公布下一年的节假日信息)</string>
<string name="item_clear_skipped_dates">清空跳过日期</string>
<string name="item_view_skipped_dates">查看跳过的日期</string>
<string name="skipped_dates_count_format">%1$d 个日期</string>
<string name="skipped_dates_none">无</string>
<string name="toast_holidays_update_success">节假日信息更新成功!</string>
<string name="toast_update_failed">更新失败:%1$s</string>
<string name="toast_clear_success">已清空所有跳过日期!</string>
<string name="toast_clear_failed">清空失败:%1$s</string>
<string name="dialog_title_auto_mode_selection">上课自动模式选择</string>
<string name="auto_mode_dnd_permission_warning">(缺少勿扰权限,启用勿扰/静音可能无效)</string>
<string name="dialog_title_set_remind_time">设置提前提醒时间</string>
<string name="label_minutes_input">分钟数</string>
<string name="error_input_empty">请输入分钟数</string>
<string name="error_input_range">请输入 0 到 60 之间的数字</string>
<string name="dialog_title_exact_alarm_permission">需要精确闹钟权限</string>
<string name="dialog_text_exact_alarm_permission">为了确保提醒能在准确时间送达,请授予精确闹钟权限。</string>
<string name="action_go_to_settings">去设置</string>
<string name="dialog_title_clear_confirmation">确认清空</string>
<string name="dialog_text_clear_confirmation">这会永久清除所有跳过的日期,无法恢复。确定要继续吗?</string>
<string name="dialog_title_dnd_permission">需要勿扰模式权限</string>
<string name="dialog_text_dnd_permission">为了启用上课自动模式,请授予应用访问勿扰模式设置的权限。</string>
<string name="auto_mode_off">关闭</string>
<string name="auto_mode_dnd">勿扰模式 (DND)</string>
<string name="auto_mode_silent">静音模式 (SILENT)</string>
<string name="dialog_title_view_skipped_dates">跳过的提醒日期</string>
<string name="text_no_skipped_dates">没有设置跳过的日期。</string>
<string name="action_close">关闭</string>
<string name="toast_notification_permission_denied">通知权限被拒绝,无法接收课程提醒。</string>
<string name="item_compat_wearable_sync">兼容穿戴设备同步通知</string>
<string name="desc_compat_wearable_sync">因 Android 16 实时通知属性与部分穿戴设备通知同步软件存在兼容性冲突,开启此项将优化同步兼容性,但会停用实时更新效果</string>
<!-- 设置选项 -->
<string name="title_schedule_settings">课程表设置</string>
<string name="section_title_general_settings">通用设置</string>
<string name="item_show_non_current_week">显示非本周课程</string>
<string name="desc_show_non_current_week">在课表中展示当前周次以外的课程</string>
<string name="item_show_weekends">是否显示周末</string>
<string name="desc_show_weekends">开启后,课程表中将显示周末的课程安排</string>
<string name="item_set_start_date">设置开学日期</string>
<string name="desc_set_start_date">选择学期第一周(教务系统参考的第一周)的周一</string>
<string name="status_not_set">未设置</string>
<string name="item_total_weeks">本学期总周数</string>
<string name="desc_total_weeks">设置学期总共持续多少周</string>
<string name="status_total_weeks_format">%1$d 周</string>
<string name="item_current_week">当前周数</string>
<string name="desc_current_week_manual">手动调整当前周数</string>
<string name="status_set_start_date_first">请设置开始日期</string>
<string name="status_current_week_format">第 %1$d 周</string>
<string name="item_first_day_of_week">设置每周起始日</string>
<string name="desc_first_day_of_week">设置一周从哪天开始计算和显示</string>
<string name="day_of_week_monday">周一</string>
<string name="day_of_week_sunday">周日</string>
<string name="item_schedule_tweak">课程调动</string>
<string name="desc_schedule_tweak">一键将指定日期的所有课程调整到新日期</string>
<string name="section_title_advanced_features">高级功能</string>
<string name="item_course_conversion">课表导入/导出</string>
<string name="desc_course_conversion">支持文件、教务导入及同步功能</string>
<string name="desc_notification_settings">管理您的课程提醒通知</string>
<string name="desc_manage_course_tables">管理多份课程表,可切换、删除</string>
<string name="item_time_slot_customization">自定义时间段</string>
<string name="desc_time_slot_customization">编辑您的课程时间段设置</string>
<string name="item_more_options">更多</string>
<string name="desc_more_options">提供我们的更多信息</string>
<string name="a11y_more_options">更多选项</string>
<string name="dialog_title_select_total_weeks">选择总周数</string>
<string name="dialog_title_manual_set_week">手动设置当前周数</string>
<string name="dialog_title_set_first_day_of_week">设置每周起始日</string>
<string name="text_no_course_tables">暂无课表可选择</string>
<string name="course_table_id_prefix">ID: %s</string>
<string name="course_table_created_at_prefix">创建于: %s</string>
<string name="label_current">当前</string>
<!-- 管理课表 -->
<string name="title_manage_course_tables">管理课表</string>
<string name="dialog_title_add_table">添加新课表</string>
<string name="a11y_add_new_table">添加新课表</string>
<string name="label_table_name">课表名称</string>
<string name="text_no_tables_hint">暂无课表,点击右下角按钮添加。</string>
<string name="toast_switch_table_success">已切换到课表: %1$s</string>
<string name="toast_add_table_success">课表 \'%1$s\' 已添加</string>
<string name="dialog_title_edit_table">编辑课表名称</string>
<string name="toast_edit_table_success">课表名称已更新</string>
<string name="dialog_text_confirm_delete">您确定要删除课表 \'%1$s\' 吗?此操作无法撤销。</string>
<string name="toast_delete_table_success">%1$s 已删除</string>
<string name="toast_delete_last_table_failed">不能删除最后一个课表</string>
<string name="a11y_current_table">当前课表</string>
<string name="item_course_management">课程管理</string>
<string name="desc_course_management">按名称查看和编辑所有课程</string>
<!-- 管理课程 -->
<string name="title_selected_items_count">已选择 %1$d 项</string>
<string name="text_no_unique_courses_hint">当前课表暂无课程数据</string>
<string name="a11y_cancel_selection">取消多选</string>
<string name="a11y_exit_selection_mode">退出选择模式</string>
<string name="a11y_enter_selection_mode">进入选择模式</string>
<string name="a11y_not_selected">未选中</string>
<string name="label_weeks_format">周次: %1$s</string>
<!-- 时间段管理 -->
<string name="title_time_slot_management">时间段管理</string>
<string name="a11y_add_time_slot">添加时间段</string>
<string name="a11y_save_all_settings">保存所有设置</string>
<string name="toast_settings_saved">所有设置已保存到数据库</string>
<string name="title_default_duration_settings">默认时长设置</string>
<string name="label_class_duration_minutes">一节课时长 (分钟)</string>
<string name="toast_class_duration_positive">课程时长必须大于0分钟</string>
<string name="label_break_duration_minutes">课间休息 (分钟)</string>
<string name="toast_break_duration_non_negative">休息时长不能为负</string>
<string name="text_no_time_slots_hint">当前没有时间段。点击右上角 \'+\' 添加。</string>
<string name="toast_slot_removed_unsaved">时间段已从列表移除,请点击保存以更新数据库</string>
<string name="time_slot_section_number">第 %1$s 节</string>
<string name="a11y_delete_time_slot">删除时间段</string>
<string name="dialog_title_edit_time_slot">编辑时间段</string>
<string name="dialog_title_add_time_slot">添加新时间段</string>
<string name="label_time_picker_start">开始</string>
<string name="label_time_picker_end">结束</string>
<string name="label_time_picker_hour">小时</string>
<string name="label_time_picker_minute">分钟</string>
<string name="action_save_changes">保存更改</string>
<string name="toast_end_time_must_be_later">结束时间必须晚于开始时间</string>
<string name="toast_slot_modified_unsaved">时间段已修改,请点击保存以更新数据库</string>
<string name="toast_slot_added_unsaved">时间段已添加至列表,请点击保存以更新数据库</string>
<string name="label_time_slot_alias">别名(可选)</string>
<string name="toast_time_conflict">选择的时间超出了前后课时限制范围</string>
<!-- 课表导入/导出 -->
<string name="title_conversion">课表导入/导出</string>
<string name="section_file_conversion">文件导入/导出</string>
<string name="item_import_course_file">课程文件导入</string>
<string name="desc_import_json">导入json文件</string>
<string name="item_export_course_file">课程文件导出</string>
<string name="desc_export_json_with_config">导出携带时间段配置的json课程文件</string>
<string name="item_export_ics_file">日历文件导出</string>
<string name="desc_export_ics_with_alarm">导出ics文件,点击生成指定提醒时间参数的文件</string>
<string name="section_school_import">教务导入</string>
<string name="item_school_system_import">教务系统导入</string>
<string name="desc_school_import_quick">从教务系统导入课程,方便快捷</string>
<string name="dialog_title_select_import_table">选择要导入的目标课表</string>
<string name="dialog_title_select_export_table">选择要导出的课表</string>
<string name="dialog_title_ics_export_settings">日历导出设置</string>
<string name="label_select_alarm_time">选择提醒时间:</string>
<string name="a11y_import">导入</string>
<string name="a11y_export">导出</string>
<string name="a11y_details">详情</string>
<string name="snackbar_cannot_open_file">无法打开文件。</string>
<string name="snackbar_file_selection_canceled">文件选择已取消。</string>
<string name="snackbar_cannot_save_file">无法保存文件。</string>
<string name="snackbar_file_save_canceled">文件保存已取消。</string>
<string name="dialog_title_file_saved">文件已保存</string>
<string name="dialog_text_file_saved_share_prompt">文件已成功导出到您的下载目录,您想分享它吗?</string>
<string name="snackbar_file_copy_failed_for_share">文件复制失败,无法分享。</string>
<string name="action_share">分享</string>
<string name="toast_import_success">课表导入成功!</string>
<string name="toast_ics_export_success">日历文件导出成功!</string>
<string name="error_export_table_not_found">导出失败:找不到课表</string>
<string name="error_export_failed">导出失败:%1$s</string>
<string name="error_import_failed">导入失败:%1$s</string>
<string name="error_ics_export_data_failed">日历文件导出失败:获取数据失败</string>
<string name="error_ics_export_failed">日历文件导出失败:%1$s</string>
<string name="section_sync">同步</string>
<string name="item_sync_to_system_calendar">同步到系统日历</string>
<string name="desc_sync_to_system_calendar">将当前课表一键同步至手机系统日历</string>
<string name="toast_sync_calendar_success">同步成功</string>
<string name="error_sync_calendar_failed">同步失败,请检查日历权限</string>
<!-- 更多设置 -->
<string name="title_more_options">更多</string>
<string name="a11y_app_icon">应用图标</string>
<string name="a11y_navigate">跳转</string>
<string name="a11y_acknowledgment">鸣谢</string>
<string name="label_special_thanks">特别鸣谢</string>
<string name="text_acknowledgment_body">衷心感谢为本应用软件和教务适配代码仓库的开发和维护做出贡献的每一位开发者。您的奉献是应用持续更新和完善的动力!</string>
<string name="item_github_repo">本项目GitHub仓库</string>
<string name="item_open_source_licenses">查看开源许可证</string>
<string name="title_open_source_licenses">开源许可证</string>
<string name="item_update_repo">更新教务适配仓库</string>
<string name="item_contributors">贡献者列表</string>
<string name="label_version_prefix">版本: %1$s</string>
<string name="default_app_name">未知应用</string>
<string name="item_check_software_update">检查软件更新</string>
<string name="item_language_settings">语言设置</string>
<string name="language_follow_system">跟随系统</string>
<string name="dialog_checking_update">正在检查更新...</string>
<string name="tip_please_wait">正在连接服务器,请稍候。</string>
<string name="dialog_new_version_found">发现新版本 %s</string>
<string name="dialog_current_version_latest">当前版本已是最新</string>
<string name="dialog_update_check_failed">更新检查失败</string>
<string name="label_error_message">错误信息:%s</string>
<string name="btn_download_update">下载更新</string>
<string name="btn_update_now">立即更新</string>
<string name="tip_non_mandatory_update">提示:强制更新不会显示此取消按钮。</string>
<string name="dialog_select_update_channel">选择更新渠道</string>
<string name="a11y_selected">已选中</string>
<string name="item_start_screen_settings">启动页面设置</string>
<string name="dialog_select_start_screen">选择启动时显示的页面</string>
<!-- 课程调动 -->
<string name="title_tweak_schedule">调课</string>
<string name="a11y_save_tweak">保存调课更改</string>
<string name="label_select_tweak_table">选择要调整的课表</string>
<string name="action_select_table">选择课表</string>
<string name="label_tweak_from_date">被调整日期</string>
<string name="label_tweak_to_date">调整到日期</string>
<string name="text_tweak_hint">请确认以下两个日期的课程信息,点击右上角保存即可完成调课。</string>
<string name="title_tweak_from_course">被调整的课程</string>
<string name="a11y_arrow">箭头</string>
<string name="title_tweak_to_course">调整到日期的课程</string>
<string name="text_no_course">无课程</string>
<string name="error_tweak_no_table_or_semester">请先选择课表并设置学期开始日期</string>
<string name="error_tweak_same_day">被调整日期和调整到日期不能是同一天</string>
<string name="toast_tweak_success">调课成功!</string>
<string name="error_tweak_failed">调课失败:%1$s</string>
<string name="course_time_day_section_details_tweak">%1$s | 节次 %2$s-%3$s</string>
<string name="course_time_day_time_details_tweak">%1$s | 时间 %2$s-%3$s</string>
<string name="tweak_mode_merge">合并 (A + B)</string>
<string name="tweak_mode_overwrite">覆盖 (A → B)</string>
<string name="tweak_mode_exchange">交换 (A ↔ B)</string>
<!-- 教务导入 -->
<string name="title_select_school">选择学校</string>
<string name="search_hint_school">搜索学校名称或首字母</string>
<string name="text_no_adapter_for_category">当前类别暂无适配,请选择其他类别或检查数据源。</string>
<string name="text_no_school_found">没有找到匹配的学校</string>
<string name="a11y_search">搜索</string>
<string name="a11y_clear_search">清除搜索</string>
<string name="a11y_school_icon">学校图标</string>
<string name="category_bachelor_associate">本科/专科</string>
<string name="category_postgraduate">研究生</string>
<string name="category_general_tool">通用工具</string>
<string name="category_other">其他</string>
<string name="a11y_back_to_school_list">返回学校列表</string>
<string name="text_no_detailed_description">无详细描述。</string>
<string name="label_contributor_unknown">未知</string>
<string name="label_contributor_format">贡献者: %1$s</string>
<string name="text_no_adapter_for_category_school">该学校在「%1$s」类别下暂无适配器。</string>
<string name="title_enter_url">输入网址</string>
<string name="a11y_cancel_editing">取消编辑</string>
<string name="placeholder_enter_url_full">输入网址 (https://...)</string>
<string name="a11y_load">加载</string>
<string name="a11y_enter_url">输入网址</string>
<string name="action_refresh">刷新</string>
<string name="a11y_refresh">刷新</string>
<string name="action_switch_to_phone_mode">切换到手机模式</string>
<string name="action_switch_to_desktop_mode">切换到电脑模式</string>
<string name="toast_switched_to_desktop">已切换到电脑模式</string>
<string name="toast_switched_to_phone">已切换到手机模式</string>
<string name="toast_url_empty_enter_first">URL为空,请先输入网址。</string>
<string name="item_devtools_debug">DevTools 网页调试</string>
<string name="a11y_devtools">DevTools</string>
<string name="toast_devtools_enabled_format">DevTools 网页调试 %1$s。</string>
<string name="text_import_guide">请登录教务系统后切换到有课表显示的页面再点击导入课程,点击右上角的更多查看其他选项</string>
<string name="action_execute_import">执行导入</string>
<string name="toast_no_script_manual_import">该适配器没有脚本,请手动导入。</string>
<string name="dialog_title_select_table_for_import">选择一个课表以导入课程</string>
<string name="toast_executing_import_script">正在执行导入脚本...</string>
<string name="toast_import_script_not_found">导入脚本文件不存在: %1$s</string>
<string name="toast_load_import_script_failed">加载导入脚本失败: %1$s</string>
<string name="toast_no_import_script">该适配器没有导入脚本</string>
<string name="toast_import_script_finished">导入脚本执行完毕,返回课表页面。</string>
<string name="dialog_ssl_error_title">SSL 证书错误</string>
<string name="dialog_ssl_error_message">SSL证书验证失败,这可能意味着连接不安全。是否继续浏览?</string>
<string name="action_continue_browsing">继续浏览</string>
<string name="toast_ssl_error_cancelled">SSL证书验证失败,已取消连接。</string>
<string name="toast_web_load_error_format">网页加载错误: %1$s</string>
<!-- 贡献者列表 -->
<string name="title_contribution_list">贡献列表</string>
<string name="tab_adapter_development">教务适配</string>
<string name="tab_app_development">软件开发</string>
<string name="text_no_contributors">当前类别暂无贡献者信息。</string>
<string name="text_loading_failed">加载失败: %1$s</string>
<string name="action_retry">重试</string>
<string name="label_github">GitHub</string>
<string name="a11y_back_to_previous">返回上一页</string>
<string name="a11y_contributor_avatar">贡献者头像: %1$s</string>
<!-- 教务适配仓库 -->
<string name="title_update_repo_screen">更新教务适配仓库</string>
<string name="label_select_repo">选择仓库</string>
<string name="text_select_repo_hint">请选择仓库</string>
<string name="action_update">更新</string>
<string name="action_updating">更新中...</string>
<string name="label_repo_url">仓库 URL</string>
<string name="label_repo_branch">分支 (Branch)</string>
<string name="label_private_repo_credentials">私有仓库凭证 (Username/Token)</string>
<string name="label_username_or_token_key">用户名或 Token Key</string>
<string name="label_password_or_token_value">密码或 Token Value</string>
<string name="title_update_log">更新日志</string>
<!-- 色彩编辑器 -->
<string name="color_picker_title_edit">颜色调节</string>
<string name="color_picker_title_precise">精准数值</string>
<string name="color_picker_mode_visual">滑块模式</string>
<string name="color_picker_mode_input">数字模式</string>
<string name="color_picker_label_hue">色相</string>
<string name="color_picker_label_saturation">饱和度</string>
<string name="color_picker_label_value">亮度</string>
<string name="color_picker_label_alpha">透明度</string>
<string name="a11y_switch_color_mode">切换输入方式</string>
<!-- 个性化配置 -->
<string name="item_personalization">个性化配置</string>
<string name="desc_personalization">调整课表格子高度、圆角、间距及透明度</string>
<string name="style_category_interface">界面显示</string>
<string name="style_category_grid_size">网格尺寸</string>
<string name="style_category_course_block">课程块配置</string>
<string name="style_category_color_scheme">颜色方案 (点击圆形编辑)</string>
<string name="label_wallpaper">课表背景壁纸</string>
<string name="desc_wallpaper_set">已设置 (长按可清除)</string>
<string name="desc_wallpaper_unset">未设置 (点击选择图片)</string>
<string name="label_hide_section_time">隐藏节次具体时间</string>
<string name="label_hide_date_under_day">隐藏日期 (周几下方)</string>
<string name="label_hide_grid_lines">隐藏网格线</string>
<string name="label_show_start_time">显示课程格开始时间</string>
<string name="label_section_height">格子高度</string>
<string name="label_time_column_width">侧边栏宽度</string>
<string name="label_day_header_height">顶部表头高度</string>
<string name="label_hide_location">隐藏上课地点</string>
<string name="label_hide_teacher">隐藏授课老师</string>
<string name="label_remove_location_at">移除地点前的 @ 符号</string>
<string name="label_font_scale">文字缩放比例</string>
<string name="label_corner_radius">圆角半径</string>
<string name="label_inner_padding">内部填充</string>
<string name="label_outer_padding">外部间距</string>
<string name="label_opacity">不透明度</string>
<string name="title_light_color_pool">浅色模式颜色池</string>
<string name="title_dark_color_pool">深色模式颜色池</string>
<string name="preview_light_mode">浅色模式预览\n固定深色文字</string>
<string name="preview_dark_mode">深色模式预览\n固定浅色文字</string>
<string name="action_reset_style">恢复默认样式设置</string>
<string name="dialog_reset_title">重置样式</string>
<string name="dialog_reset_message">确定要将所有样式设置恢复为默认值吗?此操作不可撤销。</string>
<string name="action_confirm_crop">确定裁剪</string>
<string name="label_text_align_center_h">文字水平居中</string>
<string name="label_text_align_center_v">文字垂直居中</string>
<string name="label_border_type">边框样式</string>
<string name="border_type_solid">实线</string>
<string name="border_type_dashed">虚线</string>
<string name="label_range">范围</string>
<string name="placeholder_input_value">请输入数值</string>
<string name="label_page_text_color">课表页面文字颜色</string>
<string name="label_course_text_color">课程块文字颜色</string>
<string name="label_schedule_mode_24h">24小时时间轴模式</string>
<!-- 快捷操作 -->
<string name="item_quick_actions">快捷操作</string>
<string name="desc_quick_actions">包含调课、课程临时变动等功能</string>
<string name="label_quick_action_category_schedule">课表调整</string>
<string name="item_quick_delete">快速删除课程</string>
<string name="quick_delete_subtitle">按周次、星期或特定日期批量清理课表</string>
<!-- 快速删除课程 -->
<string name="label_dimension_weeks_days">维度一:按周次和星期</string>
<string name="label_dimension_dates">维度二:按特定日期</string>
<string name="hint_no_selection">请选择周次、星期或日期</string>
<string name="hint_affected_count">预计从课表中移除 %1$d 节课程记录</string>
<string name="dialog_delete_confirm_msg">此操作不可撤销。受影响的课程记录将从选定的时间点中抹除,但课程的基础信息仍会保留。</string>
<string name="btn_add_date">添加日期</string>
<string name="quick_delete_filter_weeks_days_hint">设置重复周次与星期 (可选)</string>
<string name="quick_delete_filter_date_range_hint">设置特定日期范围 (可选)</string>
<string name="quick_delete_label_days_prefix">星期: %1$s</string>
<string name="quick_delete_dialog_select_date_title">选择日期范围</string>
<string name="quick_delete_success">课表清理成功</string>
<string name="error_load_failed">初始化失败,请重试</string>
<string name="error_op_failed">操作失败: %1$s</string>
<!-- 主题设置 -->
<string name="theme_follow_system">跟随系统</string>
<string name="theme_light">浅色模式</string>
<string name="theme_dark">深色模式</string>
<string name="theme_settings_title">主题设置</string>
<string name="theme_mode_label">主题模式切换</string>
<string name="dynamic_color_title">动态取色 (Material You)</string>
<string name="dynamic_color_desc">基于系统壁纸自动生成配色方案(仅支持 Android 12+)</string>
<string name="custom_color_title">自定义主色调</string>
<string name="light_primary_color">浅色模式主色</string>
<string name="dark_primary_color">深色模式主色</string>
<string name="theme_color_hint">说明:改变此颜色后,系统将作为种子色重新计算全应用配色方案。</string>
<!-- 备份和还原 -->
<string name="backup_err_empty">备份文件为空,无法恢复</string>
<string name="backup_err_corrupted">文件解析失败,数据可能已损坏</string>
<string name="backup_err_version_too_new">该备份数据版本过新,请升级 App 后再试</string>
<string name="item_backup_restore">备份与恢复</string>
<string name="desc_backup_restore">支持云盘与本地文件多渠道备份,保障课表数据安全</string>
<string name="section_data_maintenance">数据维护</string>
<string name="item_backup_data">备份数据</string>
<string name="desc_backup_data">将当前的课表及配置打包保存</string>
<string name="item_restore_data">恢复数据</string>
<string name="desc_restore_data">下载并覆盖本地课表配置数据</string>
<string name="section_service_config">服务配置</string>
<string name="item_webdav_config">WebDAV 参数配置</string>
<string name="desc_webdav_unconfigured">未配置网盘连接</string>
<string name="desc_webdav_connected">已连接: %1$s</string>
<string name="dialog_title_backup_target">选择备份目标渠道</string>
<string name="dialog_title_restore_source">选择恢复数据来源</string>
<string name="dialog_title_config_webdav">配置 WebDAV</string>
<string name="label_webdav_url">服务器地址 (URL)</string>
<string name="label_webdav_account">账号</string>
<string name="label_webdav_pwd_saved">密码已保存 (留空不修改)</string>
<string name="label_webdav_pwd_empty">应用独立密码</string>
<string name="label_webdav_path">云端备份位置</string>
<string name="desc_webdav_path_hint">实际数据将隔离保存在该目录下的 /Backup 文件夹中</string>
<string name="toast_operation_success">操作成功完成</string>
<string name="toast_operation_failed">操作失败: %1$s</string>
<string name="error_webdav_unconfigured">请先配置 WebDAV 服务</string>
<string name="error_stream_open_failed">无法打开数据流</string>
<string name="backup_err_connect_failed">连接失败,请检查配置或网络</string>
<string name="backup_err_upload_failed">文件上传失败</string>
<string name="backup_err_download_failed">下载备份失败</string>
<string name="backup_err_local_export_failed">本地导出失败</string>
<string name="backup_err_restore_failed_prefix">还原失败: %1$s</string>
<string name="backup_target_webdav">WebDAV 云同步</string>
<string name="backup_target_local_zip">本地 ZIP 文件</string>
</resources>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.shiguangschedule" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:windowBackground">?android:attr/colorBackground</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowAnimationStyle">@style/Animation.App.Activity</item>
</style>
<style name="Animation.App.Activity" parent="@android:style/Animation.Activity">
<!-- 禁用 Activity 级别的动画,将转场动画交给 Compose Navigation 处理 -->
<item name="android:activityOpenEnterAnimation">@null</item>
<item name="android:activityOpenExitAnimation">@null</item>
<item name="android:activityCloseEnterAnimation">@null</item>
<item name="android:activityCloseExitAnimation">@null</item>
</style>
</resources>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older than API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<cache-path name="share_temp_files" path="share_temp/" />
</paths>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="110dp"
android:minHeight="110dp"
android:targetCellWidth="2"
android:targetCellHeight="2"
android:updatePeriodMillis="1800000"
android:initialLayout="@layout/widget_loading_placeholder"
android:previewImage="@drawable/widget_preview_compact"
android:resizeMode="horizontal|vertical"
android:widgetCategory="home_screen">
</appwidget-provider>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="250dp"
android:minHeight="110dp"
android:targetCellWidth="4"
android:targetCellHeight="2"
android:updatePeriodMillis="1800000"
android:initialLayout="@layout/widget_loading_placeholder"
android:previewImage="@drawable/widget_preview_double_days"
android:resizeMode="horizontal|vertical"
android:widgetCategory="home_screen">
</appwidget-provider>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="@layout/widget_loading_placeholder"
android:minWidth="250dp"
android:minHeight="110dp"
android:minResizeWidth="250dp"
android:minResizeHeight="70dp"
android:updatePeriodMillis="1800000"
android:resizeMode="vertical"
android:widgetCategory="home_screen"
android:previewImage="@drawable/widget_preview_list_vertical"
android:targetCellWidth="4"
android:targetCellHeight="2">
</appwidget-provider>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="110dp"
android:minHeight="40dp"
android:targetCellWidth="2"
android:targetCellHeight="1"
android:updatePeriodMillis="1800000"
android:initialLayout="@layout/widget_loading_placeholder"
android:previewImage="@drawable/widget_preview_tiny"
android:resizeMode="horizontal|vertical"
android:widgetCategory="home_screen">
</appwidget-provider>
+24
View File
@@ -0,0 +1,24 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.multiplatform.library) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.compose.multiplatform) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.koin.compiler) apply false
alias(libs.plugins.androidx.room3) apply false
alias(libs.plugins.aboutLibraries) apply false
alias(libs.plugins.wire) apply false
}
allprojects {
configurations.all {
exclude(group = "io.opencensus", module = "opencensus-api")
exclude(group = "io.opencensus", module = "opencensus-proto")
exclude(group = "io.opentelemetry", module = "opentelemetry-api")
exclude(group = "io.opentelemetry", module = "opentelemetry-context")
}
}
+4
View File
@@ -0,0 +1,4 @@
bin/
**/bin/
build/
**/build/
@@ -0,0 +1,43 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.compose.multiplatform)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.koin.compiler)
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
}
}
dependencies {
implementation(project(":shared"))
implementation(project.dependencies.platform(libs.koin.bom))
implementation(libs.koin.core)
implementation(libs.koin.compose)
implementation(compose.desktop.currentOs)
implementation(libs.kotlinx.coroutines.swing)
implementation(libs.compose.ui.tooling.preview)
}
compose.desktop {
application {
mainClass = "com.xingheyuzhuan.shiguangschedule.MainKt"
buildTypes.release.proguard {
isEnabled.set(false)
}
nativeDistributions {
targetFormats(TargetFormat.Exe, TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "com.xingheyuzhuan.shiguangschedule"
packageVersion = "1.0.0"
}
}
}
@@ -0,0 +1,13 @@
package com.xingheyuzhuan.shiguangschedule
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
fun main() = application {
Window(
onCloseRequest = ::exitApplication,
title = "shiguangschedule",
) {
App()
}
}
@@ -0,0 +1,16 @@
New Features:
Introduced MaterialKolor dynamic theming and polished theme/UI details
Bug Fixes:
Optimized WebView status bar adaptation and implemented soft keyboard auto-resize
Improvements:
Enhanced dark/light mode switching UI experience
Refined semester end status display: replaced weeks-overrun with precise days-elapsed count
Full release notes:
https://github.com/XingHeYuZhuan/shiguangschedule/releases/tag/v2.0.0
@@ -0,0 +1,17 @@
Shiguang Schedule is an open-source schedule management tool designed for Chinese university students and educators. It supports one-click import of course data from various educational administration systems through adaptable scripts. Starting from version 2.x, the project has been migrated to the Compose Multiplatform framework and currently supports Android 8.0+.
Key features include:
Today & Weekly Schedule View: Swipe left or right to switch between weeks, long-press to adjust course block positions or heights
Personalized Schedule Customization: Support for custom background images, adjustable cell height, corner radius, spacing, transparency, and customizable course block colors
Dark Mode: Full interface and widgets with dark theme support
Home Screen Widgets: Multiple widget options with next-day preview support
Course Import & Export: JSON file import/export, ICS file export, and WebDAV cloud backup sync
Course Reminders: Automatic Do Not Disturb or silent mode activation during class, with holiday data integration to prevent interruptions
Multi-language Support: Simplified Chinese, Traditional Chinese, English
@@ -0,0 +1 @@
../../../../../picture/icon.png
@@ -0,0 +1 @@
../../../../../picture/Screenshot_1.png
@@ -0,0 +1 @@
../../../../../picture/Screenshot_2.png
@@ -0,0 +1 @@
../../../../../picture/Screenshot_3.png
@@ -0,0 +1 @@
Open-source ad-free class schedule app with one-click import
@@ -0,0 +1 @@
Shiguang Schedule
@@ -0,0 +1,16 @@
新功能:
引入 MaterialKolor 动态配色,优化主题与 UI 细节
Bug 修复:
优化 WebView 状态栏适配,实现软键盘自动避让
体验优化:
优化深色/浅色模式切换体验
优化“学期结束”状态显示,将超出周数改为更精确的已结束天数
完整更新日志:
https://github.com/XingHeYuZhuan/shiguangschedule/releases/tag/v2.0.0
@@ -0,0 +1,17 @@
拾光课程表是一款面向中国高校师生的开源课程表管理工具,支持通过适配脚本一键导入各类教务系统的课程数据。项目从 2.x 版本开始迁移到 Compose Multiplatform 多平台框架,目前支持 Android 8.0+ 系统。
主要功能包括:
今日课表与周课表:支持左右滑动切换周次,长按调整课程块位置或高度
课表个性化配置:支持自定义背景图片、调整格子高度/圆角/间距/透明度、自定义课程块颜色等
深色模式:全界面及小组件均支持深色适配
桌面小组件:提供多种功能小组件,支持明日预告
课程导入与导出:支持 JSON 文件导入导出、ICS 文件导出、WebDAV 云备份同步
课程提醒:支持上课自动开启勿扰或静音模式,获取节假日数据防止打扰
多语言支持:简体中文、繁体中文、英语
@@ -0,0 +1 @@
开源无广告课程表APP,支持教务系统一键导入
@@ -0,0 +1 @@
拾光课程表
+14
View File
@@ -0,0 +1,14 @@
# Kotlin
kotlin.code.style=official
kotlin.daemon.jvmargs=-Xmx4096M
# Gradle
org.gradle.jvmargs=-Xmx4096M -Dfile.encoding=UTF-8
org.gradle.configuration-cache=true
org.gradle.caching=true
org.gradle.parallel=true
kotlin.native.ignoreDisabledTargets=true
# Android
android.nonTransitiveRClass=true
android.useAndroidX=true
+144
View File
@@ -0,0 +1,144 @@
[versions]
# 构建与 SDK 版本
agp = "9.3.1"
android-compileSdk = "37"
android-minSdk = "26"
android-targetSdk = "37"
kotlin = "2.4.0"
ksp = "2.3.10"
# KMP & Compose Multiplatform 专属
composeMultiplatform = "1.11.1"
kotlinxCoroutines = "1.11.0"
material3 = "1.9.0"
materialKolor = "5.0.0"
compose-adaptive = "1.2.0"
# KMP 跨平台核心组件
lifecycle = "2.11.0"
compose-multiplatform-lifecycle = "2.11.0"
multiplatform-nav3-ui = "1.1.1"
room3 = "3.0.1"
sqlite = "2.7.0"
datastore = "1.2.1"
# Android 平台专属依赖
coreKtx = "1.19.0"
appcompat = "1.8.0"
activityCompose = "1.13.0"
work-runtime = "2.11.2"
# 网络与持久化/序列化
ktor = "3.5.2"
wire = "6.4.5"
kotlinSerialization = "1.11.0"
okio = "3.18.1"
kotlinxDateTime = "0.8.0"
# 依赖注入 (DI) & 工具库
koin = "4.2.2"
koin-plugin = "1.1.0"
coil = "3.5.0"
aboutLibraries = "15.0.4"
kgit = "1.0.2"
# 测试框架
junit = "4.13.2"
junitVersion = "1.3.0"
espressoCore = "3.7.0"
[libraries]
# Compose Multiplatform 跨平台核心 UI 库
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "composeMultiplatform" }
compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "composeMultiplatform" }
compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "material3" }
compose-material3-adaptive = { module = "org.jetbrains.compose.material3.adaptive:adaptive", version.ref = "compose-adaptive" }
compose-material3-adaptive-navigation-suite = { module = "org.jetbrains.compose.material3:material3-adaptive-navigation-suite", version.ref = "material3" }
compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "composeMultiplatform" }
compose-ui-tooling = { module = "org.jetbrains.compose.ui:ui-tooling", version.ref = "composeMultiplatform" }
compose-ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "composeMultiplatform" }
compose-animation = { module = "org.jetbrains.compose.animation:animation", version.ref = "composeMultiplatform" }
compose-components-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "composeMultiplatform" }
# Dynamic Color 动态主题
material-kolor = { module = "com.materialkolor:material-kolor", version.ref = "materialKolor" }
# Kotlin & 通用测试
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinxCoroutines" }
# Android 平台专属基础库
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" }
# KMP Lifecycle (JetBrains Compose Multiplatform 移植版)
androidx-lifecycle-viewmodel-compose = { group = "org.jetbrains.androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "compose-multiplatform-lifecycle" }
androidx-lifecycle-runtime-compose = { group = "org.jetbrains.androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "compose-multiplatform-lifecycle" }
# Navigation 3 多平台核心 UI 库 (JetBrains 移植)
androidx-navigation3-ui = { module = "org.jetbrains.androidx.navigation3:navigation3-ui", version.ref = "multiplatform-nav3-ui" }
# Navigation 3 ViewModel 扩展 (JetBrains 移植)
androidx-lifecycle-viewmodel-navigation3 = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-navigation3", version.ref = "compose-multiplatform-lifecycle" }
# Jetpack DataStore & Room 3.0 / SQLite 驱动
androidx-datastore-core = { module = "androidx.datastore:datastore-core", version.ref = "datastore" }
androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastore" }
androidx-room3-runtime = { module = "androidx.room3:room3-runtime", version.ref = "room3" }
androidx-room3-compiler = { module = "androidx.room3:room3-compiler", version.ref = "room3" }
androidx-sqlite-bundled = { module = "androidx.sqlite:sqlite-bundled", version.ref = "sqlite" }
androidx-sqlite-framework = { module = "androidx.sqlite:sqlite-framework", version.ref = "sqlite" }
# WorkManager
androidx-work-runtime-ktx = { group = "androidx.work", name = "work-runtime-ktx", version.ref = "work-runtime" }
# Ktor (跨平台 HTTP 客户端)
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" }
ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" }
ktor-client-auth = { module = "io.ktor:ktor-client-auth", version.ref = "ktor" }
# Kotlinx 序列化 & 基础工具
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinSerialization" }
kotlinx-serialization-cbor = { module = "org.jetbrains.kotlinx:kotlinx-serialization-cbor", version.ref = "kotlinSerialization" }
wire-runtime = { module = "com.squareup.wire:wire-runtime", version.ref = "wire" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
kgit = { module = "io.github.xingheyuzhuan:kgit", version.ref = "kgit" }
aboutlibraries-compose-m3 = { module = "com.mikepenz:aboutlibraries-compose-m3", version.ref = "aboutLibraries" }
coil-compose = { group = "io.coil-kt.coil3", name = "coil-compose", version.ref = "coil" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDateTime" }
# Koin 依赖注入
koin-bom = { module = "io.insert-koin:koin-bom", version.ref = "koin" }
koin-core = { module = "io.insert-koin:koin-core" }
koin-android = { module = "io.insert-koin:koin-android" }
koin-androidx-workmanager = { module = "io.insert-koin:koin-androidx-workmanager" }
koin-compose = { module = "io.insert-koin:koin-compose" }
koin-compose-viewmodel = { module = "io.insert-koin:koin-compose-viewmodel" }
koin-compose-navigation3 = { module = "io.insert-koin:koin-compose-navigation3" }
koin-annotations = { module = "io.insert-koin:koin-annotations", version.ref = "koin" }
# Android 单元测试与 UI 测试
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
[plugins]
android-multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" }
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutLibraries" }
wire = { id = "com.squareup.wire", version.ref = "wire" }
koin-compiler = { id = "io.insert-koin.compiler.plugin", version.ref = "koin-plugin" }
androidx-room3 = { id = "androidx.room3", version.ref = "room3" }
Binary file not shown.
@@ -0,0 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-9.7.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+248
View File
@@ -0,0 +1,248 @@
#!/bin/sh
#
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# gradlew start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh gradlew
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
+82
View File
@@ -0,0 +1,82 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem gradlew startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables, and ensure extensions are enabled
setlocal EnableExtensions
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
"%COMSPEC%" /c exit 1
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
"%COMSPEC%" /c exit 1
:execute
@rem Setup the command line
@rem Execute gradlew
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
@rem which allows us to clear the local environment before executing the java command
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
:exitWithErrorLevel
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
"%COMSPEC%" /c exit %ERRORLEVEL%
@@ -0,0 +1,7 @@
TEAM_ID=
PRODUCT_NAME=shiguangschedule
PRODUCT_BUNDLE_IDENTIFIER=com.xingheyuzhuan.shiguangschedule.shiguangschedule$(TEAM_ID)
CURRENT_PROJECT_VERSION=1
MARKETING_VERSION=1.0
@@ -0,0 +1,373 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 77;
objects = {
/* Begin PBXFileReference section */
B0EB974DD415F94C5A2E2057 /* shiguangschedule.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = shiguangschedule.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
2170B10D8CE8488BBB7E3C9C /* Exceptions for "iosApp" folder in "iosApp" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
);
target = 18E2F64E676B7E4CE86CBEAD /* iosApp */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
B2B6507A86EF9B2346D4CD53 /* iosApp */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
2170B10D8CE8488BBB7E3C9C /* Exceptions for "iosApp" folder in "iosApp" target */,
);
path = iosApp;
sourceTree = "<group>";
};
CD24D634E28CCF7380E324B0 /* Configuration */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = Configuration;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */
5115A4631696066D6D06EF02 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7432EE868F35C0EF6AF54761 = {
isa = PBXGroup;
children = (
CD24D634E28CCF7380E324B0 /* Configuration */,
B2B6507A86EF9B2346D4CD53 /* iosApp */,
5F8CA987189A97BF779811DB /* Products */,
);
sourceTree = "<group>";
};
5F8CA987189A97BF779811DB /* Products */ = {
isa = PBXGroup;
children = (
B0EB974DD415F94C5A2E2057 /* shiguangschedule.app */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
18E2F64E676B7E4CE86CBEAD /* iosApp */ = {
isa = PBXNativeTarget;
buildConfigurationList = 001BC623CAC276C65C40750E /* Build configuration list for PBXNativeTarget "iosApp" */;
buildPhases = (
096DF9D1872A928F78B8C056 /* Compile Kotlin Framework */,
7A00F878521985D9FF3DBE6A /* Sources */,
5115A4631696066D6D06EF02 /* Frameworks */,
533F8F481AD5BB4EFC63577D /* Resources */,
);
buildRules = (
);
dependencies = (
);
fileSystemSynchronizedGroups = (
B2B6507A86EF9B2346D4CD53 /* iosApp */,
);
name = iosApp;
packageProductDependencies = (
);
productName = iosApp;
productReference = B0EB974DD415F94C5A2E2057 /* shiguangschedule.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
8E7690AF678C165D5D351BD5 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1620;
LastUpgradeCheck = 1620;
TargetAttributes = {
18E2F64E676B7E4CE86CBEAD = {
CreatedOnToolsVersion = 16.2;
};
};
};
buildConfigurationList = CFD886605312C2B9BF900F3E /* Build configuration list for PBXProject "iosApp" */;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7432EE868F35C0EF6AF54761;
minimizedProjectReferenceProxies = 1;
preferredProjectObjectVersion = 77;
productRefGroup = 5F8CA987189A97BF779811DB /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
18E2F64E676B7E4CE86CBEAD /* iosApp */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
533F8F481AD5BB4EFC63577D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
096DF9D1872A928F78B8C056 /* Compile Kotlin Framework */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Compile Kotlin Framework";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\ncd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7A00F878521985D9FF3DBE6A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
DD67D8374B5EBE450051983F /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReferenceAnchor = CD24D634E28CCF7380E324B0 /* Configuration */;
baseConfigurationReferenceRelativePath = Config.xcconfig;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 18.2;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
21C2C8BDEF6C564B2812C67A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReferenceAnchor = CD24D634E28CCF7380E324B0 /* Configuration */;
baseConfigurationReferenceRelativePath = Config.xcconfig;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 18.2;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
3D68B4775A8925634E2AB881 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
DEVELOPMENT_TEAM = "${TEAM_ID}";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = iosApp/Info.plist;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DDD887ED6E0A966C9589212 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
DEVELOPMENT_TEAM = "${TEAM_ID}";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = iosApp/Info.plist;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
CFD886605312C2B9BF900F3E /* Build configuration list for PBXProject "iosApp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DD67D8374B5EBE450051983F /* Debug */,
21C2C8BDEF6C564B2812C67A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
001BC623CAC276C65C40750E /* Build configuration list for PBXNativeTarget "iosApp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3D68B4775A8925634E2AB881 /* Debug */,
7DDD887ED6E0A966C9589212 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 8E7690AF678C165D5D351BD5 /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,36 @@
{
"images" : [
{
"filename" : "app-icon-1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "tinted"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,18 @@
import UIKit
import SwiftUI
import Shared
struct ComposeView: UIViewControllerRepresentable {
func makeUIViewController(context: Self.Context) -> UIViewController {
MainViewControllerKt.MainViewController()
}
func updateUIViewController(_ uiViewController: UIViewController, context: Self.Context) {}
}
struct ContentView: View {
var body: some View {
ComposeView()
.ignoresSafeArea()
}
}

Some files were not shown because too many files have changed in this diff Show More