diff --git a/README.md b/README.md
index 180ae50..5d282d6 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,59 @@
# 小米便签
-### 目录组织:
+#### 目录组织:
+ model: 存放UML模型
+ doc: 存放各类文档
+ src: 存放源程序代码
+ other: 存放综合实践的总结、自评和汇报PPT等
+ README.md
+
+#### 课外实验一
+
+☑软件需求文档;
+
+☑软件体系结构图,描述开源软件的模块构成;
+
+☑SonarQube的开源软件质量报告
+
+#### 课外实验二
+
+☑理解开源代码的语义,撰写技术博客总结精读的成果及心得体会
+
+☑具有标注的开源软件代码及其文件;
+
+#### 课外实验三
+
+UML用例图模型和软件需求描述文档;
+
+开源软件新增需求的用例交互图、分析类图、状态图以及软件需求规格说明书;
+
+#### 课外实验四
+
+软件体系结构模型(至少包括逻辑视点和物理视点的体系结构模型)
+
+软件体系结构设计文档;
+
+#### 课外实验五
+
+用户界面原型,用户界面的UML类图模型以及界面跳转的顺序图模型;
+
+#### 课外实验六
+
+用类图、顺序图、活动图、状态图等描述的详细设计模型;
+
+#### 课外实验七
+
+开源软件的维护代码;
+
+#### 课外实验八
+
+反馈通过测试发现的软件缺陷
+
+#### 课外实验九
+
+可运行和可展示的开源软件系统;
+
+#### 课外实验十
+
+汇报PPT、技术博客等;
diff --git a/doc/小米便签开源代码的泛读报告.docx b/doc/实验1/小米便签开源代码的泛读报告.docx
similarity index 83%
rename from doc/小米便签开源代码的泛读报告.docx
rename to doc/实验1/小米便签开源代码的泛读报告.docx
index d5826d6..60c785c 100644
Binary files a/doc/小米便签开源代码的泛读报告.docx and b/doc/实验1/小米便签开源代码的泛读报告.docx differ
diff --git a/model/data包中类间的关系图.png b/model/data包中类间的关系图.png
new file mode 100644
index 0000000..9cc32cf
Binary files /dev/null and b/model/data包中类间的关系图.png differ
diff --git a/model/gtask包中类间的关系图.png b/model/gtask包中类间的关系图.png
new file mode 100644
index 0000000..d992803
Binary files /dev/null and b/model/gtask包中类间的关系图.png differ
diff --git a/model/model包中类间的关系图.png b/model/model包中类间的关系图.png
new file mode 100644
index 0000000..e0a1bba
Binary files /dev/null and b/model/model包中类间的关系图.png differ
diff --git a/model/widget包中类间的关系图.png b/model/widget包中类间的关系图.png
new file mode 100644
index 0000000..300b13c
Binary files /dev/null and b/model/widget包中类间的关系图.png differ
diff --git a/model/小米便签体系结构图.png b/model/小米便签体系结构图.png
new file mode 100644
index 0000000..f2bfc18
Binary files /dev/null and b/model/小米便签体系结构图.png differ
diff --git a/model/小米便签用例图.png b/model/小米便签用例图.png
new file mode 100644
index 0000000..c80c727
Binary files /dev/null and b/model/小米便签用例图.png differ
diff --git a/src/Notes/.gradle/7.5/checksums/checksums.lock b/src/Notes/.gradle/7.5/checksums/checksums.lock
deleted file mode 100644
index 50c4a25..0000000
Binary files a/src/Notes/.gradle/7.5/checksums/checksums.lock and /dev/null differ
diff --git a/src/Notes/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock b/src/Notes/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock
deleted file mode 100644
index 892e82d..0000000
Binary files a/src/Notes/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock and /dev/null differ
diff --git a/src/Notes/.gradle/7.5/dependencies-accessors/gc.properties b/src/Notes/.gradle/7.5/dependencies-accessors/gc.properties
deleted file mode 100644
index e69de29..0000000
diff --git a/src/Notes/.gradle/7.5/executionHistory/executionHistory.bin b/src/Notes/.gradle/7.5/executionHistory/executionHistory.bin
deleted file mode 100644
index e173240..0000000
Binary files a/src/Notes/.gradle/7.5/executionHistory/executionHistory.bin and /dev/null differ
diff --git a/src/Notes/.gradle/7.5/executionHistory/executionHistory.lock b/src/Notes/.gradle/7.5/executionHistory/executionHistory.lock
deleted file mode 100644
index bd146c4..0000000
Binary files a/src/Notes/.gradle/7.5/executionHistory/executionHistory.lock and /dev/null differ
diff --git a/src/Notes/.gradle/7.5/fileChanges/last-build.bin b/src/Notes/.gradle/7.5/fileChanges/last-build.bin
deleted file mode 100644
index f76dd23..0000000
Binary files a/src/Notes/.gradle/7.5/fileChanges/last-build.bin and /dev/null differ
diff --git a/src/Notes/.gradle/7.5/fileHashes/fileHashes.bin b/src/Notes/.gradle/7.5/fileHashes/fileHashes.bin
deleted file mode 100644
index 7804106..0000000
Binary files a/src/Notes/.gradle/7.5/fileHashes/fileHashes.bin and /dev/null differ
diff --git a/src/Notes/.gradle/7.5/fileHashes/fileHashes.lock b/src/Notes/.gradle/7.5/fileHashes/fileHashes.lock
deleted file mode 100644
index 8ab4c64..0000000
Binary files a/src/Notes/.gradle/7.5/fileHashes/fileHashes.lock and /dev/null differ
diff --git a/src/Notes/.gradle/7.5/fileHashes/resourceHashesCache.bin b/src/Notes/.gradle/7.5/fileHashes/resourceHashesCache.bin
deleted file mode 100644
index 3707989..0000000
Binary files a/src/Notes/.gradle/7.5/fileHashes/resourceHashesCache.bin and /dev/null differ
diff --git a/src/Notes/.gradle/7.5/gc.properties b/src/Notes/.gradle/7.5/gc.properties
deleted file mode 100644
index e69de29..0000000
diff --git a/src/Notes/.gradle/8.0/executionHistory/executionHistory.bin b/src/Notes/.gradle/8.0/executionHistory/executionHistory.bin
index 1c70295..c20f8f5 100644
Binary files a/src/Notes/.gradle/8.0/executionHistory/executionHistory.bin and b/src/Notes/.gradle/8.0/executionHistory/executionHistory.bin differ
diff --git a/src/Notes/.gradle/8.0/executionHistory/executionHistory.lock b/src/Notes/.gradle/8.0/executionHistory/executionHistory.lock
index 73deaf1..3b754cb 100644
Binary files a/src/Notes/.gradle/8.0/executionHistory/executionHistory.lock and b/src/Notes/.gradle/8.0/executionHistory/executionHistory.lock differ
diff --git a/src/Notes/.gradle/8.0/fileHashes/fileHashes.bin b/src/Notes/.gradle/8.0/fileHashes/fileHashes.bin
index 72a419b..6681422 100644
Binary files a/src/Notes/.gradle/8.0/fileHashes/fileHashes.bin and b/src/Notes/.gradle/8.0/fileHashes/fileHashes.bin differ
diff --git a/src/Notes/.gradle/8.0/fileHashes/fileHashes.lock b/src/Notes/.gradle/8.0/fileHashes/fileHashes.lock
index 2a91537..f21d405 100644
Binary files a/src/Notes/.gradle/8.0/fileHashes/fileHashes.lock and b/src/Notes/.gradle/8.0/fileHashes/fileHashes.lock differ
diff --git a/src/Notes/.gradle/8.0/fileHashes/resourceHashesCache.bin b/src/Notes/.gradle/8.0/fileHashes/resourceHashesCache.bin
index 1df965c..367c743 100644
Binary files a/src/Notes/.gradle/8.0/fileHashes/resourceHashesCache.bin and b/src/Notes/.gradle/8.0/fileHashes/resourceHashesCache.bin differ
diff --git a/src/Notes/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/src/Notes/.gradle/buildOutputCleanup/buildOutputCleanup.lock
index 089bead..17d1569 100644
Binary files a/src/Notes/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/src/Notes/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/src/Notes/.gradle/buildOutputCleanup/outputFiles.bin b/src/Notes/.gradle/buildOutputCleanup/outputFiles.bin
index 5e353d5..dbeafc8 100644
Binary files a/src/Notes/.gradle/buildOutputCleanup/outputFiles.bin and b/src/Notes/.gradle/buildOutputCleanup/outputFiles.bin differ
diff --git a/src/Notes/app/src/main/AndroidManifest.xml b/src/Notes/app/src/main/AndroidManifest.xml
index 96920fb..e053679 100644
--- a/src/Notes/app/src/main/AndroidManifest.xml
+++ b/src/Notes/app/src/main/AndroidManifest.xml
@@ -39,9 +39,6 @@
android:icon="@drawable/icon_app"
android:label="@string/app_name">
-
-
-
Type: INTEGER
*/ public static final String DATA2 = "data2"; - /** + /* * Generic data column, the meaning is {@link #MIMETYPE} specific, used for * TEXT data type *Type: TEXT
*/ public static final String DATA3 = "data3"; - /** + /* * Generic data column, the meaning is {@link #MIMETYPE} specific, used for * TEXT data type *Type: TEXT
*/ public static final String DATA4 = "data4"; - /** + /* * Generic data column, the meaning is {@link #MIMETYPE} specific, used for * TEXT data type *Type: TEXT
diff --git a/src/Notes/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java b/src/Notes/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java index b27c0e6..7b4e67e 100644 --- a/src/Notes/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java +++ b/src/Notes/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java @@ -50,11 +50,11 @@ public abstract class NoteWidgetProvider extends AppWidgetProvider { // 小米 public void onDeleted(Context context, int[] appWidgetIds) { // 重写删除窗口小部件函数 ContentValues values = new ContentValues(); values.put(NoteColumns.WIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); - for (int i = 0; i < appWidgetIds.length; i++) { + for (int appWidgetId : appWidgetIds) { context.getContentResolver().update(Notes.CONTENT_NOTE_URI, values, NoteColumns.WIDGET_ID + "=?", - new String[] { String.valueOf(appWidgetIds[i])}); + new String[]{String.valueOf(appWidgetId)}); } } @@ -72,19 +72,22 @@ public abstract class NoteWidgetProvider extends AppWidgetProvider { // 小米 private void update(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds, boolean privacyMode) { // 更新窗口小部件中的内容 - for (int i = 0; i < appWidgetIds.length; i++) { - if (appWidgetIds[i] != AppWidgetManager.INVALID_APPWIDGET_ID) { + /* + * Generate the pending intent to start host for the widget + */ + for (int appWidgetId : appWidgetIds) { + if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) { int bgId = ResourceParser.getDefaultBgId(context); String snippet = ""; Intent intent = new Intent(context, NoteEditActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); - intent.putExtra(Notes.INTENT_EXTRA_WIDGET_ID, appWidgetIds[i]); + intent.putExtra(Notes.INTENT_EXTRA_WIDGET_ID, appWidgetId); intent.putExtra(Notes.INTENT_EXTRA_WIDGET_TYPE, getWidgetType()); - Cursor c = getNoteWidgetInfo(context, appWidgetIds[i]); + Cursor c = getNoteWidgetInfo(context, appWidgetId); if (c != null && c.moveToFirst()) { if (c.getCount() > 1) { - Log.e(TAG, "Multiple message with same widget id:" + appWidgetIds[i]); + Log.e(TAG, "Multiple message with same widget id:" + appWidgetId); c.close(); return; } @@ -104,23 +107,23 @@ public abstract class NoteWidgetProvider extends AppWidgetProvider { // 小米 RemoteViews rv = new RemoteViews(context.getPackageName(), getLayoutId()); rv.setImageViewResource(R.id.widget_bg_image, getBgResourceId(bgId)); intent.putExtra(Notes.INTENT_EXTRA_BACKGROUND_ID, bgId); - /** + /* * Generate the pending intent to start host for the widget */ PendingIntent pendingIntent = null; if (privacyMode) { rv.setTextViewText(R.id.widget_text, context.getString(R.string.widget_under_visit_mode)); - pendingIntent = PendingIntent.getActivity(context, appWidgetIds[i], new Intent( + pendingIntent = PendingIntent.getActivity(context, appWidgetId, new Intent( context, NotesListActivity.class), PendingIntent.FLAG_UPDATE_CURRENT); } else { rv.setTextViewText(R.id.widget_text, snippet); - pendingIntent = PendingIntent.getActivity(context, appWidgetIds[i], intent, + pendingIntent = PendingIntent.getActivity(context, appWidgetId, intent, PendingIntent.FLAG_UPDATE_CURRENT); } rv.setOnClickPendingIntent(R.id.widget_text, pendingIntent); - appWidgetManager.updateAppWidget(appWidgetIds[i], rv); + appWidgetManager.updateAppWidget(appWidgetId, rv); } } } @@ -129,5 +132,5 @@ public abstract class NoteWidgetProvider extends AppWidgetProvider { // 小米 protected abstract int getLayoutId(); // 获取布局ID - protected abstract int getWidgetType(); // 获取窗口小部件的类型,即2x2型或者4x4型 + protected abstract int getWidgetType(); // 获取窗口小部件的类型,即2x2型或者3x3型或者4x4型 } diff --git a/src/Notes/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_3x.java b/src/Notes/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_3x.java index d7ddbd8..c1305bd 100644 --- a/src/Notes/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_3x.java +++ b/src/Notes/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_3x.java @@ -1,3 +1,18 @@ +/* + * 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. + * 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. + */ package net.micode.notes.widget; import android.appwidget.AppWidgetManager; diff --git a/src/Notes/app/src/main/res/color/primary_text_dark.xml b/src/Notes/app/src/main/res/color/primary_text_dark.xml index 8ad98e3..2f7c939 100644 --- a/src/Notes/app/src/main/res/color/primary_text_dark.xml +++ b/src/Notes/app/src/main/res/color/primary_text_dark.xml @@ -16,7 +16,7 @@ -->