diff --git a/doc/小米便签代码泛读报告‘Š.docx b/doc/小米便签代码泛读报告‘Š.docx index a237d02..5710de5 100644 Binary files a/doc/小米便签代码泛读报告‘Š.docx and b/doc/小米便签代码泛读报告‘Š.docx differ diff --git a/src/.gradle/6.1.1/executionHistory/executionHistory.bin b/src/.gradle/6.1.1/executionHistory/executionHistory.bin index d36d4a3..1bfffe0 100644 Binary files a/src/.gradle/6.1.1/executionHistory/executionHistory.bin and b/src/.gradle/6.1.1/executionHistory/executionHistory.bin differ diff --git a/src/.gradle/6.1.1/executionHistory/executionHistory.lock b/src/.gradle/6.1.1/executionHistory/executionHistory.lock index 0eac943..cfd048a 100644 Binary files a/src/.gradle/6.1.1/executionHistory/executionHistory.lock and b/src/.gradle/6.1.1/executionHistory/executionHistory.lock differ diff --git a/src/.gradle/6.1.1/fileHashes/fileHashes.bin b/src/.gradle/6.1.1/fileHashes/fileHashes.bin index 63c05ea..583d2be 100644 Binary files a/src/.gradle/6.1.1/fileHashes/fileHashes.bin and b/src/.gradle/6.1.1/fileHashes/fileHashes.bin differ diff --git a/src/.gradle/6.1.1/fileHashes/fileHashes.lock b/src/.gradle/6.1.1/fileHashes/fileHashes.lock index 78cd0db..d82faad 100644 Binary files a/src/.gradle/6.1.1/fileHashes/fileHashes.lock and b/src/.gradle/6.1.1/fileHashes/fileHashes.lock differ diff --git a/src/.gradle/6.1.1/fileHashes/resourceHashesCache.bin b/src/.gradle/6.1.1/fileHashes/resourceHashesCache.bin index ceaf1f3..a3e82b9 100644 Binary files a/src/.gradle/6.1.1/fileHashes/resourceHashesCache.bin and b/src/.gradle/6.1.1/fileHashes/resourceHashesCache.bin differ diff --git a/src/.gradle/6.1.1/javaCompile/classAnalysis.bin b/src/.gradle/6.1.1/javaCompile/classAnalysis.bin index 7d338ad..327a5a2 100644 Binary files a/src/.gradle/6.1.1/javaCompile/classAnalysis.bin and b/src/.gradle/6.1.1/javaCompile/classAnalysis.bin differ diff --git a/src/.gradle/6.1.1/javaCompile/jarAnalysis.bin b/src/.gradle/6.1.1/javaCompile/jarAnalysis.bin index 819cc62..98f5d94 100644 Binary files a/src/.gradle/6.1.1/javaCompile/jarAnalysis.bin and b/src/.gradle/6.1.1/javaCompile/jarAnalysis.bin differ diff --git a/src/.gradle/6.1.1/javaCompile/javaCompile.lock b/src/.gradle/6.1.1/javaCompile/javaCompile.lock index 8be446a..46a7003 100644 Binary files a/src/.gradle/6.1.1/javaCompile/javaCompile.lock and b/src/.gradle/6.1.1/javaCompile/javaCompile.lock differ diff --git a/src/.gradle/6.1.1/javaCompile/taskHistory.bin b/src/.gradle/6.1.1/javaCompile/taskHistory.bin index 88ceded..522d881 100644 Binary files a/src/.gradle/6.1.1/javaCompile/taskHistory.bin and b/src/.gradle/6.1.1/javaCompile/taskHistory.bin differ diff --git a/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 7328990..3fae02c 100644 Binary files a/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/src/.gradle/buildOutputCleanup/outputFiles.bin b/src/.gradle/buildOutputCleanup/outputFiles.bin index fc2a294..8abcaaf 100644 Binary files a/src/.gradle/buildOutputCleanup/outputFiles.bin and b/src/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/src/.gradle/checksums/checksums.lock b/src/.gradle/checksums/checksums.lock index ae8f3cb..8e73179 100644 Binary files a/src/.gradle/checksums/checksums.lock and b/src/.gradle/checksums/checksums.lock differ diff --git a/src/.idea/sonarIssues.xml b/src/.idea/sonarIssues.xml index fac0b26..9169376 100644 --- a/src/.idea/sonarIssues.xml +++ b/src/.idea/sonarIssues.xml @@ -3,6 +3,11 @@ diff --git a/src/.idea/sonarlint/issuestore/5/0/503adcf2a0be1ecdb94a15efba4433b6589877b9 b/src/.idea/sonarlint/issuestore/5/0/503adcf2a0be1ecdb94a15efba4433b6589877b9 index 086e030..c22ca93 100644 --- a/src/.idea/sonarlint/issuestore/5/0/503adcf2a0be1ecdb94a15efba4433b6589877b9 +++ b/src/.idea/sonarlint/issuestore/5/0/503adcf2a0be1ecdb94a15efba4433b6589877b9 @@ -1,12 +1,12 @@ -f -java:S1301h"KReplace this "switch" statement by "if" statements to increase readability.( -o -java:S22931"YReplace the type specification in this constructor call with the diamond operator ("<>").( -M -java:S1135c"2Complete the task associated to this TODO comment.( < java:S131h""Add a default case to this switch.( +P +java:S2864"4Iterate over the "entrySet" instead of the "keySet".(Κ ^ java:S1126"BReplace this if-then-else statement by a single method invocation.(忥 -P -java:S2864"4Iterate over the "entrySet" instead of the "keySet".(Κ \ No newline at end of file +M +java:S1135c"2Complete the task associated to this TODO comment.( +f +java:S1301h"KReplace this "switch" statement by "if" statements to increase readability.( +o +java:S22931"YReplace the type specification in this constructor call with the diamond operator ("<>").( \ No newline at end of file diff --git a/src/.idea/sonarlint/issuestore/5/7/577f30d26378ec8a2bd2e4a43f3c79b3f04c402c b/src/.idea/sonarlint/issuestore/5/7/577f30d26378ec8a2bd2e4a43f3c79b3f04c402c index 13ac517..95d576b 100644 --- a/src/.idea/sonarlint/issuestore/5/7/577f30d26378ec8a2bd2e4a43f3c79b3f04c402c +++ b/src/.idea/sonarlint/issuestore/5/7/577f30d26378ec8a2bd2e4a43f3c79b3f04c402c @@ -1,35 +1,35 @@ -q -java:S1104N"VMake tvModified a static final constant or non-public and provide accessors if needed.(ԣ +X +java:S1126"AReplace this if-then-else statement by a single return statement.( +t +java:S2293i"YReplace the type specification in this constructor call with the diamond operator ("<>").( r java:S1104P"WMake ivAlertIcon a static final constant or non-public and provide accessors if needed.(න -r -java:S1104R"WMake tvAlertDate a static final constant or non-public and provide accessors if needed.( -s -java:S1104T"XMake ibSetBgColor a static final constant or non-public and provide accessors if needed.( n -java:S1450"WRemove the "mPattern" field and declare it as a local variable in the relevant methods.( -t -java:S2293W"YReplace the type specification in this constructor call with the diamond operator ("<>").(ӏ -t -java:S2293`"YReplace the type specification in this constructor call with the diamond operator ("<>").( -t -java:S2293i"YReplace the type specification in this constructor call with the diamond operator ("<>").( +java:S3776"RRefactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed.(ݨ o java:S2293q"YReplace the type specification in this constructor call with the diamond operator ("<>").( -n -java:S3776"RRefactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed.(ݨ K java:S2864"4Iterate over the "entrySet" instead of the "keySet".(ԇ +t +java:S2293`"YReplace the type specification in this constructor call with the diamond operator ("<>").( N java:S1135"2Complete the task associated to this TODO comment.( -8 -java:S1116"Remove this empty statement.( -X -java:S1126"AReplace this if-then-else statement by a single return statement.( +t +java:S2293W"YReplace the type specification in this constructor call with the diamond operator ("<>").(ӏ +n +java:S1450"WRemove the "mPattern" field and declare it as a local variable in the relevant methods.( +r +java:S1104R"WMake tvAlertDate a static final constant or non-public and provide accessors if needed.( +s +java:S1104T"XMake ibSetBgColor a static final constant or non-public and provide accessors if needed.( 8 java:S1116"Remove this empty statement.( p java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(艥 +q +java:S1104N"VMake tvModified a static final constant or non-public and provide accessors if needed.(ԣ d -java:S3252"MUse static access with "android.text.Spanned" for "SPAN_INCLUSIVE_EXCLUSIVE".( \ No newline at end of file +java:S3252"MUse static access with "android.text.Spanned" for "SPAN_INCLUSIVE_EXCLUSIVE".( +8 +java:S1116"Remove this empty statement.( \ No newline at end of file diff --git a/src/.idea/sonarlint/issuestore/8/7/876016634c6642b35109680ccac740dc8271b236 b/src/.idea/sonarlint/issuestore/8/7/876016634c6642b35109680ccac740dc8271b236 index 863a380..e485476 100644 --- a/src/.idea/sonarlint/issuestore/8/7/876016634c6642b35109680ccac740dc8271b236 +++ b/src/.idea/sonarlint/issuestore/8/7/876016634c6642b35109680ccac740dc8271b236 @@ -1,11 +1,11 @@ +X +java:S1126"AReplace this if-then-else statement by a single return statement.( +? +java:S1125"(Remove the literal "true" boolean value.( F java:S1066"/Merge this if statement with the enclosing one.( -3 -java:S2386A"Make this member "protected".( 8 java:S2386K"Make this member "protected".(㳎 -X -java:S1126"AReplace this if-then-else statement by a single return statement.( -? -java:S1125"(Remove the literal "true" boolean value.( \ No newline at end of file +3 +java:S2386A"Make this member "protected".( \ No newline at end of file diff --git a/src/.idea/sonarlint/issuestore/d/d/dd970bd8ce083850fca1d4d159647ccd110e57cb b/src/.idea/sonarlint/issuestore/d/d/dd970bd8ce083850fca1d4d159647ccd110e57cb index 2e1ed0a..9044ac6 100644 --- a/src/.idea/sonarlint/issuestore/d/d/dd970bd8ce083850fca1d4d159647ccd110e57cb +++ b/src/.idea/sonarlint/issuestore/d/d/dd970bd8ce083850fca1d4d159647ccd110e57cb @@ -1,13 +1,13 @@ +\ +java:S2147"ECombine this catch with the one at line 242, which has the same body.(暩 U java:S1155">Use isEmpty() to check whether the collection is empty or not.( \ java:S1126}"AReplace this if-then-else statement by a single return statement.(Ʒ -i -java:S3776"RRefactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed.( u java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(л -\ -java:S2147"ECombine this catch with the one at line 242, which has the same body.(暩 +i +java:S3776"RRefactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed.( j java:S1192?"ODefine a constant instead of duplicating this literal "Wrong note id:" 3 times.( \ No newline at end of file diff --git a/src/.idea/sonarlint/issuestore/index.pb b/src/.idea/sonarlint/issuestore/index.pb index ed2d401..f7ca4c2 100644 --- a/src/.idea/sonarlint/issuestore/index.pb +++ b/src/.idea/sonarlint/issuestore/index.pb @@ -10,4 +10,20 @@ b k ;app/src/main/java/net/micode/notes/ui/NoteEditActivity.java,5\7\577f30d26378ec8a2bd2e4a43f3c79b3f04c402c i -9app/src/main/java/net/micode/notes/model/WorkingNote.java,8\7\876016634c6642b35109680ccac740dc8271b236 \ No newline at end of file +9app/src/main/java/net/micode/notes/model/WorkingNote.java,8\7\876016634c6642b35109680ccac740dc8271b236 +l + - - - -%s - --%s - --%s - --%s - - - Messaging - Email - - #335b5b5b - 26sp - 20sp - 17sp - 14sp - 33sp - - %1$s result for \"%2$s\" - - %1$s results for \"%2$s\" - - Confirm to delete folder and its notes? - Confirm to delete this note? - Confirm to delete the selected %d notes? - Delete selected notes - Notes - Notes 2x2 - Notes 4x4 - Delete - Call notes - cancel - set - Delete reminder successfully - Sorry, can not set clock on empty note - Sorry, can not send and empty note to home - The note is not exist - Export failed, please check SD card - SD card busy, not available now - Sync is canceled - Sync failed, internal error occurs - Sync failed, please check network and account settings - Export fail - notes_%s.txt - /MIUI/notes/ - The folder %1$s exist, please rename - yyyyMMdd - MMMd kk:mm - Export text file (%1$s) to SD (%2$s) directory - (%d) - Have moved selected %1$d notes to %2$s folder - Input name - Note added to home - Remind me - New Folder - Delete - Deselect all - Export text - Change folder name - Delete folder - View folder - Large - Medium - Font size - Small - Super - Enter check list - Move to folder - Parent folder - Leave check list - Delete reminder - Search - Select all - Nothing selected, the operation is invalid - %d selected - Send to home - Settings - Share - Sync - Cancel syncing - Select folder - Expired - Send email - Open map - Call - Browse web - Take a look - Got it - Add note - ... - Sync notes with google task - Sync account - Add account - New note background color random - Cancel syncing - Sync immediately - Current account %1$s - All sync related information will be deleted, which may result in duplicated items sometime - Please select a google account. Local notes will be synced with google task. - Sync notes - Last sync time %1$s - yyyy-MM-dd hh:mm:ss - Cancel - Change sync account - Remove sync account - Settings - Cannot change the account because sync is in progress - %1$s has been set as the sync account - Notes - Search notes - Searching Notes - Text in your notes - Set reminder - Export successful - Sync is successful with account %1$s - Getting remote note list... - Logging into %1$s... - Synchronize local notes with Google Task... - Sync is canceled - Sync is failed - Sync is successful - Syncing notes... - No associated note found, click to create associated note. - Privacy mode,can not see note content - - - - - - - - - - - - \ No newline at end of file diff --git a/src/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt b/src/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt index f3ac70f..55aab2c 100644 --- a/src/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt +++ b/src/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt @@ -1,4 +1,4 @@ -#Wed Oct 07 17:46:36 CST 2020 +#Mon Oct 12 09:26:16 CST 2020 base.0=F\:\\Git\\work_room\\p3p7sqtgz\\src\\app\\build\\intermediates\\dex\\debug\\mergeDexDebug\\classes.dex path.0=classes.dex renamed.0=classes.dex diff --git a/src/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources b/src/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources index d61cbd9..3f61bfb 100644 Binary files a/src/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources and b/src/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$1.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$1.class index 992070e..0b3a3d4 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$1.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$1.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$2.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$2.class index 4e33bec..25b89b1 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$2.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$2.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$3.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$3.class index aa2544f..41671ab 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$3.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$3.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$4.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$4.class index a4b68e2..d828034 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$4.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$4.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$5.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$5.class index 5ed7a6a..b66b35b 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$5.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$5.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$6.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$6.class index 2e66958..04f4c75 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$6.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$6.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$7.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$7.class index b9749ee..9b60113 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$7.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$7.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$8.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$8.class index 0896b38..711bdf3 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$8.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$8.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$9.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$9.class index 6ad012e..19f9291 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$9.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$9.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.class index f9fc9c3..0ee08d9 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$1.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$1.class index 3059e5c..0d3d774 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$1.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$1.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$2.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$2.class index 3720c5f..b5e62c5 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$2.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback$2.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback.class index e55a8fa..14beb26 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$ModeCallback.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.class index 0782450..f0a7397 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.class index ae511d4..0d942f3 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity.class index cea179c..c7fe353 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity.class differ diff --git a/src/app/build/intermediates/processed_res/debug/out/resources-debug.ap_ b/src/app/build/intermediates/processed_res/debug/out/resources-debug.ap_ index 392e3b7..bd3df6b 100644 Binary files a/src/app/build/intermediates/processed_res/debug/out/resources-debug.ap_ and b/src/app/build/intermediates/processed_res/debug/out/resources-debug.ap_ differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$1.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$1.dex index 3caaef6..285163c 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$1.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$1.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$2.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$2.dex index 30d0812..eb89034 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$2.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$2.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$3.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$3.dex index a7257ce..c6d7798 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$3.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$3.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$4.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$4.dex index ff8cfaa..651d87c 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$4.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$4.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$5.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$5.dex index b82ae49..a8689dc 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$5.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$5.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$6.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$6.dex index baa2d83..5aacb8c 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$6.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$6.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$7.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$7.dex index 5175577..0ef77aa 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$7.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$7.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$8.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$8.dex index 0a5cbd1..00ffe5d 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$8.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$8.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$9.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$9.dex index 510e65a..a734dba 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$9.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$9.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.dex index 308f7b8..6ee0d76 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$BackgroundQueryHandler.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$1.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$1.dex index cb6ede2..ba4bfef 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$1.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$1.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$2.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$2.dex index 09d28db..e58de66 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$2.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback$2.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback.dex index c2c4cff..b8d6417 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$ModeCallback.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.dex index 7ba038d..505b47f 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$NewNoteOnTouchListener.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.dex index 09e018a..52fdb63 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity$OnListItemClickListener.dex differ diff --git a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity.dex b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity.dex index de11677..fa6731f 100644 Binary files a/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity.dex and b/src/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity.dex differ diff --git a/src/app/build/intermediates/res/merged/debug/layout_note_list.xml.flat b/src/app/build/intermediates/res/merged/debug/layout_note_list.xml.flat index e2e038f..92a508d 100644 Binary files a/src/app/build/intermediates/res/merged/debug/layout_note_list.xml.flat and b/src/app/build/intermediates/res/merged/debug/layout_note_list.xml.flat differ diff --git a/src/app/build/outputs/apk/debug/app-debug.apk b/src/app/build/outputs/apk/debug/app-debug.apk index 6704fca..ece8af9 100644 Binary files a/src/app/build/outputs/apk/debug/app-debug.apk and b/src/app/build/outputs/apk/debug/app-debug.apk differ diff --git a/src/app/src/main/java/net/micode/notes/ui/NotesListActivity.java b/src/app/src/main/java/net/micode/notes/ui/NotesListActivity.java index cd00ee8..a86ce75 100644 --- a/src/app/src/main/java/net/micode/notes/ui/NotesListActivity.java +++ b/src/app/src/main/java/net/micode/notes/ui/NotesListActivity.java @@ -142,12 +142,12 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt protected void onCreate(Bundle savedInstanceState) {//只在开机的时候有用 super.onCreate(savedInstanceState);//调用父类的创建,以保存的状态为参数 setContentView(R.layout.note_list);//设置视图 - initResources(); + initResources();//初始化内容 /** * Insert an introduction when user firstly use this application */ - setAppInfoFromRawRes(); + setAppInfoFromRawRes();//从Res文件下的资源,加载便签 } @Override @@ -155,35 +155,37 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt if (resultCode == RESULT_OK && (requestCode == REQUEST_CODE_OPEN_NODE || requestCode == REQUEST_CODE_NEW_NODE)) { mNotesListAdapter.changeCursor(null);//从编辑界面返回应该把光标删除 - //RESULT_OK是另外一个活动返回的数据 + //RESULT_OK是另外一个活动返回的数据,保存便签时会出现,删除与桌面挂件有关联的便签或文件夹会出现 } else { super.onActivityResult(requestCode, resultCode, data); } } - +//try语句允许我们定义在执行时进行错误测试的代码块。 +//catch 语句允许我们定义当 try 代码块发生错误时,所执行的代码块。 +//finally 语句在 try 和 catch 之后无论有无异常都会执行。 private void setAppInfoFromRawRes() { //作用:从res中的raw文件夹中导入资源,具体来说,载入一开始的便签的内容 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this); if (!sp.getBoolean(PREFERENCE_ADD_INTRODUCTION, false)) { //getBoolean :判断if 不存在第一个参数,返回false的值。这里如果是第一次进入小米便签,则执行下面的语句 - StringBuilder sb = new StringBuilder(); + StringBuilder sb = new StringBuilder();//代表一个字符序列可变的字符串,线程不安全,但性能较高 InputStream in = null; try { in = getResources().openRawResource(R.raw.introduction);//加载Welcome to use MIUI notes! if (in != null) { - InputStreamReader isr = new InputStreamReader(in); - BufferedReader br = new BufferedReader(isr); + InputStreamReader isr = new InputStreamReader(in);//使用指定的字符集读取字节并将它们解码为字符 + BufferedReader br = new BufferedReader(isr);//缓冲区流读入 char [] buf = new char[1024]; int len = 0; - while ((len = br.read(buf)) > 0) { - sb.append(buf, 0, len); + while ((len = br.read(buf)) > 0) {//read读取一个字符,若读取到末尾则返回-1,这里是加载到buf中 + sb.append(buf, 0, len);//从buf0开始的len长度的字符串加载到sb后 } } else { Log.e(TAG, "Read introduction file error"); return; } - } catch (IOException e) { - e.printStackTrace(); + } catch (IOException e) {//把捕获的异常交给e + e.printStackTrace();//在命令行打印异常信息在程序中出错的位置及原因 return; } finally { if(in != null) { @@ -191,16 +193,16 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt in.close(); } catch (IOException e) { // TODO Auto-generated catch block - e.printStackTrace(); + e.printStackTrace();//同上,异常处理 } } } WorkingNote note = WorkingNote.createEmptyNote(this, Notes.ID_ROOT_FOLDER, AppWidgetManager.INVALID_APPWIDGET_ID, Notes.TYPE_WIDGET_INVALIDE, - ResourceParser.RED); - note.setWorkingText(sb.toString()); - if (note.saveNote()) { + ResourceParser.RED);//在根目录下创建背景颜色是红的便签(初始设置未关联桌面挂件) + note.setWorkingText(sb.toString());//设置文本数据 + if (note.saveNote()) {//如果保存成功就将PREFERENCE_ADD_INTRODUCTION的对应的值设置为true,对应开头的判断 sp.edit().putBoolean(PREFERENCE_ADD_INTRODUCTION, true).commit(); } else { Log.e(TAG, "Save introduction note error"); @@ -211,36 +213,37 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt @Override protected void onStart() {//从其他界面到主界面就会调用,在onActivityResult之后调用 - super.onStart(); - startAsyncNotesListQuery(); + super.onStart();//调用父类,启动活动 + startAsyncNotesListQuery();//同步便签列表 } - +//Ontouch 可以获得更多的信息,比如多点,触摸的强度,按下,松开,拖动等。。。。 +//但Onclick 只适用于组件的事件触发 private void initResources() { mContentResolver = this.getContentResolver();//获取应用数据 - mBackgroundQueryHandler = new BackgroundQueryHandler(this.getContentResolver()); - mCurrentFolderId = Notes.ID_ROOT_FOLDER; - mNotesListView = (ListView) findViewById(R.id.notes_list);//findViewById是引用R文件里的引用名 + mBackgroundQueryHandler = new BackgroundQueryHandler(this.getContentResolver());//? + mCurrentFolderId = Notes.ID_ROOT_FOLDER;//当前文件夹ID是根目录ID + mNotesListView = (ListView) findViewById(R.id.notes_list);//findViewById是引用R文件里的引用名,这里是设置主活动的视图 mNotesListView.addFooterView(LayoutInflater.from(this).inflate(R.layout.note_list_footer, null), - null, false);//增加页脚 - mNotesListView.setOnItemClickListener(new OnListItemClickListener());//设置点击触发器 - mNotesListView.setOnItemLongClickListener(this);//设置长按触发器 + null, false);//增加页脚 ? + mNotesListView.setOnItemClickListener(new OnListItemClickListener());//设置视图点击监听器 + mNotesListView.setOnItemLongClickListener(this);//设置长按监听器 mNotesListAdapter = new NotesListAdapter(this); mNotesListView.setAdapter(mNotesListAdapter); - mAddNewNote = (Button) findViewById(R.id.btn_new_note);//获得按键 - mAddNewNote.setOnClickListener(this); - mAddNewNote.setOnTouchListener(new NewNoteOnTouchListener()); + mAddNewNote = (Button) findViewById(R.id.btn_new_note);//获得最下方的创建便签的按键 + mAddNewNote.setOnClickListener(this);//只对应下方的按键的点击监听器 + mAddNewNote.setOnTouchListener(new NewNoteOnTouchListener());//获得更多的信息的监听器包括down-touch/up-touch/no-drag等 mDispatch = false; mDispatchY = 0; mOriginY = 0; - mTitleBar = (TextView) findViewById(R.id.tv_title_bar); - mState = ListEditState.NOTE_LIST; - mModeCallBack = new ModeCallback(); + mTitleBar = (TextView) findViewById(R.id.tv_title_bar);//文件夹下的标头 + mState = ListEditState.NOTE_LIST;//设置状态为主界面 + mModeCallBack = new ModeCallback();//对便签的方法调用,删除和移动 } - private class ModeCallback implements ListView.MultiChoiceModeListener, OnMenuItemClickListener { - private DropdownMenu mDropDownMenu;//下拉菜单 - private ActionMode mActionMode; - private MenuItem mMoveMenu; + private class ModeCallback implements ListView.MultiChoiceModeListener, OnMenuItemClickListener {//对便签的方法调用,删除和移动,继承多选监听器(用于批量处理便签)和菜单点击监听器 + private DropdownMenu mDropDownMenu;//下拉的菜单 + private ActionMode mActionMode;//表面目前进行的是删除还是移动 + private MenuItem mMoveMenu;//移动的选项的实例 public boolean onCreateActionMode(ActionMode mode, Menu menu) { getMenuInflater().inflate(R.menu.note_list_options, menu);//R是个文件,所有东西都在里面注册了 只有两种行为模式删除和移动到文件夹 @@ -926,7 +929,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt } - private void startQueryDestinationFolders() {//按下移动便签后,开始查找所以的文件夹 + private void startQueryDestinationFolders() {//按下移动便签后,开始查找所有的文件夹 String selection = NoteColumns.TYPE + "=? AND " + NoteColumns.PARENT_ID + "<>? AND " + NoteColumns.ID + "<>?"; selection = (mState == ListEditState.NOTE_LIST) ? selection: "(" + selection + ") OR (" + NoteColumns.ID + "=" + Notes.ID_ROOT_FOLDER + ")"; diff --git a/src/app/src/main/res/layout/note_edit.xml b/src/app/src/main/res/layout/note_edit.xml index 10b2aa7..de146f4 100644 --- a/src/app/src/main/res/layout/note_edit.xml +++ b/src/app/src/main/res/layout/note_edit.xml @@ -35,9 +35,9 @@ android:id="@+id/tv_modified_date" android:layout_width="0dip" android:layout_height="wrap_content" - android:layout_weight="1" android:layout_gravity="left|center_vertical" android:layout_marginRight="8dip" + android:layout_weight="1" android:textAppearance="@style/TextAppearanceSecondaryItem" /> + android:textAppearance="@style/TextAppearancePrimaryItem" /> + android:textSize="@dimen/text_font_size_medium" + android:visibility="gone" />