diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..7df8dff --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,9 @@ +# generated files +bin/ +gen/ + +# Local configuration file (sdk path, etc) +project.properties +.settings/ +.classpath +.project diff --git a/src/.gradle/.idea/.gradle.iml b/src/.gradle/.idea/.gradle.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/src/.gradle/.idea/.gradle.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/.gradle/.idea/misc.xml b/src/.gradle/.idea/misc.xml new file mode 100644 index 0000000..1945ce5 --- /dev/null +++ b/src/.gradle/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/.gradle/.idea/modules.xml b/src/.gradle/.idea/modules.xml new file mode 100644 index 0000000..102bf94 --- /dev/null +++ b/src/.gradle/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/.gradle/.idea/workspace.xml b/src/.gradle/.idea/workspace.xml new file mode 100644 index 0000000..5dbaf21 --- /dev/null +++ b/src/.gradle/.idea/workspace.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + 1747381865892 + + + + \ No newline at end of file diff --git a/src/.gradle/7.5/checksums/checksums.lock b/src/.gradle/7.5/checksums/checksums.lock new file mode 100644 index 0000000..3481b2c Binary files /dev/null and b/src/.gradle/7.5/checksums/checksums.lock differ diff --git a/src/.gradle/7.5/checksums/md5-checksums.bin b/src/.gradle/7.5/checksums/md5-checksums.bin new file mode 100644 index 0000000..dd25263 Binary files /dev/null and b/src/.gradle/7.5/checksums/md5-checksums.bin differ diff --git a/src/.gradle/7.5/checksums/sha1-checksums.bin b/src/.gradle/7.5/checksums/sha1-checksums.bin new file mode 100644 index 0000000..b6bb015 Binary files /dev/null and b/src/.gradle/7.5/checksums/sha1-checksums.bin differ diff --git a/src/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock b/src/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock new file mode 100644 index 0000000..c70db3b Binary files /dev/null and b/src/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock differ diff --git a/src/.gradle/7.5/dependencies-accessors/gc.properties b/src/.gradle/7.5/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/.gradle/7.5/executionHistory/executionHistory.bin b/src/.gradle/7.5/executionHistory/executionHistory.bin new file mode 100644 index 0000000..3e8b1d4 Binary files /dev/null and b/src/.gradle/7.5/executionHistory/executionHistory.bin differ diff --git a/src/.gradle/7.5/executionHistory/executionHistory.lock b/src/.gradle/7.5/executionHistory/executionHistory.lock new file mode 100644 index 0000000..2aee14a Binary files /dev/null and b/src/.gradle/7.5/executionHistory/executionHistory.lock differ diff --git a/src/.gradle/7.5/fileChanges/last-build.bin b/src/.gradle/7.5/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/src/.gradle/7.5/fileChanges/last-build.bin differ diff --git a/src/.gradle/7.5/fileHashes/fileHashes.bin b/src/.gradle/7.5/fileHashes/fileHashes.bin new file mode 100644 index 0000000..1e7818a Binary files /dev/null and b/src/.gradle/7.5/fileHashes/fileHashes.bin differ diff --git a/src/.gradle/7.5/fileHashes/fileHashes.lock b/src/.gradle/7.5/fileHashes/fileHashes.lock new file mode 100644 index 0000000..3903f09 Binary files /dev/null and b/src/.gradle/7.5/fileHashes/fileHashes.lock differ diff --git a/src/.gradle/7.5/fileHashes/resourceHashesCache.bin b/src/.gradle/7.5/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..5701c01 Binary files /dev/null and b/src/.gradle/7.5/fileHashes/resourceHashesCache.bin differ diff --git a/src/.gradle/7.5/gc.properties b/src/.gradle/7.5/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/.gradle/8.9/checksums/checksums.lock b/src/.gradle/8.9/checksums/checksums.lock new file mode 100644 index 0000000..cbd7c1b Binary files /dev/null and b/src/.gradle/8.9/checksums/checksums.lock differ diff --git a/src/.gradle/8.9/checksums/md5-checksums.bin b/src/.gradle/8.9/checksums/md5-checksums.bin new file mode 100644 index 0000000..d8c800a Binary files /dev/null and b/src/.gradle/8.9/checksums/md5-checksums.bin differ diff --git a/src/.gradle/8.9/checksums/sha1-checksums.bin b/src/.gradle/8.9/checksums/sha1-checksums.bin new file mode 100644 index 0000000..a4c2fab Binary files /dev/null and b/src/.gradle/8.9/checksums/sha1-checksums.bin differ diff --git a/src/.gradle/8.9/dependencies-accessors/gc.properties b/src/.gradle/8.9/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/.gradle/8.9/executionHistory/executionHistory.lock b/src/.gradle/8.9/executionHistory/executionHistory.lock new file mode 100644 index 0000000..7d107d8 Binary files /dev/null and b/src/.gradle/8.9/executionHistory/executionHistory.lock differ diff --git a/src/.gradle/8.9/fileChanges/last-build.bin b/src/.gradle/8.9/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/src/.gradle/8.9/fileChanges/last-build.bin differ diff --git a/src/.gradle/8.9/fileHashes/fileHashes.lock b/src/.gradle/8.9/fileHashes/fileHashes.lock new file mode 100644 index 0000000..65ad5ab Binary files /dev/null and b/src/.gradle/8.9/fileHashes/fileHashes.lock differ diff --git a/src/.gradle/8.9/gc.properties b/src/.gradle/8.9/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..e338413 Binary files /dev/null and b/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/src/.gradle/buildOutputCleanup/cache.properties b/src/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..b371843 --- /dev/null +++ b/src/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Thu Apr 24 21:37:29 CST 2025 +gradle.version=7.5 diff --git a/src/.gradle/buildOutputCleanup/outputFiles.bin b/src/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..0acc6e4 Binary files /dev/null and b/src/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/src/.gradle/config.properties b/src/.gradle/config.properties new file mode 100644 index 0000000..26a27aa --- /dev/null +++ b/src/.gradle/config.properties @@ -0,0 +1,2 @@ +#Fri May 16 12:26:25 CST 2025 +java.home=D\:\\software\\java diff --git a/src/.gradle/file-system.probe b/src/.gradle/file-system.probe new file mode 100644 index 0000000..67132f9 Binary files /dev/null and b/src/.gradle/file-system.probe differ diff --git a/src/.gradle/vcs-1/gc.properties b/src/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/.idea/.gitignore b/src/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/src/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/src/.idea/AndroidProjectSystem.xml b/src/.idea/AndroidProjectSystem.xml new file mode 100644 index 0000000..4a53bee --- /dev/null +++ b/src/.idea/AndroidProjectSystem.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/src/.idea/compiler.xml b/src/.idea/compiler.xml new file mode 100644 index 0000000..b589d56 --- /dev/null +++ b/src/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/.idea/deploymentTargetSelector.xml b/src/.idea/deploymentTargetSelector.xml new file mode 100644 index 0000000..b268ef3 --- /dev/null +++ b/src/.idea/deploymentTargetSelector.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/.idea/gradle.xml b/src/.idea/gradle.xml new file mode 100644 index 0000000..639c779 --- /dev/null +++ b/src/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/src/.idea/jarRepositories.xml b/src/.idea/jarRepositories.xml new file mode 100644 index 0000000..a5f05cd --- /dev/null +++ b/src/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/.idea/migrations.xml b/src/.idea/migrations.xml new file mode 100644 index 0000000..f8051a6 --- /dev/null +++ b/src/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/src/.idea/misc.xml b/src/.idea/misc.xml new file mode 100644 index 0000000..87a20fc --- /dev/null +++ b/src/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/.idea/runConfigurations.xml b/src/.idea/runConfigurations.xml new file mode 100644 index 0000000..16660f1 --- /dev/null +++ b/src/.idea/runConfigurations.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/src/.idea/vcs.xml b/src/.idea/vcs.xml new file mode 100644 index 0000000..9593ac5 --- /dev/null +++ b/src/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/AndroidManifest.xml b/src/AndroidManifest.xml new file mode 100644 index 0000000..e91c336 --- /dev/null +++ b/src/AndroidManifest.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/NOTICE b/src/NOTICE new file mode 100644 index 0000000..9a54521 --- /dev/null +++ b/src/NOTICE @@ -0,0 +1,190 @@ + + Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + + 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. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + 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 + diff --git a/src/README b/src/README new file mode 100644 index 0000000..fc0d824 --- /dev/null +++ b/src/README @@ -0,0 +1,23 @@ +[中文] + +1. MiCode便签是小米便签的社区开源版,由MIUI团队(www.miui.com) 发起并贡献第一批代码,遵循NOTICE文件所描述的开源协议, + 今后为MiCode社区(www.micode.net) 拥有,并由社区发布和维护。 + +2. Bug反馈和跟踪,请访问Github, + https://github.com/MiCode/Notes/issues?sort=created&direction=desc&state=open + +3. 功能建议和综合讨论,请访问MiCode, + http://micode.net/forum.php?mod=forumdisplay&fid=38 + + +[English] + +1. MiCode Notes is open source edition of XM notepad, it's first initiated and sponsored by MIUI team (www.miui.com). + It's opened under license described by NOTICE file. It's owned by the MiCode community (www.micode.net). In future, + the MiCode community will release and maintain this project. + +2. Regarding issue tracking, please visit Github, + https://github.com/MiCode/Notes/issues?sort=created&direction=desc&state=open + +3. Regarding feature request and general discussion, please visit Micode forum, + http://micode.net/forum.php?mod=forumdisplay&fid=38 diff --git a/src/README.md b/src/README.md new file mode 100644 index 0000000..1edc9fa --- /dev/null +++ b/src/README.md @@ -0,0 +1,32 @@ +# 米笔记本应用 + +## 动态背景功能说明 + +米笔记本应用现在支持根据一天中的不同时段自动更换背景颜色。 + +### 功能特点 + +- 根据早晨、下午和晚上三个时间段自动更换背景 +- 可以在设置中自定义每个时间段的背景颜色 +- 实时响应时间变化,无需重启应用 + +### 使用方法 + +1. 打开应用,进入"设置" +2. 在"动态背景"部分,选择背景变换模式: + - 禁用:不使用动态背景 + - 按时间段:早中晚自动切换背景 + - 自定义设置:可以设置更复杂的时间规则(未来功能) +3. 选择"设置动态背景"可以为每个时间段选择颜色 +4. 保存设置后,应用将根据当前时间自动应用相应的背景 + +### 时间段划分 + +- 早晨:6:00 - 11:59 +- 下午:12:00 - 17:59 +- 晚上:18:00 - 5:59 + +### 注意事项 + +- 动态背景会覆盖手动设置的背景颜色 +- 如果不需要此功能,可以在设置中将模式设为"禁用" \ No newline at end of file diff --git a/src/app b/src/app new file mode 160000 index 0000000..f08a257 --- /dev/null +++ b/src/app @@ -0,0 +1 @@ +Subproject commit f08a2578af82eee6be6d651bc76e43467f99e657 diff --git a/src/build.gradle b/src/build.gradle new file mode 100644 index 0000000..1307417 --- /dev/null +++ b/src/build.gradle @@ -0,0 +1,20 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + jcenter() + google() + } + dependencies { + classpath 'com.android.tools.build:gradle:7.4.1' + } +} + +allprojects { + repositories { + jcenter() + google() + } +} + + + diff --git a/src/doc/回收站功能设计方案.md b/src/doc/回收站功能设计方案.md new file mode 100644 index 0000000..e16ea22 --- /dev/null +++ b/src/doc/回收站功能设计方案.md @@ -0,0 +1,628 @@ +# 回收站功能设计方案 + +# 软件维护需求描述 + +## 1.1 开源软件维护新增功能描述 + +为了改善开源软件中现有功能/性能的不足,并结合实际问题,构思的开源软件新功能描述如表1-1所示。 + +表1-1 软件新增功能描述表 + +| **功能名称** | **功能描述** | +| ------------ | ------------------------------------------------------------ | +| 回收站功能 | 为便签应用添加回收站功能,提供更安全的便签管理体验。主要功能包括:
1. 删除的便签不直接销毁,而是移动到回收站
2. 支持从回收站恢复便签到原始文件夹
3. 支持彻底删除回收站中的便签
4. 支持自定义回收站自动清理时间间隔
5. 限制回收站容量,防止占用过多空间 | + +## 1.2 开源软件维护需求 + +### 1.2.1 用例图 + +``` ++------------------+ +------------------+ +| | | | +| 用户 +------>+ 打开回收站 | +| | | | ++------------------+ +-------+----------+ + | + +--------------------+--------------------+ + | | | + v v v + +------------------+ +------------------+ +------------------+ + | | | | | | + | 恢复便签 | | 彻底删除便签 | | 设置清理间隔 | + | | | | | | + +------------------+ +------------------+ +------------------+ + | | | + v v v + +------------------+ +------------------+ +------------------+ + | | | | | | + | 返回原始文件夹 | | 清空回收站 | | 选择天数 | + | | | | | | + +------------------+ +------------------+ +------------------+ +``` + +### 1.2.2 用例描述 + +**用例:回收站管理** + +**用例名称:** 回收站管理 + +**功能:** 允许用户查看、恢复或彻底删除已删除的便签,并设置自动清理间隔 + +**执行者:** 用户 + +**触发条件:** 用户打开回收站界面 + +**前置条件:** +1. 用户已登录并具有编辑权限 +2. 系统已安装并正常运行 +3. 数据库中包含状态为"已删除"的便签记录 + +**基本交互动作过程:** +1. 用户点击回收站图标进入回收站界面 +2. 系统显示所有已删除的便签列表,按删除时间排序 +3. 用户可以选择: + - 点击便签查看详细内容 + - 长按便签打开上下文菜单进行操作 + - 点击底部的清空回收站按钮 + - 点击清理设置按钮配置自动清理参数 +4. 用户选择恢复便签 + - 系统将便签恢复到原始文件夹 + - 若原始文件夹不存在,则恢复到根目录 +5. 用户选择彻底删除便签 + - 系统彻底删除便签数据 +6. 用户设置自动清理间隔 + - 系统保存设置并安排定时清理任务 + +**扩展交互动作过程:** +1. 回收站为空 + - 系统显示空白视图和提示信息 +2. 回收站容量达到上限 + - 系统按照先进先出原则自动删除最早的便签 +3. 用户取消操作 + - 系统不执行任何删除或恢复操作 +4. 用户选择全部清空 + - 系统提示确认操作 + - 用户确认后彻底删除所有回收站中的便签 + +**后置条件:** +1. 恢复的便签状态已更改为正常并从回收站移除 +2. 彻底删除的便签已从数据库中移除 +3. 自动清理设置已保存并生效 + +**业务规则:** +1. 回收站容量上限为50条便签 +2. 默认自动清理间隔为30天 +3. 清理间隔最小1天,最大365天 +4. 恢复便签时应保留原有属性和内容 + +**非功能需求:** +1. 回收站列表加载时间不超过1秒 +2. 恢复和删除操作响应时间不超过2秒 +3. 自动清理任务执行时不影响用户操作的流畅性 + +# 一、软件维护需求分析 + +## 2.1 用例顺序图 + +**用例:回收站管理** + +``` ++------+ +----------+ +---------------+ +----------------+ +| | | | | | | | +| 用户 | | 回收站UI | | 数据管理器 | | 数据库Provider | +| | | | | | | | ++------+ +----------+ +---------------+ +----------------+ + | | | | + | 打开回收站 | | | + |------------------>| | | + | | | | + | | 请求已删除便签列表 | | + | |---------------------->| | + | | | | + | | | 查询已删除便签 | + | | |------------------------>| + | | | | + | | |<------------------------| + | | | 返回便签列表 | + | | | | + | |<----------------------| | + | | 显示便签列表 | | + | | | | + | 选择恢复便签 | | | + |------------------>| | | + | | | | + | | 请求恢复便签 | | + | |---------------------->| | + | | | | + | | | 恢复便签到原始文件夹 | + | | |------------------------>| + | | | | + | | |<------------------------| + | | | 确认恢复成功 | + | | | | + | |<----------------------| | + | | 显示成功提示 | | + | | | | + |<------------------| | | + | 更新后的列表 | | | + | | | | +``` + +## 2.2 分析类图 + +``` ++---------------------+ +------------------------+ +| TrashListActivity | | DataUtils | +|---------------------| |------------------------| +| -mListView |<----->| +batchMoveToTrash() | +| -mAdapter | | +batchRestoreFromTrash()| +| +loadTrashNotes() | | +batchPermanentlyDelete()| +| +restoreNote() | | +getTrashCleanInterval()| +| +deleteNote() | | +setTrashCleanInterval()| ++---------------------+ +------------------------+ + ^ ^ + | | + | | ++---------------------+ +------------------------+ +| NotePreviewActivity | | CleanupScheduler | +|---------------------| |------------------------| +| +showNote() |<----->| +scheduleNextCleanup() | +| +restoreNote() | | +cleanupTrashNow() | +| +deleteNote() | | +performCleanup() | ++---------------------+ +------------------------+ + ^ ^ + | | ++---------------------+ | +| TrashAdapter | | +|---------------------| | +| -mContext |---------------->| +| -mCursor | +| +getView() | ++---------------------+ +``` + +# 二、维护设计和实现方案 + +## 3.1 开源软件体系结构的设计及调整 + +1. 数据层调整 + - 修改数据库结构,添加记录便签状态和删除日期的字段 + - 扩展 `Notes` 类,添加便签状态常量和回收站相关设置 + - 升级数据库版本,确保结构更新 + +2. 业务逻辑层调整 + - 扩展 `DataUtils` 类,增加回收站相关操作方法 + - 添加 `CleanupScheduler` 服务,负责回收站自动清理 + - 修改便签删除逻辑,改为软删除 + +3. 界面层调整 + - 添加 `TrashListActivity` 展示回收站内容 + - 添加 `NotePreviewActivity` 查看已删除便签 + - 修改 `NotesListActivity` 增加回收站入口 + - 添加相关布局文件和资源 + +## 3.2 界面设计 + +### 3.2.1 新增需求界面 + +**回收站主界面** + +``` ++------------------------------------------+ +| | +| 回收站 返回 | +|------------------------------------------+ +| | +| [便签列表] | +| +-------------------------------+ | +| | 便签1标题 删除时间 | | +| +-------------------------------+ | +| | +| +-------------------------------+ | +| | 便签2标题 删除时间 | | +| +-------------------------------+ | +| | +| +-------------------------------+ | +| | 便签3标题 删除时间 | | +| +-------------------------------+ | +| | +| [空白提示文本] | +|------------------------------------------+ +| | +| [清空回收站] [清理设置] | +| | ++------------------------------------------+ +``` + +**便签预览界面** + +``` ++------------------------------------------+ +| | +| 便签预览 返回 | +|------------------------------------------+ +| | +| [便签内容显示区域] | +| | +| | +| | +| | +| | +| | +| | +| | +| | +|------------------------------------------+ +| | +| [恢复便签] [删除便签] | +| | ++------------------------------------------+ +``` + +**清理设置对话框** + +``` ++------------------------------------------+ +| | +| 设置自动清理时间 | +|------------------------------------------+ +| | +| 自动清理回收站中超过以下天数的便签: | +| | +| +-------------+ | +| | 30 | | +| +-------------+ | +| | +| | +| [取消] [确定] | +| | ++------------------------------------------+ +``` + +### 3.2.2 设计界面类 + +**TrashListActivity 类** +- 便签列表视图 - `mListView` +- 便签适配器 - `mAdapter` +- 清空回收站按钮 - `mBtnEmptyTrash` +- 清理设置按钮 - `mBtnCleanupSettings` +- 空白提示文本 - `mEmptyView` + +**NotePreviewActivity 类** +- 便签内容视图 - `mNoteContent` +- 恢复按钮 - `mBtnRestore` +- 删除按钮 - `mBtnDelete` + +**TrashAdapter 类** +- 上下文 - `mContext` +- 数据游标 - `mCursor` +- 视图持有器 - `ViewHolder` + - 标题文本 - `title` + - 删除时间文本 - `deleteDate` + - 便签图标 - `icon` + +### 3.2.3 界面间的跳转顺序图 + +``` ++----------------+ +------------------+ +-------------------+ +| | | | | | +| 主界面 | | 回收站界面 | | 便签预览界面 | +| | | | | | ++----------------+ +------------------+ +-------------------+ + | | | + | 1. 点击回收站图标 | | + |--------------------->| | + | | | + | | 2. 点击便签项 | + | |----------------------->| + | | | + | | | 3. 点击恢复/删除 + | | |----+ + | | | | + | |<-----------------------| | + | | 4. 返回回收站界面 | | + | | |<---+ + | | | 5. 关闭预览界面 + | | | + |<---------------------| | + | 6. 返回主界面 | | + | | | +``` + +### 3.2.4 界面间的跳转类图 + +``` ++---------------------+ +--------------------+ +----------------------+ +| | | | | | +| NotesListActivity +------>+ TrashListActivity +------>+ NotePreviewActivity | +| | | | | | +| |<------+ |<------+ | ++---------------------+ +--------------------+ +----------------------+ + | + v + +--------------------+ + | | + | CleanupSettingDialog | + | | + +--------------------+ +``` + +## 3.3 详细设计 + +### 3.3.1 用例设计 + +**用例:回收站管理** + +**参与者**:用户 + +**先决条件**: +- 应用已安装并正常运行 +- 数据库中存在已删除的便签 + +**主要流程**: +1. 用户点击主界面右上角的回收站图标 +2. 系统显示回收站界面,包含已删除便签的列表 +3. 用户可以选择: + - 点击便签查看详细内容 + - 通过上下文菜单恢复或彻底删除便签 + - 点击底部按钮清空回收站或设置自动清理参数 +4. 用户恢复便签时,系统将便签恢复到原始文件夹 +5. 用户彻底删除便签时,系统从数据库中移除便签数据 +6. 用户设置自动清理参数时,系统保存设置并更新定时任务 + +**替代流程**: +1. 如果回收站为空,系统显示空白提示 +2. 如果清空回收站,系统提示确认后删除所有已删除便签 +3. 如果回收站达到容量上限,系统自动删除最早删除的便签 + +### 3.3.2 类设计 + +**DataUtils 类扩展** + +```java +/** + * 数据工具类 + * 提供回收站相关的数据操作方法 + */ +public class DataUtils { + // 已有方法... + + /** + * 将便签批量移动到回收站 + * @param resolver ContentResolver + * @param ids 便签ID集合 + * @return 操作是否成功 + */ + public static boolean batchMoveToTrash(ContentResolver resolver, HashSet ids); + + /** + * 从回收站批量恢复便签 + * @param resolver ContentResolver + * @param ids 便签ID集合 + * @return 操作是否成功 + */ + public static boolean batchRestoreFromTrash(ContentResolver resolver, HashSet ids); + + /** + * 批量彻底删除便签 + * @param resolver ContentResolver + * @param ids 便签ID集合 + * @return 操作是否成功 + */ + public static boolean batchPermanentlyDeleteNotes(ContentResolver resolver, HashSet ids); + + /** + * 设置回收站自动清理时间间隔 + * @param context 上下文 + * @param days 天数 + * @return 操作是否成功 + */ + public static boolean setTrashCleanInterval(Context context, int days); + + /** + * 获取回收站自动清理时间间隔 + * @param context 上下文 + * @return 天数 + */ + public static int getTrashCleanInterval(Context context); + + /** + * 清理过期的回收站便签 + * @param context 上下文 + * @return 清理的便签数量 + */ + public static int cleanExpiredTrashNotes(Context context); + + /** + * 检查回收站是否已满 + * @param resolver ContentResolver + * @return 是否已满 + */ + public static boolean isTrashFull(ContentResolver resolver); +} +``` + +**CleanupScheduler 类** + +```java +/** + * 回收站清理调度服务 + * 负责定时清理回收站中过期的便签 + */ +public class CleanupScheduler extends Service { + private static final String ACTION_CLEANUP_TRASH = "net.micode.notes.CLEANUP_TRASH"; + private static final String ACTION_SCHEDULE_CLEANUP = "net.micode.notes.SCHEDULE_CLEANUP"; + + /** + * 启动服务 + * @param context 上下文 + */ + public static void startService(Context context); + + /** + * 安排下一次清理 + * @param context 上下文 + */ + public static void scheduleNextCleanup(Context context); + + /** + * 立即清理回收站 + * @param context 上下文 + */ + public static void cleanupTrashImmediately(Context context); + + /** + * 执行清理操作 + * @param context 上下文 + */ + private void performCleanup(Context context); + + @Override + public void onCreate(); + + @Override + public int onStartCommand(Intent intent, int flags, int startId); + + @Override + public void onDestroy(); + + @Override + public IBinder onBind(Intent intent); +} +``` + +**TrashListActivity 类** + +```java +/** + * 回收站列表界面 + * 显示已删除的便签并提供恢复和删除操作 + */ +public class TrashListActivity extends Activity implements OnClickListener, OnItemClickListener { + private ListView mListView; + private TrashAdapter mAdapter; + private ContentResolver mContentResolver; + private Cursor mCursor; + private Button mBtnEmptyTrash; + private Button mBtnCleanupSettings; + private TextView mEmptyView; + + @Override + protected void onCreate(Bundle savedInstanceState); + + @Override + protected void onResume(); + + @Override + protected void onDestroy(); + + /** + * 加载回收站中的便签 + */ + private void loadTrashNotes(); + + /** + * 更新空视图状态 + */ + private void updateEmptyView(); + + /** + * 刷新列表 + */ + private void refreshList(); + + @Override + public void onClick(View v); + + @Override + public void onItemClick(AdapterView parent, View view, int position, long id); + + @Override + public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo); + + @Override + public boolean onContextItemSelected(MenuItem item); + + /** + * 创建自动清理设置对话框 + */ + private Dialog createCleanupIntervalDialog(); + + /** + * 创建删除确认对话框 + */ + private Dialog createDeleteConfirmDialog(); + + /** + * 恢复选中的便签 + */ + private void restoreSelectedNote(int position); + + /** + * 彻底删除选中的便签 + */ + private void deleteSelectedNote(int position); + + /** + * 清空回收站 + */ + private void emptyTrash(); + + /** + * 回收站列表适配器 + */ + private class TrashAdapter extends BaseAdapter { + // 适配器相关方法 + } +} +``` + +## 3.4 数据库设计 + +### 3.4.1 数据库表设计 + +**Notes表扩展** + +新增字段: +- `STATUS` - 便签状态(0-正常,1-已删除) +- `DELETE_DATE` - 删除时间(毫秒时间戳) +- `EXPIRE_STATUS` - 过期状态(0-未过期,1-已过期) + +### 3.4.2 数据库版本升级 + +从版本4升级到版本5,添加回收站相关字段: + +```sql +ALTER TABLE note ADD COLUMN status INTEGER NOT NULL DEFAULT 0; +ALTER TABLE note ADD COLUMN delete_date INTEGER NOT NULL DEFAULT 0; +ALTER TABLE note ADD COLUMN expire_status INTEGER NOT NULL DEFAULT 0; +CREATE INDEX IF NOT EXISTS idx_delete_date ON note(delete_date); +CREATE INDEX IF NOT EXISTS idx_status ON note(status); +``` + +## 3.5 测试方案 + +### 3.5.1 单元测试 + +1. `DataUtils` 类的回收站相关方法测试 +2. `CleanupScheduler` 服务定时调度测试 + +### 3.5.2 界面测试 + +1. 回收站操作流程测试 +2. 恢复便签到原始文件夹测试 +3. 自动清理功能测试 + +### 3.5.3 系统性能测试 + +1. 回收站容量上限测试 +2. 数据库操作性能测试 +3. 自动清理性能测试 + +## 3.6 实现计划 + +1. 数据库结构修改 +2. 业务逻辑层实现 +3. 界面实现 +4. 集成测试 +5. 功能发布 \ No newline at end of file diff --git a/src/doc/小米便签维护-需求与设计方案1.docx b/src/doc/小米便签维护-需求与设计方案1.docx new file mode 100644 index 0000000..6ebaf23 Binary files /dev/null and b/src/doc/小米便签维护-需求与设计方案1.docx differ diff --git a/src/doc/小米便签维护-需求与设计方案1.md b/src/doc/小米便签维护-需求与设计方案1.md new file mode 100644 index 0000000..81ec4b6 --- /dev/null +++ b/src/doc/小米便签维护-需求与设计方案1.md @@ -0,0 +1,182 @@ +# 软件维护需求描述 + +## 1.1 开源软件维护新增功能描述 + +为了改善开源软件中现有功能/性能的不足,并结合实际问题,构思的开源软件新功能描述如表1-1所示。 + +表1-1 软件新增功能描述表 + +| **功能名称** | **功能描述** | +| ------------ | ------------------------------------------------------------ | +| 动态背景变换 | 便签背景可以根据时间自动变换,提供更丰富的视觉体验。支持多种变换模式: 1. 按时间段变换:根据早中晚自动更换背景 2. 自定义变换:用户可以设置特定时间点的背景变换 | + +## 1.2 开源软件维护需求 + +### 1.2.1 用例图 + + + +### 1.2.2 用例描述 + +**用例:** **设置动态背景模式** + + + +用例名称: 设置动态背景模式 + +功能: 允许用户选择并配置动态背景变换的模式,提供个性化的视觉体验 + +执行者: 用户 + +触发条件: 用户进入便签设置界面 + +前置条件: + +1.用户已登录并具有编辑权限 + +2.系统已安装并正常运行 + +3.设备具有足够的存储空间 + +基本交互动作过程 + +1.用户进入设置界面 + +2.选择"动态背景"选项 + +3.系统显示当前背景设置状态 + +4.选择背景变换模式(按时间段/自定义) + +5.根据所选模式显示相应的配置选项: + + \- 按时间段模式:选择早中晚时间段 + + \- 自定义模式:设置具体时间点和背景 + +6.预览所选配置的效果 + +7.确认并保存设置 + +扩展交互动作过程 + +8.用户取消设置 + + \- 系统提示是否保存更改 + + \- 用户选择不保存并返回 + +9.用户选择预览效果 + + \- 系统显示模拟效果 + + \- 用户可以调整参数 + +10. 用户选择默认背景 + + \- 系统恢复默认设置 + + \- 清除自定义配置 + +11. 用户选择随机模式 + + \- 系统随机选择背景 + + \- 设置随机切换时间间隔 + +后置条件: + +1.动态背景设置已保存 + +2.系统开始按照新设置运行 + +3.用户收到设置成功的通知 + + + +业务规则: + +1.每种模式只能同时启用一种 + +2.背景图片必须符合系统要求的分辨率 + +3.自定义时间点不能重复 + +非功能需求: + +1.设置界面响应时间不超过1秒 + +2.背景切换过程平滑无卡顿 + +3.支持离线模式下的基本功能 + +4.内存占用不超过50MB + + + + + +# 一、 软件维护需求分析 + +## 2.1 用例顺序图 + +**用例:** **设置动态背景模式** + + + +## 2.2 分析类图 + + + +# 二、 维护设计和实现方案 + +## 3.1 开源软件体系结构的设计及调整 + +1. 新增 BackgroundScheduler组件,负责时间事件监听与背景切换触发。 +2. 在Model层增加BackgroundConfig实体类及DAO持久化模块。 +3. 在View层分离动态背景渲染逻辑至独立UIRenderer子模块。 + + + + + + + +## 3.2 界面设计 + +<绘制:1.每个新增需求的界面;2.1中对应的设计界面类,包括元素注释;3.界面间的跳转顺序图;4.界面间的跳转类图> + +1.每个新增需求的界面 + + + + + + + + + +2.设计界面类 + + + + + +3. 界面间的跳转顺序图 + + + + + +4. 界面间的跳转类图 + + + +## 3.3 详细设计 + +### 3.3.1 用例设计 + + + +### 3.3.2 类设计 + diff --git a/src/doc/小米便签维护-需求与设计方案2 .docx b/src/doc/小米便签维护-需求与设计方案2 .docx new file mode 100644 index 0000000..1c31dad Binary files /dev/null and b/src/doc/小米便签维护-需求与设计方案2 .docx differ diff --git a/src/doc/小米便签维护-需求与设计方案2 .md b/src/doc/小米便签维护-需求与设计方案2 .md new file mode 100644 index 0000000..d238449 --- /dev/null +++ b/src/doc/小米便签维护-需求与设计方案2 .md @@ -0,0 +1,287 @@ +# 软件维护需求描述 + +## 1.1 开源软件维护新增功能描述 + +为了改善开源软件中现有功能/性能的不足,并结合实际问题,构思的开源软件新功能描述如表1-1所示。 + +表1-1 软件新增功能描述表 + +| **功能名称** | **功能描述** | +| ------------ | ------------------------------------------------------------ | +| 回收站 | 用户删除某条便签后,便签自动移入回收站;用户可进入回收站还原误删除的便签(按删除的时间排序);可以设置回收站的定时清理的时间间隔(默认是30天);回收站最多存放50条被删除的便签。 | +| | | +| | | + +## 1.2 开源软件维护需求 + +### 1.2.1 用例图 + + + + + +### 1.2.2 用例描述 + +**(1)****用例****1****:回收站** + +******用例名称:**回收站管理功能 + +******功能:**用户访问垃圾桶界面并浏览已删除的便签列表。 + +**执行者:**用户、系统 + +**触发条件:**用户进入主界面的“回收站”。 + +**前置条件:** + +1. 用户已登录。 +2. 垃圾桶中存在至少1条已删除的便签。 + +**基本交互动作过程:** + 1.用户选择"查看垃圾内容" + +2.系统显示垃圾桶中所有待处理便签列表 + +2.a用户执行"彻底删除便签"(物理删除) + +2.b用户执行"恢复便签到主页"(还原到原始位置) + +3.用户设置"定时清理时间间隔" + +4.系统自动执行周期性检查: + 4.a当检测到符合设置的清理条件时,自动执行"系统自动清理过期便签" + 4.b生成清理日志(包含清理时间、被清理便签数量) + +。 + +******扩展交互动作过程:** + +​ 1.a垃圾桶为空时,系统显示“暂无已删除内容”提示。 + +​ 2.b.a当用户尝试恢复已被系统自动清理的便签时,系统提示"该便签已永久删除,无法恢复" + +​ 3.a当用户设置非法时间间隔(如0或负数),系统拒绝接受参数并提示有效时间范围 + +**后置条件:** + +1. 成功操作后更新垃圾桶状态 +2. 彻底删除的便签不可恢复 +3. 恢复的便签重新出现在主页指定位置 +4. 系统清理操作生成操作记录 + +**业务规则:** + +1. 垃圾内容默认保留周期为30天(可配置) +2. 定时清理仅作用于标记为"过期"的便签 +3. 恢复操作需保留便签原始属性和内容 +4. 自动清理操作需在系统空闲时段执行 + +**********非功能需求:** + +1. 敏感操作需二次确认(弹出确认对话框) +2. 提供最近7天清理记录的查询功能 +3. 支持批量操作(多选便签处理) + +**** + +# 二、 软件维护需求分析 + +# 2.1 用例顺序图 + +**(1)****用例****1****:** + + + + + +## 2.2 分析类图 + + + + + + + +# 三、 维护设计和实现方案 + +## 3.1 开源软件体系结构的设计及调整 + +<描述对开源软件体系结构做了哪些方面的改进和调整,以支持维护需求的实现。说明:需要绘体系结构逻辑视图,并说明逻辑视图图中的哪些方面做了调整。> + +原来小米便签的体系结构逻辑视图: + + + +新增回收站功能的体系结构逻辑视图: + + + +## 3.2 界面设计 + + + + + +## 3.3 详细设计 + +​ <说明:通过用例设计和类设计完成新增需求的详细设计。绘制每个新增用例的顺序图,详细说明各项维护需求是如何通过各个类对象之间的交互来完成的。描述新增或者调整类中的各个属性及方法> + +### **一、回收站维护需求实现机制** + +1.回收站内容查看 + +·交互流程: + +用户 → TrashListActivity.显示回收站列表() + +→ TrashManager.查看垃圾内容() + +→ NotesProvider.query(附加条件:deleted_time IS NOT NULL) + +→ WorkingNote.loadNote(包含过滤条件) + +→ 返回Note对象集合 + +·类调整: + +TrashListActivity 新增: + +private void loadTrashItems() { /* 调用TrashManager */ } + +NotesProvider 新增查询条件: + +WHERE delete_time BETWEEN ? AND ? AND expired_status=0 + +2.便签恢复操作 + +·交互流程: + +用户 → TrashListActivity.恢复便签() + +→ TrashManager.执行恢复操作(noteId) + +→ WorkingNote.restoreFromTrash() + +→ NotesProvider.update(status=0, delete_time=null) + +→ Note.标记为过期(false) + +·类新增方法: + +WorkingNote 新增: + +Public int restoreFromTrash() { + +​ return NotesProvider.update(Note.COLUMN_STATUS, Note.STATUS_NORMA L); + +} + +3.彻底删除操作 + +·交互流程: + +用户 → TrashListActivity.彻底删除便签() + +→ TrashManager.执行永久删除(noteId) + +→ NotesProvider.delete(物理删除) + +→ CleanupScheduler.提交操作日志() + +·关键验证: + +TrashManager 中实现存在性检查: + +if(NotesProvider.query(noteId) == null) throw new NoteNotFoundException(); + +**二、自动清理机制实现** + +1.周期设置与验证 + +·交互流程: + +用户 → 系统设置界面 + +→ TrashManager.设置清理间隔(天数) + +→ if(天数 < 1) 触发参数验证规则异常 + +→ CleanupScheduler.启动定时任务(天数*86400000) + +·类结构变更: + +TrashManager 新增验证方法: + +private boolean validateInterval(int days) { + +​ return days > 0 && days <= 365; + +} + +2.自动清理执行 + +·定时任务流程: + +CleanupScheduler.执行自动清理() + +→ NotesProvider.查询待清理数据() + +→ WHERE delete_time < (NOW() - 30天) + +→ 批量调用NotesProvider.delete() + +→ 更新Note.过期状态=true + +·数据库优化: + +NotesProvider 新增索引: + +CREATE INDEX idx_delete_time ON notes(delete_time); + + + +| **类名** | **新增属性/方法** | **交互关系变化** | +| ----------------- | ----------------------------------- | ------------------------------ | +| TrashManager | - 保留周期属性 - 参数验证规则 | 新增→CleanupScheduler调度依赖 | +| CleanupScheduler | - 时间间隔属性 - 执行自动清理() | 新增←→NotesProvider数据通道 | +| NotesProvider | - 标记软删除() - 查询待清理数据() | 扩展←→Note实体状态管理 | +| Note | - 删除时间 - 过期状态 | 新增←→TrashManager状态同步 | +| TrashListActivity | - 显示回收站列表() - 批量操作控件 | 新增←→NotesListAdapter数据绑定 | + + + +### 3.3.1 用例设计 + +**1.** **访问回收站** + +点击应用主界面的「回收站」入口 + +**2.** **设置自动清理策略** + +在回收站设置页输入「清理间隔天数」(如30天) + +点击「保存设置」按钮 + +**3.** **删除单个便签** + +在便签列表长按目标项 + +选择弹出菜单中的「永久删除」选项 + +**4.** **恢复误删内容** + +勾选要恢复的便签项 + +点击工具栏的「恢复」按钮 + +(若原路径失效)在弹出的对话框选择新存储位置 + + + + + + + +### 3.3.2 类设计 + + \ No newline at end of file diff --git a/src/doc/随时间变换背景功能设计方案.md b/src/doc/随时间变换背景功能设计方案.md new file mode 100644 index 0000000..6709ff6 --- /dev/null +++ b/src/doc/随时间变换背景功能设计方案.md @@ -0,0 +1,613 @@ +# 软件维护需求描述 + +## 1.1 开源软件维护新增功能描述 + +为了改善开源软件中现有功能/性能的不足,并结合实际问题,构思的开源软件新功能描述如表1-1所示。 + +表1-1 软件新增功能描述表 + +| **功能名称** | **功能描述** | +| ------------ | ------------------------------------------------------------ | +| 动态背景变换 | 便签背景可以根据时间自动变换,提供更丰富的视觉体验。支持多种变换模式:
1. 按时间段变换:根据早中晚自动更换背景
2. 自定义变换:用户可以设置特定时间点的背景变换 | + +## 1.2 开源软件维护需求 + +### 1.2.1 用例图 + +``` ++------------------+ +-----------------+ +| | | | +| 用户 +------>+ 进入设置界面 | +| | | | ++------------------+ +--------+--------+ + | + v + +-----------------+ + | 选择动态背景 | + | 设置 | + +--------+--------+ + | + +-------------------+-------------------+ + | | + v v + +-----------------+ +-----------------+ + | 选择按时间段 | | 选择自定义时间 | + | 模式 | | 模式 | + +--------+--------+ +--------+--------+ + | | + v v + +-----------------+ +-----------------+ + | 配置早中晚背景色| | 添加/编辑/删除 | + | | | 时间点设置 | + +-----------------+ +-----------------+ +``` + +### 1.2.2 用例描述 + +**用例:设置动态背景模式** + +**用例名称:** 设置动态背景模式 + +**功能:** 允许用户选择并配置动态背景变换的模式,提供个性化的视觉体验 + +**执行者:** 用户 + +**触发条件:** 用户进入便签设置界面 + +**前置条件:** +1. 用户已登录并具有编辑权限 +2. 系统已安装并正常运行 +3. 设备具有足够的存储空间 + +**基本交互动作过程:** +1. 用户进入设置界面 +2. 选择"动态背景"选项 +3. 系统显示当前背景设置状态 +4. 选择背景变换模式(按时间段/自定义) +5. 根据所选模式显示相应的配置选项: + - 按时间段模式:选择早中晚时间段 + - 自定义模式:设置具体时间点和背景 +6. 预览所选配置的效果 +7. 确认并保存设置 + +**扩展交互动作过程:** +1. 用户取消设置 + - 系统提示是否保存更改 + - 用户选择不保存并返回 +2. 用户选择预览效果 + - 系统显示模拟效果 + - 用户可以调整参数 +3. 用户选择默认背景 + - 系统恢复默认设置 + - 清除自定义配置 +4. 用户选择随机模式 + - 系统随机选择背景 + - 设置随机切换时间间隔 + +**后置条件:** +1. 动态背景设置已保存 +2. 系统开始按照新设置运行 +3. 用户收到设置成功的通知 + +**业务规则:** +1. 每种模式只能同时启用一种 +2. 背景图片必须符合系统要求的分辨率 +3. 自定义时间点不能重复 + +**非功能需求:** +1. 设置界面响应时间不超过1秒 +2. 背景切换过程平滑无卡顿 +3. 支持离线模式下的基本功能 +4. 内存占用不超过50MB + +# 一、软件维护需求分析 + +## 2.1 用例顺序图 + +**用例:设置动态背景模式** + +``` ++------+ +----------+ +---------------+ +----------------+ +| | | | | | | | +| 用户 | | 设置界面 | | 动态背景设置 | | 背景管理器 | +| | | | | | | | ++------+ +----------+ +---------------+ +----------------+ + | | | | + | 进入设置 | | | + |------------------>| | | + | | | | + | | 打开动态背景设置 | | + | |---------------------->| | + | | | | + | | | 获取当前设置 | + | | |------------------------>| + | | | | + | | |<------------------------| + | | | 返回当前设置 | + | | | | + | 选择背景模式 | | | + |------------------>| | | + | | | | + | | 更新模式选择 | | + | |---------------------->| | + | | | | + | 配置模式参数 | | | + |------------------>| | | + | | | | + | | 更新配置参数 | | + | |---------------------->| | + | | | | + | 保存设置 | | | + |------------------>| | | + | | | | + | | 保存配置 | | + | |---------------------->| | + | | | | + | | | 更新背景设置 | + | | |------------------------>| + | | | | + | | |<------------------------| + | | | 确认更新成功 | + | | | | + | |<----------------------| | + | | 显示成功提示 | | + | | | | + |<------------------| | | + | 返回设置成功 | | | + | | | | +``` + +## 2.2 分析类图 + +``` ++---------------------+ +------------------------+ +| NotesPreference | | DynamicBackground | +|---------------------| |------------------------| +| -backgroundMode |<----->| -currentMode | +| +getPreferences() | | +getModeSettings() | +| +setPreferences() | | +setModeSettings() | ++---------------------+ +------------------------+ + ^ ^ + | | + | | ++---------------------+ +------------------------+ +| BackgroundSettings | | DynamicBackgroundMgr | +|---------------------| |------------------------| +| +showSettings() | | -timePoints | +| +updateSettings() | | +getCurrentBackground()| +| +saveSettings() | | +updateBackground() | ++---------------------+ | +addTimePoint() | + ^ | +deleteTimePoint() | + | +------------------------+ + | ^ ++---------------------+ | +| CustomTimeSetting | | +|---------------------| | +| -timePoints |---------------->| +| +addTimePoint() | +| +editTimePoint() | +| +deleteTimePoint() | ++---------------------+ +``` + +# 二、维护设计和实现方案 + +## 3.1 开源软件体系结构的设计及调整 + +1. 新增 `DynamicBackgroundManager` 组件,负责时间事件监听与背景切换触发 +2. 在Model层增加 `TimePoint` 实体类及相关序列化/反序列化方法 +3. 在UI层新增 `CustomTimeSettingsActivity` 和 `DynamicBackgroundSettings` 界面 +4. 扩展 `ResourceParser` 类,增加背景颜色资源管理功能 +5. 修改 `NotesPreferenceActivity` 类,增加动态背景设置入口 + +## 3.2 界面设计 + +### 3.2.1 新增需求界面 + +**动态背景设置主界面** + +``` ++------------------------------------------+ +| | +| 动态背景设置 返回 | +|------------------------------------------+ +| | +| 背景模式 | +| | +| O 禁用 | +| | +| O 按时间段 | +| | +| O 自定义时间点 | +| | +|------------------------------------------+ +| | +| [打开时间点设置] | +| | ++------------------------------------------+ +``` + +**自定义时间点设置界面** + +``` ++------------------------------------------+ +| | +| 自定义时间点 返回 | +|------------------------------------------+ +| | +| [+ 添加新时间点] | +| | +| 时间点列表: | +| | +| +-------------------------------+ | +| | 06:00 [颜色预览] | | +| +-------------------------------+ | +| | +| +-------------------------------+ | +| | 12:00 [颜色预览] | | +| +-------------------------------+ | +| | +| +-------------------------------+ | +| | 18:00 [颜色预览] | | +| +-------------------------------+ | +| | ++------------------------------------------+ +``` + +**添加/编辑时间点对话框** + +``` ++------------------------------------------+ +| | +| 添加时间点 | +|------------------------------------------+ +| | +| 时间: | +| +-------------+ +-------------+ | +| | 12 | | 30 | | +| +-------------+ +-------------+ | +| 小时 分钟 | +| | +| 背景颜色: | +| +-----+ +-----+ +-----+ +-----+ | +| | | | | | | | | | +| +-----+ +-----+ +-----+ +-----+ | +| +-----+ +-----+ +-----+ +-----+ | +| | | | | | | | | | +| +-----+ +-----+ +-----+ +-----+ | +| | +| [取消] [确定] | +| | ++------------------------------------------+ +``` + +### 3.2.2 设计界面类 + +**DynamicBackgroundSettings 类** +- 背景模式单选按钮组 - `backgroundModeRadioGroup` +- 禁用模式单选按钮 - `disableRadioButton` +- 按时间段模式单选按钮 - `timePeriodRadioButton` +- 自定义时间点模式单选按钮 - `customTimeRadioButton` +- 时间点设置按钮 - `timeSettingsButton` + +**CustomTimeSettingsActivity 类** +- 添加时间点按钮 - `addTimePointButton` +- 时间点列表视图 - `timePointsRecyclerView` +- 时间点适配器 - `timePointAdapter` + +**添加/编辑时间点对话框** +- 小时选择器 - `hourPicker` +- 分钟选择器 - `minutePicker` +- 颜色选择网格 - `colorGridView` +- 取消按钮 - `cancelButton` +- 确定按钮 - `confirmButton` + +### 3.2.3 界面间的跳转顺序图 + +``` ++----------------+ +----------------------+ +-----------------------+ +| | | | | | +| 设置界面 | | 动态背景设置界面 | | 自定义时间点设置界面 | +| | | | | | ++----------------+ +----------------------+ +-----------------------+ + | | | + | 1. 点击"动态背景" | | + |---------------------->| | + | | | + | | 2. 选择"自定义时间点"模式 | + | | 3. 点击"打开时间点设置" | + | |--------------------------->| + | | | + | | | 4. 添加/编辑时间点 + | | |----+ + | | | | + | | |<---+ + | | | 5. 保存设置 + | |<---------------------------| + | | 6. 返回到背景设置界面 | + | | | + |<----------------------| | + | 7. 返回设置界面 | | + | | | +``` + +### 3.2.4 界面间的跳转类图 + +``` ++---------------------+ +------------------------+ +---------------------------+ +| | | | | | +| NotesPreference +------>+ DynamicBackgroundSett +------>+ CustomTimeSettingsActivity| +| Activity | | ings | | | +| |<------+ |<------+ | ++---------------------+ +------------------------+ +---------------------------+ + | + v + +---------------------------+ + | | + | TimePointDialogFragment | + | | + +---------------------------+ +``` + +## 3.3 详细设计 + +### 3.3.1 用例设计 + +**用例:设置动态背景模式** + +**参与者**:用户 + +**先决条件**: +- 应用已安装并正常运行 +- 用户已打开设置界面 + +**主要流程**: +1. 用户在设置界面选择"动态背景"选项 +2. 系统显示动态背景设置界面,包含背景模式选择 +3. 用户选择所需背景模式(禁用/按时间段/自定义时间点) +4. 如果选择"自定义时间点"模式,用户可以: + - 打开时间点设置界面 + - 添加新的时间点及对应颜色 + - 编辑或删除现有时间点 +5. 用户保存设置并返回 +6. 系统保存配置并应用新的背景设置 + +**替代流程**: +1. 如果用户取消设置,所有更改不会被保存 +2. 如果设置过程中出现错误,系统显示错误信息并保持原有设置 +3. 如果用户没有添加任何时间点就启用自定义模式,系统使用默认背景 + +### 3.3.2 类设计 + +**DynamicBackgroundManager 类** + +```java +/** + * 动态背景管理器 + * 负责管理背景模式设置与切换,提供获取当前时间对应背景颜色的方法 + */ +public class DynamicBackgroundManager { + // 背景模式常量 + public static final int MODE_DISABLED = 0; // 禁用模式 + public static final int MODE_TIME_PERIOD = 1; // 按时间段模式 + public static final int MODE_CUSTOM_TIME = 2; // 自定义时间点模式 + + // 时间段常量 + private static final int MORNING_START_HOUR = 6; // 早晨开始时间 + private static final int AFTERNOON_START_HOUR = 12; // 下午开始时间 + private static final int EVENING_START_HOUR = 18; // 晚上开始时间 + + private SharedPreferences mPreferences; + private Context mContext; + + // 公共方法 + /** + * 获取当前背景模式 + * @return 当前背景模式 + */ + public int getBackgroundMode(); + + /** + * 设置背景模式 + * @param mode 背景模式 + */ + public void setBackgroundMode(int mode); + + /** + * 获取当前时间对应的背景颜色ID + * @return 背景颜色资源ID + */ + public int getCurrentBackgroundColor(); + + /** + * 根据时间段获取背景颜色 + * @return 背景颜色资源ID + */ + private int getTimePeriodColorForCurrentTime(); + + /** + * 添加自定义时间点 + * @param timePoint 时间点对象 + */ + public void addCustomTimePoint(TimePoint timePoint); + + /** + * 更新自定义时间点 + * @param timePoint 时间点对象 + */ + public void updateCustomTimePoint(TimePoint timePoint); + + /** + * 删除自定义时间点 + * @param timePointId 时间点ID + */ + public void deleteCustomTimePoint(String timePointId); + + /** + * 获取所有自定义时间点 + * @return 时间点列表 + */ + public List getAllCustomTimePoints(); + + /** + * 根据自定义时间点获取当前时间的背景颜色 + * @return 背景颜色资源ID + */ + private int getCustomTimeColorForCurrentTime(); +} +``` + +**TimePoint 类** + +```java +/** + * 时间点实体类 + * 表示一个自定义时间点及其对应的背景颜色 + */ +public class TimePoint { + // 属性 + private String id; // 唯一标识符 + private int hour; // 小时(0-23) + private int minute; // 分钟(0-59) + private int colorId; // 背景颜色ID + + /** + * 构造函数 + * @param hour 小时 + * @param minute 分钟 + * @param colorId 背景颜色ID + */ + public TimePoint(int hour, int minute, int colorId); + + // Getter和Setter方法 + + /** + * 获取格式化的时间字符串(HH:mm) + * @return 格式化的时间字符串 + */ + public String getFormattedTime(); + + /** + * 将时间点转换为总分钟数(用于比较) + * @return 总分钟数 + */ + public int getTotalMinutes(); + + /** + * 转换为JSON对象 + * @return JSON对象 + */ + public JSONObject toJson(); + + /** + * 从JSON对象创建时间点 + * @param json JSON对象 + * @return 时间点对象 + */ + public static TimePoint fromJson(JSONObject json); +} +``` + +**CustomTimeSettingsActivity 类** + +```java +/** + * 自定义时间点设置活动 + * 提供添加、编辑、删除时间点的界面 + */ +public class CustomTimeSettingsActivity extends Activity { + private RecyclerView mTimePointsRecyclerView; + private TimePointAdapter mAdapter; + private List mTimePoints; + private DynamicBackgroundManager mBackgroundManager; + + @Override + protected void onCreate(Bundle savedInstanceState); + + /** + * 初始化视图 + */ + private void initViews(); + + /** + * 加载所有时间点 + */ + private void loadTimePoints(); + + /** + * 显示添加时间点对话框 + */ + private void showAddTimePointDialog(); + + /** + * 显示编辑时间点对话框 + * @param timePoint 要编辑的时间点 + */ + private void showEditTimePointDialog(TimePoint timePoint); + + /** + * 显示删除确认对话框 + * @param timePoint 要删除的时间点 + */ + private void showDeleteConfirmDialog(TimePoint timePoint); + + /** + * 时间点适配器内部类 + */ + private class TimePointAdapter extends RecyclerView.Adapter { + // 适配器实现 + } + + /** + * 时间点视图持有者内部类 + */ + private class TimePointViewHolder extends RecyclerView.ViewHolder { + // 视图持有者实现 + } +} +``` + +**ResourceParser 类** + +```java +/** + * 资源解析器 + * 提供背景颜色与资源ID的映射 + */ +public static class ResourceParser { + // 颜色常量 + public static final int YELLOW = 0; + public static final int BLUE = 1; + public static final int WHITE = 2; + public static final int GREEN = 3; + public static final int RED = 4; + + // 时间特定颜色 + public static final int MORNING_COLOR = 5; // 早晨背景颜色 + public static final int AFTERNOON_COLOR = 6; // 下午背景颜色 + public static final int EVENING_COLOR = 7; // 晚上背景颜色 + + // 默认颜色 + public static final int BG_DEFAULT_COLOR = YELLOW; + + /** + * 获取背景资源ID + * @param id 背景ID + * @return 资源ID + */ + public static int getBackgroundResource(int id); + + /** + * 获取背景颜色资源ID + * @param id 背景ID + * @return 颜色资源ID + */ + public static int getColorResourceByBgId(int id); + + /** + * 获取所有可用背景颜色列表 + * @return 背景颜色列表 + */ + public static List getAllBackgroundColors(); +} +``` \ No newline at end of file diff --git a/src/gradle/wrapper/gradle-wrapper.jar b/src/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e708b1c Binary files /dev/null and b/src/gradle/wrapper/gradle-wrapper.jar differ diff --git a/src/gradle/wrapper/gradle-wrapper.properties b/src/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..343b4bd --- /dev/null +++ b/src/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue Apr 01 21:40:39 CST 2025 +distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionPath=wrapper/dists +zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/src/gradlew b/src/gradlew new file mode 100644 index 0000000..4f906e0 --- /dev/null +++ b/src/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or 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. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# 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"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# 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 + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# 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" + which java >/dev/null 2>&1 || 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 + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/src/gradlew.bat b/src/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/src/gradlew.bat @@ -0,0 +1,89 @@ +@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 + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +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%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/import-summary.txt b/src/import-summary.txt new file mode 100644 index 0000000..64f2217 --- /dev/null +++ b/src/import-summary.txt @@ -0,0 +1,218 @@ +ECLIPSE ANDROID PROJECT IMPORT SUMMARY +====================================== + +Ignored Files: +-------------- +The following files were *not* copied into the new Gradle project; you +should evaluate whether these are still needed in your project and if +so manually move them: + +* .gitignore +* NOTICE +* Notes-master.iml +* README +* app\ +* app\build.gradle +* app\src\ +* app\src\main\ +* app\src\main\AndroidManifest.xml +* app\src\main\java\ +* app\src\main\java\net\ +* app\src\main\java\net\micode\ +* app\src\main\java\net\micode\notes\ +* app\src\main\java\net\micode\notes\data\ +* app\src\main\java\net\micode\notes\data\Contact.java +* app\src\main\java\net\micode\notes\data\Notes.java +* app\src\main\java\net\micode\notes\data\NotesDatabaseHelper.java +* app\src\main\java\net\micode\notes\data\NotesProvider.java +* app\src\main\java\net\micode\notes\gtask\ +* app\src\main\java\net\micode\notes\gtask\data\ +* app\src\main\java\net\micode\notes\gtask\data\MetaData.java +* app\src\main\java\net\micode\notes\gtask\data\Node.java +* app\src\main\java\net\micode\notes\gtask\data\SqlData.java +* app\src\main\java\net\micode\notes\gtask\data\SqlNote.java +* app\src\main\java\net\micode\notes\gtask\data\Task.java +* app\src\main\java\net\micode\notes\gtask\data\TaskList.java +* app\src\main\java\net\micode\notes\gtask\exception\ +* app\src\main\java\net\micode\notes\gtask\exception\ActionFailureException.java +* app\src\main\java\net\micode\notes\gtask\exception\NetworkFailureException.java +* app\src\main\java\net\micode\notes\gtask\remote\ +* app\src\main\java\net\micode\notes\gtask\remote\GTaskASyncTask.java +* app\src\main\java\net\micode\notes\gtask\remote\GTaskClient.java +* app\src\main\java\net\micode\notes\gtask\remote\GTaskManager.java +* app\src\main\java\net\micode\notes\gtask\remote\GTaskSyncService.java +* app\src\main\java\net\micode\notes\model\ +* app\src\main\java\net\micode\notes\model\Note.java +* app\src\main\java\net\micode\notes\model\WorkingNote.java +* app\src\main\java\net\micode\notes\tool\ +* app\src\main\java\net\micode\notes\tool\BackupUtils.java +* app\src\main\java\net\micode\notes\tool\DataUtils.java +* app\src\main\java\net\micode\notes\tool\GTaskStringUtils.java +* app\src\main\java\net\micode\notes\tool\ResourceParser.java +* app\src\main\java\net\micode\notes\ui\ +* app\src\main\java\net\micode\notes\ui\AlarmAlertActivity.java +* app\src\main\java\net\micode\notes\ui\AlarmInitReceiver.java +* app\src\main\java\net\micode\notes\ui\AlarmReceiver.java +* app\src\main\java\net\micode\notes\ui\DateTimePicker.java +* app\src\main\java\net\micode\notes\ui\DateTimePickerDialog.java +* app\src\main\java\net\micode\notes\ui\DropdownMenu.java +* app\src\main\java\net\micode\notes\ui\FoldersListAdapter.java +* app\src\main\java\net\micode\notes\ui\NoteEditActivity.java +* app\src\main\java\net\micode\notes\ui\NoteEditText.java +* app\src\main\java\net\micode\notes\ui\NoteItemData.java +* app\src\main\java\net\micode\notes\ui\NotesListActivity.java +* app\src\main\java\net\micode\notes\ui\NotesListAdapter.java +* app\src\main\java\net\micode\notes\ui\NotesListItem.java +* app\src\main\java\net\micode\notes\ui\NotesPreferenceActivity.java +* app\src\main\java\net\micode\notes\widget\ +* app\src\main\java\net\micode\notes\widget\NoteWidgetProvider.java +* app\src\main\java\net\micode\notes\widget\NoteWidgetProvider_2x.java +* app\src\main\java\net\micode\notes\widget\NoteWidgetProvider_4x.java +* app\src\main\res\ +* app\src\main\res\color\ +* app\src\main\res\color\primary_text_dark.xml +* app\src\main\res\color\secondary_text_dark.xml +* app\src\main\res\drawable-hdpi\ +* app\src\main\res\drawable-hdpi\bg_btn_set_color.png +* app\src\main\res\drawable-hdpi\bg_color_btn_mask.png +* app\src\main\res\drawable-hdpi\call_record.png +* app\src\main\res\drawable-hdpi\clock.png +* app\src\main\res\drawable-hdpi\delete.png +* app\src\main\res\drawable-hdpi\dropdown_icon.9.png +* app\src\main\res\drawable-hdpi\edit_blue.9.png +* app\src\main\res\drawable-hdpi\edit_green.9.png +* app\src\main\res\drawable-hdpi\edit_red.9.png +* app\src\main\res\drawable-hdpi\edit_title_blue.9.png +* app\src\main\res\drawable-hdpi\edit_title_green.9.png +* app\src\main\res\drawable-hdpi\edit_title_red.9.png +* app\src\main\res\drawable-hdpi\edit_title_white.9.png +* app\src\main\res\drawable-hdpi\edit_title_yellow.9.png +* app\src\main\res\drawable-hdpi\edit_white.9.png +* app\src\main\res\drawable-hdpi\edit_yellow.9.png +* app\src\main\res\drawable-hdpi\font_large.png +* app\src\main\res\drawable-hdpi\font_normal.png +* app\src\main\res\drawable-hdpi\font_size_selector_bg.9.png +* app\src\main\res\drawable-hdpi\font_small.png +* app\src\main\res\drawable-hdpi\font_super.png +* app\src\main\res\drawable-hdpi\icon_app.png +* app\src\main\res\drawable-hdpi\list_background.png +* app\src\main\res\drawable-hdpi\list_blue_down.9.png +* app\src\main\res\drawable-hdpi\list_blue_middle.9.png +* app\src\main\res\drawable-hdpi\list_blue_single.9.png +* app\src\main\res\drawable-hdpi\list_blue_up.9.png +* app\src\main\res\drawable-hdpi\list_folder.9.png +* app\src\main\res\drawable-hdpi\list_footer_bg.9.png +* app\src\main\res\drawable-hdpi\list_green_down.9.png +* app\src\main\res\drawable-hdpi\list_green_middle.9.png +* app\src\main\res\drawable-hdpi\list_green_single.9.png +* app\src\main\res\drawable-hdpi\list_green_up.9.png +* app\src\main\res\drawable-hdpi\list_red_down.9.png +* app\src\main\res\drawable-hdpi\list_red_middle.9.png +* app\src\main\res\drawable-hdpi\list_red_single.9.png +* app\src\main\res\drawable-hdpi\list_red_up.9.png +* app\src\main\res\drawable-hdpi\list_white_down.9.png +* app\src\main\res\drawable-hdpi\list_white_middle.9.png +* app\src\main\res\drawable-hdpi\list_white_single.9.png +* app\src\main\res\drawable-hdpi\list_white_up.9.png +* app\src\main\res\drawable-hdpi\list_yellow_down.9.png +* app\src\main\res\drawable-hdpi\list_yellow_middle.9.png +* app\src\main\res\drawable-hdpi\list_yellow_single.9.png +* app\src\main\res\drawable-hdpi\list_yellow_up.9.png +* app\src\main\res\drawable-hdpi\menu_delete.png +* app\src\main\res\drawable-hdpi\menu_move.png +* app\src\main\res\drawable-hdpi\new_note_normal.png +* app\src\main\res\drawable-hdpi\new_note_pressed.png +* app\src\main\res\drawable-hdpi\note_edit_color_selector_panel.png +* app\src\main\res\drawable-hdpi\notification.png +* app\src\main\res\drawable-hdpi\search_result.png +* app\src\main\res\drawable-hdpi\selected.png +* app\src\main\res\drawable-hdpi\title_alert.png +* app\src\main\res\drawable-hdpi\title_bar_bg.9.png +* app\src\main\res\drawable-hdpi\widget_2x_blue.png +* app\src\main\res\drawable-hdpi\widget_2x_green.png +* app\src\main\res\drawable-hdpi\widget_2x_red.png +* app\src\main\res\drawable-hdpi\widget_2x_white.png +* app\src\main\res\drawable-hdpi\widget_2x_yellow.png +* app\src\main\res\drawable-hdpi\widget_4x_blue.png +* app\src\main\res\drawable-hdpi\widget_4x_green.png +* app\src\main\res\drawable-hdpi\widget_4x_red.png +* app\src\main\res\drawable-hdpi\widget_4x_white.png +* app\src\main\res\drawable-hdpi\widget_4x_yellow.png +* app\src\main\res\drawable\ +* app\src\main\res\drawable\new_note.xml +* app\src\main\res\layout\ +* app\src\main\res\layout\account_dialog_title.xml +* app\src\main\res\layout\add_account_text.xml +* app\src\main\res\layout\datetime_picker.xml +* app\src\main\res\layout\dialog_edit_text.xml +* app\src\main\res\layout\folder_list_item.xml +* app\src\main\res\layout\note_edit.xml +* app\src\main\res\layout\note_edit_list_item.xml +* app\src\main\res\layout\note_item.xml +* app\src\main\res\layout\note_list.xml +* app\src\main\res\layout\note_list_dropdown_menu.xml +* app\src\main\res\layout\note_list_footer.xml +* app\src\main\res\layout\settings_header.xml +* app\src\main\res\layout\widget_2x.xml +* app\src\main\res\layout\widget_4x.xml +* app\src\main\res\menu\ +* app\src\main\res\menu\call_note_edit.xml +* app\src\main\res\menu\call_record_folder.xml +* app\src\main\res\menu\note_edit.xml +* app\src\main\res\menu\note_list.xml +* app\src\main\res\menu\note_list_dropdown.xml +* app\src\main\res\menu\note_list_options.xml +* app\src\main\res\menu\sub_folder.xml +* app\src\main\res\raw-zh-rCN\ +* app\src\main\res\raw-zh-rCN\introduction +* app\src\main\res\raw\ +* app\src\main\res\raw\introduction +* app\src\main\res\values-zh-rCN\ +* app\src\main\res\values-zh-rCN\arrays.xml +* app\src\main\res\values-zh-rCN\strings.xml +* app\src\main\res\values-zh-rTW\ +* app\src\main\res\values-zh-rTW\arrays.xml +* app\src\main\res\values-zh-rTW\strings.xml +* app\src\main\res\values\ +* app\src\main\res\values\arrays.xml +* app\src\main\res\values\colors.xml +* app\src\main\res\values\dimens.xml +* app\src\main\res\values\strings.xml +* app\src\main\res\values\styles.xml +* app\src\main\res\xml\ +* app\src\main\res\xml\preferences.xml +* app\src\main\res\xml\searchable.xml +* app\src\main\res\xml\widget_2x_info.xml +* app\src\main\res\xml\widget_4x_info.xml +* build.gradle +* gradle\ +* gradle\wrapper\ +* gradle\wrapper\gradle-wrapper.jar +* gradle\wrapper\gradle-wrapper.properties +* gradlew +* gradlew.bat +* settings.gradle + +Moved Files: +------------ +Android Gradle projects use a different directory structure than ADT +Eclipse projects. Here's how the projects were restructured: + +* AndroidManifest.xml => app\src\main\AndroidManifest.xml +* res\ => app\src\main\res\ +* src\ => app\src\main\java\ + +Next Steps: +----------- +You can now build the project. The Gradle project needs network +connectivity to download dependencies. + +Bugs: +----- +If for some reason your project does not build, and you determine that +it is due to a bug or limitation of the Eclipse to Gradle importer, +please file a bug at http://b.android.com with category +Component-Tools. + +(This import summary is for your information only, and can be deleted +after import once you are satisfied with the results.) diff --git a/src/local.properties b/src/local.properties new file mode 100644 index 0000000..22b1cfb --- /dev/null +++ b/src/local.properties @@ -0,0 +1,8 @@ +## This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +#Fri May 16 12:21:02 CST 2025 +sdk.dir=D\:\\Android\\sdk diff --git a/src/res/color/primary_text_dark.xml b/src/res/color/primary_text_dark.xml new file mode 100644 index 0000000..7c85459 --- /dev/null +++ b/src/res/color/primary_text_dark.xml @@ -0,0 +1,22 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/res/color/secondary_text_dark.xml b/src/res/color/secondary_text_dark.xml new file mode 100644 index 0000000..c1c2384 --- /dev/null +++ b/src/res/color/secondary_text_dark.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/src/res/drawable-hdpi/bg_btn_set_color.png b/src/res/drawable-hdpi/bg_btn_set_color.png new file mode 100644 index 0000000..5eb5d44 Binary files /dev/null and b/src/res/drawable-hdpi/bg_btn_set_color.png differ diff --git a/src/res/drawable-hdpi/bg_color_btn_mask.png b/src/res/drawable-hdpi/bg_color_btn_mask.png new file mode 100644 index 0000000..100db77 Binary files /dev/null and b/src/res/drawable-hdpi/bg_color_btn_mask.png differ diff --git a/src/res/drawable-hdpi/call_record.png b/src/res/drawable-hdpi/call_record.png new file mode 100644 index 0000000..fb88ca4 Binary files /dev/null and b/src/res/drawable-hdpi/call_record.png differ diff --git a/src/res/drawable-hdpi/clock.png b/src/res/drawable-hdpi/clock.png new file mode 100644 index 0000000..5f2ae9a Binary files /dev/null and b/src/res/drawable-hdpi/clock.png differ diff --git a/src/res/drawable-hdpi/delete.png b/src/res/drawable-hdpi/delete.png new file mode 100644 index 0000000..643de3e Binary files /dev/null and b/src/res/drawable-hdpi/delete.png differ diff --git a/src/res/drawable-hdpi/dropdown_icon.9.png b/src/res/drawable-hdpi/dropdown_icon.9.png new file mode 100644 index 0000000..5525025 Binary files /dev/null and b/src/res/drawable-hdpi/dropdown_icon.9.png differ diff --git a/src/res/drawable-hdpi/edit_blue.9.png b/src/res/drawable-hdpi/edit_blue.9.png new file mode 100644 index 0000000..55a1856 Binary files /dev/null and b/src/res/drawable-hdpi/edit_blue.9.png differ diff --git a/src/res/drawable-hdpi/edit_green.9.png b/src/res/drawable-hdpi/edit_green.9.png new file mode 100644 index 0000000..2cb2d60 Binary files /dev/null and b/src/res/drawable-hdpi/edit_green.9.png differ diff --git a/src/res/drawable-hdpi/edit_red.9.png b/src/res/drawable-hdpi/edit_red.9.png new file mode 100644 index 0000000..bae944a Binary files /dev/null and b/src/res/drawable-hdpi/edit_red.9.png differ diff --git a/src/res/drawable-hdpi/edit_title_blue.9.png b/src/res/drawable-hdpi/edit_title_blue.9.png new file mode 100644 index 0000000..96e6092 Binary files /dev/null and b/src/res/drawable-hdpi/edit_title_blue.9.png differ diff --git a/src/res/drawable-hdpi/edit_title_green.9.png b/src/res/drawable-hdpi/edit_title_green.9.png new file mode 100644 index 0000000..08d8644 Binary files /dev/null and b/src/res/drawable-hdpi/edit_title_green.9.png differ diff --git a/src/res/drawable-hdpi/edit_title_red.9.png b/src/res/drawable-hdpi/edit_title_red.9.png new file mode 100644 index 0000000..9c430e5 Binary files /dev/null and b/src/res/drawable-hdpi/edit_title_red.9.png differ diff --git a/src/res/drawable-hdpi/edit_title_white.9.png b/src/res/drawable-hdpi/edit_title_white.9.png new file mode 100644 index 0000000..19e8d95 Binary files /dev/null and b/src/res/drawable-hdpi/edit_title_white.9.png differ diff --git a/src/res/drawable-hdpi/edit_title_yellow.9.png b/src/res/drawable-hdpi/edit_title_yellow.9.png new file mode 100644 index 0000000..bf8f580 Binary files /dev/null and b/src/res/drawable-hdpi/edit_title_yellow.9.png differ diff --git a/src/res/drawable-hdpi/edit_white.9.png b/src/res/drawable-hdpi/edit_white.9.png new file mode 100644 index 0000000..918f7a6 Binary files /dev/null and b/src/res/drawable-hdpi/edit_white.9.png differ diff --git a/src/res/drawable-hdpi/edit_yellow.9.png b/src/res/drawable-hdpi/edit_yellow.9.png new file mode 100644 index 0000000..10cb642 Binary files /dev/null and b/src/res/drawable-hdpi/edit_yellow.9.png differ diff --git a/src/res/drawable-hdpi/font_large.png b/src/res/drawable-hdpi/font_large.png new file mode 100644 index 0000000..78cf2e6 Binary files /dev/null and b/src/res/drawable-hdpi/font_large.png differ diff --git a/src/res/drawable-hdpi/font_normal.png b/src/res/drawable-hdpi/font_normal.png new file mode 100644 index 0000000..9de7ced Binary files /dev/null and b/src/res/drawable-hdpi/font_normal.png differ diff --git a/src/res/drawable-hdpi/font_size_selector_bg.9.png b/src/res/drawable-hdpi/font_size_selector_bg.9.png new file mode 100644 index 0000000..be8e64c Binary files /dev/null and b/src/res/drawable-hdpi/font_size_selector_bg.9.png differ diff --git a/src/res/drawable-hdpi/font_small.png b/src/res/drawable-hdpi/font_small.png new file mode 100644 index 0000000..d3ff104 Binary files /dev/null and b/src/res/drawable-hdpi/font_small.png differ diff --git a/src/res/drawable-hdpi/font_super.png b/src/res/drawable-hdpi/font_super.png new file mode 100644 index 0000000..85b13a1 Binary files /dev/null and b/src/res/drawable-hdpi/font_super.png differ diff --git a/src/res/drawable-hdpi/icon_app.png b/src/res/drawable-hdpi/icon_app.png new file mode 100644 index 0000000..418aadc Binary files /dev/null and b/src/res/drawable-hdpi/icon_app.png differ diff --git a/src/res/drawable-hdpi/list_background.png b/src/res/drawable-hdpi/list_background.png new file mode 100644 index 0000000..087e1f9 Binary files /dev/null and b/src/res/drawable-hdpi/list_background.png differ diff --git a/src/res/drawable-hdpi/list_blue_down.9.png b/src/res/drawable-hdpi/list_blue_down.9.png new file mode 100644 index 0000000..b88eebf Binary files /dev/null and b/src/res/drawable-hdpi/list_blue_down.9.png differ diff --git a/src/res/drawable-hdpi/list_blue_middle.9.png b/src/res/drawable-hdpi/list_blue_middle.9.png new file mode 100644 index 0000000..96b1c8b Binary files /dev/null and b/src/res/drawable-hdpi/list_blue_middle.9.png differ diff --git a/src/res/drawable-hdpi/list_blue_single.9.png b/src/res/drawable-hdpi/list_blue_single.9.png new file mode 100644 index 0000000..d7e7206 Binary files /dev/null and b/src/res/drawable-hdpi/list_blue_single.9.png differ diff --git a/src/res/drawable-hdpi/list_blue_up.9.png b/src/res/drawable-hdpi/list_blue_up.9.png new file mode 100644 index 0000000..632e88c Binary files /dev/null and b/src/res/drawable-hdpi/list_blue_up.9.png differ diff --git a/src/res/drawable-hdpi/list_folder.9.png b/src/res/drawable-hdpi/list_folder.9.png new file mode 100644 index 0000000..829f61b Binary files /dev/null and b/src/res/drawable-hdpi/list_folder.9.png differ diff --git a/src/res/drawable-hdpi/list_footer_bg.9.png b/src/res/drawable-hdpi/list_footer_bg.9.png new file mode 100644 index 0000000..5325c25 Binary files /dev/null and b/src/res/drawable-hdpi/list_footer_bg.9.png differ diff --git a/src/res/drawable-hdpi/list_green_down.9.png b/src/res/drawable-hdpi/list_green_down.9.png new file mode 100644 index 0000000..64a39d9 Binary files /dev/null and b/src/res/drawable-hdpi/list_green_down.9.png differ diff --git a/src/res/drawable-hdpi/list_green_middle.9.png b/src/res/drawable-hdpi/list_green_middle.9.png new file mode 100644 index 0000000..897325a Binary files /dev/null and b/src/res/drawable-hdpi/list_green_middle.9.png differ diff --git a/src/res/drawable-hdpi/list_green_single.9.png b/src/res/drawable-hdpi/list_green_single.9.png new file mode 100644 index 0000000..c83405f Binary files /dev/null and b/src/res/drawable-hdpi/list_green_single.9.png differ diff --git a/src/res/drawable-hdpi/list_green_up.9.png b/src/res/drawable-hdpi/list_green_up.9.png new file mode 100644 index 0000000..141f9e1 Binary files /dev/null and b/src/res/drawable-hdpi/list_green_up.9.png differ diff --git a/src/res/drawable-hdpi/list_red_down.9.png b/src/res/drawable-hdpi/list_red_down.9.png new file mode 100644 index 0000000..4224309 Binary files /dev/null and b/src/res/drawable-hdpi/list_red_down.9.png differ diff --git a/src/res/drawable-hdpi/list_red_middle.9.png b/src/res/drawable-hdpi/list_red_middle.9.png new file mode 100644 index 0000000..9988f17 Binary files /dev/null and b/src/res/drawable-hdpi/list_red_middle.9.png differ diff --git a/src/res/drawable-hdpi/list_red_single.9.png b/src/res/drawable-hdpi/list_red_single.9.png new file mode 100644 index 0000000..587c348 Binary files /dev/null and b/src/res/drawable-hdpi/list_red_single.9.png differ diff --git a/src/res/drawable-hdpi/list_red_up.9.png b/src/res/drawable-hdpi/list_red_up.9.png new file mode 100644 index 0000000..46b4757 Binary files /dev/null and b/src/res/drawable-hdpi/list_red_up.9.png differ diff --git a/src/res/drawable-hdpi/list_white_down.9.png b/src/res/drawable-hdpi/list_white_down.9.png new file mode 100644 index 0000000..29f9d8c Binary files /dev/null and b/src/res/drawable-hdpi/list_white_down.9.png differ diff --git a/src/res/drawable-hdpi/list_white_middle.9.png b/src/res/drawable-hdpi/list_white_middle.9.png new file mode 100644 index 0000000..77a4ab4 Binary files /dev/null and b/src/res/drawable-hdpi/list_white_middle.9.png differ diff --git a/src/res/drawable-hdpi/list_white_single.9.png b/src/res/drawable-hdpi/list_white_single.9.png new file mode 100644 index 0000000..3e79189 Binary files /dev/null and b/src/res/drawable-hdpi/list_white_single.9.png differ diff --git a/src/res/drawable-hdpi/list_white_up.9.png b/src/res/drawable-hdpi/list_white_up.9.png new file mode 100644 index 0000000..e23cd5c Binary files /dev/null and b/src/res/drawable-hdpi/list_white_up.9.png differ diff --git a/src/res/drawable-hdpi/list_yellow_down.9.png b/src/res/drawable-hdpi/list_yellow_down.9.png new file mode 100644 index 0000000..31cfc1e Binary files /dev/null and b/src/res/drawable-hdpi/list_yellow_down.9.png differ diff --git a/src/res/drawable-hdpi/list_yellow_middle.9.png b/src/res/drawable-hdpi/list_yellow_middle.9.png new file mode 100644 index 0000000..b6549b2 Binary files /dev/null and b/src/res/drawable-hdpi/list_yellow_middle.9.png differ diff --git a/src/res/drawable-hdpi/list_yellow_single.9.png b/src/res/drawable-hdpi/list_yellow_single.9.png new file mode 100644 index 0000000..3faf507 Binary files /dev/null and b/src/res/drawable-hdpi/list_yellow_single.9.png differ diff --git a/src/res/drawable-hdpi/list_yellow_up.9.png b/src/res/drawable-hdpi/list_yellow_up.9.png new file mode 100644 index 0000000..4ae791c Binary files /dev/null and b/src/res/drawable-hdpi/list_yellow_up.9.png differ diff --git a/src/res/drawable-hdpi/menu_delete.png b/src/res/drawable-hdpi/menu_delete.png new file mode 100644 index 0000000..ccdfc4b Binary files /dev/null and b/src/res/drawable-hdpi/menu_delete.png differ diff --git a/src/res/drawable-hdpi/menu_move.png b/src/res/drawable-hdpi/menu_move.png new file mode 100644 index 0000000..1140b71 Binary files /dev/null and b/src/res/drawable-hdpi/menu_move.png differ diff --git a/src/res/drawable-hdpi/new_note_normal.png b/src/res/drawable-hdpi/new_note_normal.png new file mode 100644 index 0000000..e24e0d1 Binary files /dev/null and b/src/res/drawable-hdpi/new_note_normal.png differ diff --git a/src/res/drawable-hdpi/new_note_pressed.png b/src/res/drawable-hdpi/new_note_pressed.png new file mode 100644 index 0000000..c748936 Binary files /dev/null and b/src/res/drawable-hdpi/new_note_pressed.png differ diff --git a/src/res/drawable-hdpi/note_edit_color_selector_panel.png b/src/res/drawable-hdpi/note_edit_color_selector_panel.png new file mode 100644 index 0000000..fc49552 Binary files /dev/null and b/src/res/drawable-hdpi/note_edit_color_selector_panel.png differ diff --git a/src/res/drawable-hdpi/notification.png b/src/res/drawable-hdpi/notification.png new file mode 100644 index 0000000..b13ab4a Binary files /dev/null and b/src/res/drawable-hdpi/notification.png differ diff --git a/src/res/drawable-hdpi/search_result.png b/src/res/drawable-hdpi/search_result.png new file mode 100644 index 0000000..ff2befd Binary files /dev/null and b/src/res/drawable-hdpi/search_result.png differ diff --git a/src/res/drawable-hdpi/selected.png b/src/res/drawable-hdpi/selected.png new file mode 100644 index 0000000..b889bef Binary files /dev/null and b/src/res/drawable-hdpi/selected.png differ diff --git a/src/res/drawable-hdpi/title_alert.png b/src/res/drawable-hdpi/title_alert.png new file mode 100644 index 0000000..544ee9c Binary files /dev/null and b/src/res/drawable-hdpi/title_alert.png differ diff --git a/src/res/drawable-hdpi/title_bar_bg.9.png b/src/res/drawable-hdpi/title_bar_bg.9.png new file mode 100644 index 0000000..eb6bff0 Binary files /dev/null and b/src/res/drawable-hdpi/title_bar_bg.9.png differ diff --git a/src/res/drawable-hdpi/widget_2x_blue.png b/src/res/drawable-hdpi/widget_2x_blue.png new file mode 100644 index 0000000..a1707f4 Binary files /dev/null and b/src/res/drawable-hdpi/widget_2x_blue.png differ diff --git a/src/res/drawable-hdpi/widget_2x_green.png b/src/res/drawable-hdpi/widget_2x_green.png new file mode 100644 index 0000000..f86886c Binary files /dev/null and b/src/res/drawable-hdpi/widget_2x_green.png differ diff --git a/src/res/drawable-hdpi/widget_2x_red.png b/src/res/drawable-hdpi/widget_2x_red.png new file mode 100644 index 0000000..0e66c29 Binary files /dev/null and b/src/res/drawable-hdpi/widget_2x_red.png differ diff --git a/src/res/drawable-hdpi/widget_2x_white.png b/src/res/drawable-hdpi/widget_2x_white.png new file mode 100644 index 0000000..5f0619a Binary files /dev/null and b/src/res/drawable-hdpi/widget_2x_white.png differ diff --git a/src/res/drawable-hdpi/widget_2x_yellow.png b/src/res/drawable-hdpi/widget_2x_yellow.png new file mode 100644 index 0000000..12d1c2b Binary files /dev/null and b/src/res/drawable-hdpi/widget_2x_yellow.png differ diff --git a/src/res/drawable-hdpi/widget_4x_blue.png b/src/res/drawable-hdpi/widget_4x_blue.png new file mode 100644 index 0000000..9183738 Binary files /dev/null and b/src/res/drawable-hdpi/widget_4x_blue.png differ diff --git a/src/res/drawable-hdpi/widget_4x_green.png b/src/res/drawable-hdpi/widget_4x_green.png new file mode 100644 index 0000000..fa8b452 Binary files /dev/null and b/src/res/drawable-hdpi/widget_4x_green.png differ diff --git a/src/res/drawable-hdpi/widget_4x_red.png b/src/res/drawable-hdpi/widget_4x_red.png new file mode 100644 index 0000000..62de074 Binary files /dev/null and b/src/res/drawable-hdpi/widget_4x_red.png differ diff --git a/src/res/drawable-hdpi/widget_4x_white.png b/src/res/drawable-hdpi/widget_4x_white.png new file mode 100644 index 0000000..a37d67c Binary files /dev/null and b/src/res/drawable-hdpi/widget_4x_white.png differ diff --git a/src/res/drawable-hdpi/widget_4x_yellow.png b/src/res/drawable-hdpi/widget_4x_yellow.png new file mode 100644 index 0000000..d7c5fa4 Binary files /dev/null and b/src/res/drawable-hdpi/widget_4x_yellow.png differ diff --git a/src/res/drawable/bg_afternoon.xml b/src/res/drawable/bg_afternoon.xml new file mode 100644 index 0000000..9296667 --- /dev/null +++ b/src/res/drawable/bg_afternoon.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/src/res/drawable/bg_evening.xml b/src/res/drawable/bg_evening.xml new file mode 100644 index 0000000..46f71d5 --- /dev/null +++ b/src/res/drawable/bg_evening.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/src/res/drawable/bg_morning.xml b/src/res/drawable/bg_morning.xml new file mode 100644 index 0000000..abaf35a --- /dev/null +++ b/src/res/drawable/bg_morning.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/src/res/drawable/new_note.xml b/src/res/drawable/new_note.xml new file mode 100644 index 0000000..2154ebc --- /dev/null +++ b/src/res/drawable/new_note.xml @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/src/res/layout/account_dialog_title.xml b/src/res/layout/account_dialog_title.xml new file mode 100644 index 0000000..7717112 --- /dev/null +++ b/src/res/layout/account_dialog_title.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/res/layout/add_account_text.xml b/src/res/layout/add_account_text.xml new file mode 100644 index 0000000..c799178 --- /dev/null +++ b/src/res/layout/add_account_text.xml @@ -0,0 +1,32 @@ + + + + + + + + \ No newline at end of file diff --git a/src/res/layout/datetime_picker.xml b/src/res/layout/datetime_picker.xml new file mode 100644 index 0000000..f10d592 --- /dev/null +++ b/src/res/layout/datetime_picker.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/res/layout/dialog_edit_text.xml b/src/res/layout/dialog_edit_text.xml new file mode 100644 index 0000000..361b39a --- /dev/null +++ b/src/res/layout/dialog_edit_text.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/src/res/layout/dynamic_bg_settings.xml b/src/res/layout/dynamic_bg_settings.xml new file mode 100644 index 0000000..2beaf3e --- /dev/null +++ b/src/res/layout/dynamic_bg_settings.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + +