diff --git a/src/.gradle/6.1.1/executionHistory/executionHistory.bin b/src/.gradle/6.1.1/executionHistory/executionHistory.bin
index aac7b30..cd1b847 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 054f48f..96f5b7a 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 0565492..932a194 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 67e909e..0c56892 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 de9ffda..2682de7 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 fe384b5..44cdc2f 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 c8f8c55..954d87a 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 ad9a833..6cf6e79 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 9b45c55..c8ba17f 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 2694c5f..d3db3f0 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 8abcaaf..9704885 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 8e73179..833f755 100644
Binary files a/src/.gradle/checksums/checksums.lock and b/src/.gradle/checksums/checksums.lock differ
diff --git a/src/.idea/caches/build_file_checksums.ser b/src/.idea/caches/build_file_checksums.ser
index 681bc78..ecbea9e 100644
Binary files a/src/.idea/caches/build_file_checksums.ser and b/src/.idea/caches/build_file_checksums.ser differ
diff --git a/src/.idea/codeStyles/Project.xml b/src/.idea/codeStyles/Project.xml
index 681f41a..fb22c1d 100644
--- a/src/.idea/codeStyles/Project.xml
+++ b/src/.idea/codeStyles/Project.xml
@@ -1,5 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/.idea/dbnavigator.xml b/src/.idea/dbnavigator.xml
new file mode 100644
index 0000000..f486b6e
--- /dev/null
+++ b/src/.idea/dbnavigator.xml
@@ -0,0 +1,557 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select * from note
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/inspectionProfiles/Project_Default.xml b/src/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..4b4cb0e
--- /dev/null
+++ b/src/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_annotation_annotation_1_0_0_jar.xml b/src/.idea/libraries/Gradle__androidx_annotation_annotation_1_0_0_jar.xml
new file mode 100644
index 0000000..3740751
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_annotation_annotation_1_0_0_jar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_0_alpha1_aar.xml b/src/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_0_alpha1_aar.xml
new file mode 100644
index 0000000..6b923da
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_0_alpha1_aar.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0_jar.xml b/src/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0_jar.xml
new file mode 100644
index 0000000..83e1a45
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml
new file mode 100644
index 0000000..83cc4f3
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml
new file mode 100644
index 0000000..8dd9004
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_collection_collection_1_0_0_jar.xml b/src/.idea/libraries/Gradle__androidx_collection_collection_1_0_0_jar.xml
new file mode 100644
index 0000000..2fee65b
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_collection_collection_1_0_0_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml
new file mode 100644
index 0000000..5bde25b
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_core_core_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_core_core_1_0_0_aar.xml
new file mode 100644
index 0000000..d8f16c4
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_core_core_1_0_0_aar.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml
new file mode 100644
index 0000000..eeaec0b
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml
new file mode 100644
index 0000000..b7dbd9d
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml
new file mode 100644
index 0000000..49a0893
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml
new file mode 100644
index 0000000..2471d0d
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_fragment_fragment_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_fragment_fragment_1_0_0_aar.xml
new file mode 100644
index 0000000..837e625
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_fragment_fragment_1_0_0_aar.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml
new file mode 100644
index 0000000..4a9e8e9
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml
new file mode 100644
index 0000000..15a7751
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml
new file mode 100644
index 0000000..a66207d
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_legacy_legacy_support_v4_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_legacy_legacy_support_v4_1_0_0_aar.xml
new file mode 100644
index 0000000..b15112a
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_legacy_legacy_support_v4_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_0_0_jar.xml b/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_0_0_jar.xml
new file mode 100644
index 0000000..f2e418b
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_0_0_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml
new file mode 100644
index 0000000..be7e91d
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml
new file mode 100644
index 0000000..be180f7
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml
new file mode 100644
index 0000000..ead32f1
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml
new file mode 100644
index 0000000..6cf33f2
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml
new file mode 100644
index 0000000..1c80d99
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml
new file mode 100644
index 0000000..2e15514
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_media_media_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_media_media_1_0_0_aar.xml
new file mode 100644
index 0000000..75da92b
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_media_media_1_0_0_aar.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml
new file mode 100644
index 0000000..f945d5c
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml
new file mode 100644
index 0000000..33bc746
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml
new file mode 100644
index 0000000..d2567c0
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_0_0_alpha1_aar.xml b/src/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_0_0_alpha1_aar.xml
new file mode 100644
index 0000000..5c3bdb4
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_0_0_alpha1_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_alpha1_aar.xml b/src/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_alpha1_aar.xml
new file mode 100644
index 0000000..bc03986
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_alpha1_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_0_0_aar.xml
new file mode 100644
index 0000000..84dc36a
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml b/src/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml
new file mode 100644
index 0000000..cad957f
--- /dev/null
+++ b/src/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/libraries/Gradle__org_apache_http_legacy_android_28.xml b/src/.idea/libraries/Gradle__org_apache_http_legacy_android_28.xml
new file mode 100644
index 0000000..85203f1
--- /dev/null
+++ b/src/.idea/libraries/Gradle__org_apache_http_legacy_android_28.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/modules/app/app.iml b/src/.idea/modules/app/app.iml
index 474fbc6..9c00957 100644
--- a/src/.idea/modules/app/app.iml
+++ b/src/.idea/modules/app/app.iml
@@ -25,4 +25,8 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/.idea/sonarIssues.xml b/src/.idea/sonarIssues.xml
index 452a5b3..c3805cd 100644
--- a/src/.idea/sonarIssues.xml
+++ b/src/.idea/sonarIssues.xml
@@ -8,16 +8,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -53,6 +78,11 @@
+
+
+
+
+
@@ -73,11 +103,21 @@
+
+
+
+
+
+
+
+
+
+
@@ -93,11 +133,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -133,11 +213,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -153,6 +283,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/.idea/sonarlint/issuestore/0/2/023468cfdd0b71d4098903b9070e364658e2fbcf b/src/.idea/sonarlint/issuestore/0/2/023468cfdd0b71d4098903b9070e364658e2fbcf
new file mode 100644
index 0000000..c2f7ba4
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/0/2/023468cfdd0b71d4098903b9070e364658e2fbcf
@@ -0,0 +1,19 @@
+
+^
+java:S1854I"ARemove this useless assignment to local variable "pendingIntent".(8.
+X java:S125P"").(8.
+K
+java:S1125"(Remove the literal "true" boolean value.(8.
+I
+java:S1168"+Return an empty collection instead of null.(8.
+r java:S117/"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(8ݙ.
+r java:S117*"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(8ݙ.
+m java:S117)"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ķ8ݙ.
+J
+java:S1125"(Remove the literal "true" boolean value.(ɯ8.
+J
+java:S1125o"(Remove the literal "true" boolean value.(ɯ8.
+v
+java:S2293}"YReplace the type specification in this constructor call with the diamond operator ("<>").(Ȫ8.
+
+java:S1319l"mThe return type of this method should be an interface such as "Set" rather than the implementation "HashSet".(ٓ
+Q
+java:S2864n"4Iterate over the "entrySet" instead of the "keySet".(8.
+{
+java:S2293@"YReplace the type specification in this constructor call with the diamond operator ("<>").(Қ·8.
+E
+java:S5411o"*Use the primitive boolean expression here.(ɯ
+
+java:S1319|"mThe return type of this method should be an interface such as "Set" rather than the implementation "HashSet".(҃
+>
+java:S1116<"Remove this empty statement.(8.
+l
+java:S11923"ODefine a constant instead of duplicating this literal "Invalid cursor" 3 times.(8ݙ.
+J
+java:S1066e"/Merge this if statement with the enclosing one.(
+Q
+java:S2864~"4Iterate over the "entrySet" instead of the "keySet".(8.
+F
+java:S5411"*Use the primitive boolean expression here.(
+j
+java:S1104:"TMake widgetId a static final constant or non-public and provide accessors if needed.(ǎ
+R
+java:S1874?"5Remove this use of "CursorAdapter"; it is deprecated.(8.
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/2/b/2b687ab930681e3885683578d43df600a0a20982 b/src/.idea/sonarlint/issuestore/2/b/2b687ab930681e3885683578d43df600a0a20982
new file mode 100644
index 0000000..7dba34d
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/2/b/2b687ab930681e3885683578d43df600a0a20982
@@ -0,0 +1,2 @@
+
+b java:S101"MRename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'.(
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/2/b/2bfc771e07e87c37d3a76a2c815bc8fb30649798 b/src/.idea/sonarlint/issuestore/2/b/2bfc771e07e87c37d3a76a2c815bc8fb30649798
new file mode 100644
index 0000000..f55555d
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/2/b/2bfc771e07e87c37d3a76a2c815bc8fb30649798
@@ -0,0 +1,12 @@
+
+o
+java:S1128"TRemove this unnecessary import: same package classes are always implicitly imported.(
+Q
+java:S1874P"5Remove this use of "FORMAT_12HOUR"; it is deprecated.(ח$8.
+L
+java:S1874="1Remove this use of "setButton"; it is deprecated.(
+H
+java:S1874>"2Remove this use of "setButton2"; it is deprecated.(
+h java:S100("NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(
+J
+java:S1874P"5Remove this use of "FORMAT_24HOUR"; it is deprecated.(ח$
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/3/2/32360bf24febc78f20db52498c7576b3d8650d56 b/src/.idea/sonarlint/issuestore/3/2/32360bf24febc78f20db52498c7576b3d8650d56
new file mode 100644
index 0000000..88bc48c
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/3/2/32360bf24febc78f20db52498c7576b3d8650d56
@@ -0,0 +1,35 @@
+
+T
+java:S1155-">Use isEmpty() to check whether the collection is empty or not.(
+
+java:S1319S"kThe type of the "ids" object should be an interface such as "Set" rather than the implementation "HashSet".(
+Z
+java:S2147E"DCombine this catch with the one at line 67, which has the same body.(暩
+b
+java:S1192D"GDefine a constant instead of duplicating this literal "%s: %s" 4 times.(
+[
+java:S2147l"ECombine this catch with the one at line 106, which has the same body.(暩
+U
+java:S1118&":Add a private constructor to hide the implicit public one.(
+m
+java:S3252"QUse static access with "net.micode.notes.data.Notes$DataColumns" for "MIME_TYPE".(
+m
+java:S3252"QUse static access with "net.micode.notes.data.Notes$DataColumns" for "MIME_TYPE".(
+u
+java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(ª
+J
+java:S1066~"/Merge this if statement with the enclosing one.(䲜
+t
+java:S22932"YReplace the type specification in this constructor call with the diamond operator ("<>").(л
+
+java:S1319"mThe return type of this method should be an interface such as "Set" rather than the implementation "HashSet".(
+
+java:S1319("kThe type of the "ids" object should be an interface such as "Set" rather than the implementation "HashSet".(
+t
+java:S2293Z"YReplace the type specification in this constructor call with the diamond operator ("<>").(л
+k
+java:S3252"OUse static access with "net.micode.notes.data.Notes$DataColumns" for "NOTE_ID".(
+f
+java:S3252"OUse static access with "net.micode.notes.data.Notes$DataColumns" for "NOTE_ID".(ʹ
+c
+java:S1192x"HDefine a constant instead of duplicating this literal "=? AND " 4 times.(
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/3/a/3aac5305cb73bfbdeb8078cd264d04323fa80e92 b/src/.idea/sonarlint/issuestore/3/a/3aac5305cb73bfbdeb8078cd264d04323fa80e92
new file mode 100644
index 0000000..e69de29
diff --git a/src/.idea/sonarlint/issuestore/3/e/3e688be40dc69cfd1062f41d0fc27fe261a26710 b/src/.idea/sonarlint/issuestore/3/e/3e688be40dc69cfd1062f41d0fc27fe261a26710
new file mode 100644
index 0000000..09b34df
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/3/e/3e688be40dc69cfd1062f41d0fc27fe261a26710
@@ -0,0 +1,26 @@
+
+X java:S125L"").(各8.
+Y java:S125"").(
M
-java:S1135c"2Complete the task associated to this TODO comment.(
\ No newline at end of file
+java:S1135c"2Complete the task associated to this TODO comment.(
+K
+java:S2864"4Iterate over the "entrySet" instead of the "keySet".(̯
+^
+java:S1126"BReplace this if-then-else statement by a single method invocation.(忥
\ 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 375c021..fe58e16 100644
--- a/src/.idea/sonarlint/issuestore/5/7/577f30d26378ec8a2bd2e4a43f3c79b3f04c402c
+++ b/src/.idea/sonarlint/issuestore/5/7/577f30d26378ec8a2bd2e4a43f3c79b3f04c402c
@@ -1,35 +1,88 @@
-t
-java:S2293W"YReplace the type specification in this constructor call with the diamond operator ("<>").(ӏ
-K
-java:S2864"4Iterate over the "entrySet" instead of the "keySet".(ԇ
-n
-java:S3776"RRefactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed.(ݨ
-8
-java:S1116"Remove this empty statement.(
-q
-java:S1104N"VMake tvModified 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.(
-t
-java:S2293i"YReplace the type specification in this constructor call with the diamond operator ("<>").(
k
-java:S3252"MUse static access with "android.text.Spanned" for "SPAN_INCLUSIVE_EXCLUSIVE".(8.
-o
-java:S2293q"YReplace the type specification in this constructor call with the diamond operator ("<>").(
-8
-java:S1116"Remove this empty statement.(
-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:S2293`"YReplace the type specification in this constructor call with the diamond operator ("<>").(
-w
-java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(艥8.
-X
-java:S1126"AReplace this if-then-else statement by a single return statement.(
-r
-java:S1104P"WMake ivAlertIcon a static final constant or non-public and provide accessors if needed.(න
+java:S3252"MUse static access with "android.text.Spanned" for "SPAN_INCLUSIVE_EXCLUSIVE".(8.
+x
+java:S1104n"VMake tvModified a static final constant or non-public and provide accessors if needed.(ԣ8.
N
-java:S1135"2Complete the task associated to this TODO comment.(
\ No newline at end of file
+java:S1874"0Remove this use of "getColor"; it is deprecated.(8.
+^ java:S125"").(8.
+\
+java:S1874"9Remove this use of "setTextAppearance"; it is deprecated.(8.
+?
+java:S1116"Remove this empty statement.(8.
+Y
+java:S1874";Remove this use of "EXTRA_SHORTCUT_NAME"; it is deprecated.(8.
+_
+java:S1126"AReplace this if-then-else statement by a single return statement.(8.
+w
+java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(艥8.
+d java:S899 "BDo something with the "boolean" value returned by "createNewFile".(8.
+V
+java:S1874"9Remove this use of "setTextAppearance"; it is deprecated.((8.
+|
+java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(8.
+M
+java:S2093
+"*Change this "try" to a try-with-resources.(ߝ8.
+U
+java:S1135"2Complete the task associated to this TODO comment.(8.
+k
+java:S3252"MUse static access with "android.provider.MediaStore$MediaColumns" for "DATA".(8.
+p
+java:S3252"MUse static access with "android.provider.MediaStore$MediaColumns" for "DATA".(ԡ8.
+n java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(8.
+U
+java:S1135"2Complete the task associated to this TODO comment.(8.
+[
+java:S1874"=Remove this use of "EXTRA_SHORTCUT_INTENT"; it is deprecated.(ð8.
+u
+java:S1450"WRemove the "mPattern" field and declare it as a local variable in the relevant methods.(8.
+n java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ǜ8.
+
+java:S1149"_Replace the synchronized class "StringBuffer" by an unsynchronized one such as "StringBuilder".(᯲8.
+\
+java:S4973 "9Use the "equals" method if value comparison was intended.(8.
+b
+java:S1874"DRemove this use of "EXTRA_SHORTCUT_ICON_RESOURCE"; it is deprecated.(Ǿ8.
+{
+java:S2293w"YReplace the type specification in this constructor call with the diamond operator ("<>").(ӏ8.
+_
+java:S2259
+"AA "NullPointerException" could be thrown; "fos" is nullable here.(ۓ8.
+u
+java:S3776"RRefactor this method to reduce its Cognitive Complexity from 27 to the 15 allowed.(ݨ8.
+|
+java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(8.
+U
+java:S1135"2Complete the task associated to this TODO comment.(8.
+p java:S100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(8.
+D
+java:S1075 "&Remove this hard-coded path-delimiter.(8.
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/5/8/58052a8597c5f01595e1c849728bcae66c27a1a6 b/src/.idea/sonarlint/issuestore/5/8/58052a8597c5f01595e1c849728bcae66c27a1a6
new file mode 100644
index 0000000..07745a6
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/5/8/58052a8597c5f01595e1c849728bcae66c27a1a6
@@ -0,0 +1,5 @@
+
+3
+java:S2386$"Make this member "protected".(
+h
+java:S3776H"RRefactor this method to reduce its Cognitive Complexity from 19 to the 15 allowed.(ʃ
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/5/8/5836a695995df8fadacfa6409fe8d21d88946842 b/src/.idea/sonarlint/issuestore/5/8/5836a695995df8fadacfa6409fe8d21d88946842
new file mode 100644
index 0000000..e69de29
diff --git a/src/.idea/sonarlint/issuestore/5/d/5dfe6902d8ec740690f88d644e74362c3be08fad b/src/.idea/sonarlint/issuestore/5/d/5dfe6902d8ec740690f88d644e74362c3be08fad
new file mode 100644
index 0000000..36732d8
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/5/d/5dfe6902d8ec740690f88d644e74362c3be08fad
@@ -0,0 +1,9 @@
+
+V
+java:S1874H"9Remove this use of "setTextAppearance"; it is deprecated.(8̠.
+V
+java:S1874X"9Remove this use of "setTextAppearance"; it is deprecated.(8̠.
+m
+java:S37765"RRefactor this method to reduce its Cognitive Complexity from 25 to the 15 allowed.(û
+V
+java:S1874A"9Remove this use of "setTextAppearance"; it is deprecated.(8̠.
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/5/f/5f6162ca79fcea353b280c5dc84973a9c37d2c74 b/src/.idea/sonarlint/issuestore/5/f/5f6162ca79fcea353b280c5dc84973a9c37d2c74
new file mode 100644
index 0000000..e69de29
diff --git a/src/.idea/sonarlint/issuestore/6/a/6a65e747031f27aef20597b4181148a9fbf963d5 b/src/.idea/sonarlint/issuestore/6/a/6a65e747031f27aef20597b4181148a9fbf963d5
new file mode 100644
index 0000000..5eb21fb
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/6/a/6a65e747031f27aef20597b4181148a9fbf963d5
@@ -0,0 +1,15 @@
+
+M
+java:S1153"1Directly append the argument of String.valueOf().(ߦ
+N
+java:S1135"2Complete the task associated to this TODO comment.(
+
+java:S3008L"eRename this field "NOTES_SNIPPET_SEARCH_QUERY" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(
+D
+java:S1659"(Declare "insertedId" on a separate line.(ؘ
+T
+java:S2130"8Use "Long.parseLong" for this string-to-long conversion.(
+i
+java:S1192"MDefine a constant instead of duplicating this literal "Unknown URI " 4 times.(
+@
+java:S1659"$Declare "noteId" on a separate line.(ؘ
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/6/c/6cbf8bd9aa98eff862b1dc067330ba66ba4493aa b/src/.idea/sonarlint/issuestore/6/c/6cbf8bd9aa98eff862b1dc067330ba66ba4493aa
new file mode 100644
index 0000000..f0ad061
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/6/c/6cbf8bd9aa98eff862b1dc067330ba66ba4493aa
@@ -0,0 +1,3 @@
+
+V
+java:S3398"?Move this method into the anonymous class declared at line 118.(
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/7/e/7e95080e97eb945562bad95d376a9dbe3224954d b/src/.idea/sonarlint/issuestore/7/e/7e95080e97eb945562bad95d376a9dbe3224954d
new file mode 100644
index 0000000..c37d38b
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/7/e/7e95080e97eb945562bad95d376a9dbe3224954d
@@ -0,0 +1,28 @@
+
+R java:S125"").(艥
+D
+java:S1199"-Extract this nested code block into a method.(
+8
+java:S1116"Remove this empty statement.(
+I
+java:S1199"-Extract this nested code block into a method.(ڿ
+A
+java:S3398"%Move this method into "ModeCallback".(
+I
+java:S1172"-Remove this unused method parameter "unused".(Ԃ
+=
+java:S1172"&Remove these unused method parameters.(
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/9/a/9a3a19793537958b8b1b03a81985999e22705a2f b/src/.idea/sonarlint/issuestore/9/a/9a3a19793537958b8b1b03a81985999e22705a2f
new file mode 100644
index 0000000..a9d43c6
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/9/a/9a3a19793537958b8b1b03a81985999e22705a2f
@@ -0,0 +1,11 @@
+
+P
+java:S1118":Add a private constructor to hide the implicit public one.(
+t
+java:S32524"^Use static access with "android.provider.ContactsContract$ContactsColumns" for "DISPLAY_NAME".(
+t
+java:S2293)"YReplace the type specification in this constructor call with the diamond operator ("<>").(
+r
+java:S3252""\Use static access with "android.provider.ContactsContract$DataColumns" for "RAW_CONTACT_ID".(
+x
+java:S3252!"VUse static access with "android.provider.ContactsContract$DataColumns" for "MIMETYPE".(8Ɂ.
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/a/4/a446c87b1013132f8adaf83656b582028e8809af b/src/.idea/sonarlint/issuestore/a/4/a446c87b1013132f8adaf83656b582028e8809af
new file mode 100644
index 0000000..f15b3fb
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/a/4/a446c87b1013132f8adaf83656b582028e8809af
@@ -0,0 +1,26 @@
+
+i
+java:S3776"RRefactor this method to reduce its Cognitive Complexity from 27 to the 15 allowed.(
+L
+java:S1125")Remove the literal "false" boolean value.(Ө8.
+Y java:S125"").(
+c
+java:S2147"ECombine this catch with the one at line 151, which has the same body.(8.
+]
+java:S1192"FDefine a constant instead of duplicating this literal " DESC" 3 times.(Ա
+n
+java:S3776"RRefactor this method to reduce its Cognitive Complexity from 20 to the 15 allowed.(ƶؠ
+Y java:S125"").(
+Y java:S125"").(
+C
+java:S1905"-Remove this unnecessary cast to "JSONObject".(؛
+>
+java:S1905"'Remove this unnecessary cast to "Node".(
+t
+java:S2293_"YReplace the type specification in this constructor call with the diamond operator ("<>").(
+t
+java:S2293c"YReplace the type specification in this constructor call with the diamond operator ("<>").(
+K
+java:S1066"/Merge this if statement with the enclosing one.(
+n
+java:S3776"RRefactor this method to reduce its Cognitive Complexity from 34 to the 15 allowed.(ɸ
+i
+java:S3776"RRefactor this method to reduce its Cognitive Complexity from 29 to the 15 allowed.(þ
+t
+java:S2293^"YReplace the type specification in this constructor call with the diamond operator ("<>").(
+Y java:S125"Remove this use of "setDrawingCacheEnabled"; it is deprecated.(
+Y
+java:S1874B">Remove this use of "setDrawingCacheEnabled"; it is deprecated.(
+Q
+java:S1874I";Remove this use of "destroyDrawingCache"; it is deprecated.(
+U
+java:S1118":Add a private constructor to hide the implicit public one.(
+M
+java:S1874D"7Remove this use of "getDrawingCache"; it is deprecated.(
+Q
+java:S1874^";Remove this use of "destroyDrawingCache"; it is deprecated.(
+M
+java:S1874U"7Remove this use of "getDrawingCache"; it is deprecated.(
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/a/d/ad72331a1bed265bb9c0fe838faa74dbf69fce32 b/src/.idea/sonarlint/issuestore/a/d/ad72331a1bed265bb9c0fe838faa74dbf69fce32
new file mode 100644
index 0000000..48e3090
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/a/d/ad72331a1bed265bb9c0fe838faa74dbf69fce32
@@ -0,0 +1,102 @@
+
+e
+java:S1126 "BReplace this if-then-else statement by a single method invocation.(8.
+\
+java:S1124"EReorder the modifiers to comply with the Java Language Specification.(۞ƣ
+U
+java:S1135"2Complete the task associated to this TODO comment.(8.
+R
+java:S3398"/Move this method into "BackgroundQueryHandler".(8.
+_
+java:S2184"ACast one of the operands of this division operation to a "float".(8.
+u
+java:S3776"RRefactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed.(8.
+P
+java:S1199"-Extract this nested code block into a method.(ٵÖ8.
+U
+java:S1135"2Complete the task associated to this TODO comment.(8.
+k java:S100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(8.
+p
+java:S3776"RRefactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed.(Թ8.
+n
+java:S1301"KReplace this "switch" statement by "if" statements to increase readability.(ד8.
+U
+java:S1135"2Complete the task associated to this TODO comment.(8.
+U
+java:S1135"2Complete the task associated to this TODO comment.(8.
+^
+java:S2259"@A "NullPointerException" could be thrown; "db" is nullable here.(8.
+O
+java:S1874"1Remove this use of "getHeight"; it is deprecated.(Á8.
+x java:S116"VRename this field "GestureMode" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(8.
+K
+java:S1199"-Extract this nested code block into a method.(8.
+H
+java:S3398"%Move this method into "ModeCallback".(핺8.
+P
+java:S1199"-Extract this nested code block into a method.(̀8.
+_
+java:S2184"ACast one of the operands of this division operation to a "float".(Ӳ8.
+U
+java:S1135"2Complete the task associated to this TODO comment.(8.
+9
+java:S3626"Remove this redundant jump.(݅8.
+^ java:S125"").(艥8.
+u
+java:S3252"RUse static access with "android.widget.AbsListView" for "MultiChoiceModeListener".(8.
+K
+java:S1199"-Extract this nested code block into a method.(8.
+U
+java:S1874"7Remove this use of "GestureDetector"; it is deprecated.(8.
+U
+java:S1135 "2Complete the task associated to this TODO comment.(8.
+o java:S101"MRename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'.(8.
+K
+java:S1199"-Extract this nested code block into a method.(8.
+i java:S101"MRename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'.(8.
+c
+java:S1124"EReorder the modifiers to comply with the Java Language Specification.(Ϋ8.
+P
+java:S1199"-Extract this nested code block into a method.(8.
+`
+java:S1126"BReplace this if-then-else statement by a single method invocation.(8.
+_
+java:S2184"ACast one of the operands of this division operation to a "float".(Ԋ8.
+x java:S116"[Rename this field "gestures_overlay" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(8ܬ.
+P
+java:S1199"-Extract this nested code block into a method.(ڿ8.
+K
+java:S1199"-Extract this nested code block into a method.(ȓ8.
+u
+java:S1450"XRemove the "mMoveMenu" field and declare it as a local variable in the relevant methods.(`8.
+P
+java:S1199"-Extract this nested code block into a method.(8.
+u
+java:S3776"RRefactor this method to reduce its Cognitive Complexity from 20 to the 15 allowed.(핺8.
+U
+java:S1135"2Complete the task associated to this TODO comment.(8.
+H
+java:S3398 "%Move this method into "ModeCallback".(LjԔ8.
+K
+java:S1199"-Extract this nested code block into a method.(ѵ8.
+U
+java:S1135 "2Complete the task associated to this TODO comment.(8.
+P
+java:S1199"-Extract this nested code block into a method.(8.
+F java:S108")Either remove or fill this block of code.(ʥ8.
+U
+java:S1135"2Complete the task associated to this TODO comment.(8.
+p java:S100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(8.
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/c/1/c182d0c9c237ea8a46a92ccaae9bb5c751923a88 b/src/.idea/sonarlint/issuestore/c/1/c182d0c9c237ea8a46a92ccaae9bb5c751923a88
new file mode 100644
index 0000000..c005de0
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/c/1/c182d0c9c237ea8a46a92ccaae9bb5c751923a88
@@ -0,0 +1,3 @@
+
+[
+java:S1124"EReorder the modifiers to comply with the Java Language Specification.(
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/c/4/c42ad3cd6e664963fa1849c760a57d417d500ee7 b/src/.idea/sonarlint/issuestore/c/4/c42ad3cd6e664963fa1849c760a57d417d500ee7
new file mode 100644
index 0000000..b3b0896
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/c/4/c42ad3cd6e664963fa1849c760a57d417d500ee7
@@ -0,0 +1,95 @@
+
+`
+java:S1124E"EReorder the modifiers to comply with the Java Language Specification.(
+P
+java:S1118":Add a private constructor to hide the implicit public one.(
+[
+java:S1124/"EReorder the modifiers to comply with the Java Language Specification.(Ӎ
+[
+java:S1124"EReorder the modifiers to comply with the Java Language Specification.(ρ
+[
+java:S11241"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124]"EReorder the modifiers to comply with the Java Language Specification.(Ȩ
+`
+java:S1124i"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124)"EReorder the modifiers to comply with the Java Language Specification.(۲
+Z
+java:S1124A"EReorder the modifiers to comply with the Java Language Specification.($
+`
+java:S1124="EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124C"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124I"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124a"EReorder the modifiers to comply with the Java Language Specification.(̀
+`
+java:S1124!"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124c"EReorder the modifiers to comply with the Java Language Specification.(â
+`
+java:S1124k"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124"EReorder the modifiers to comply with the Java Language Specification.(Ɖ
+[
+java:S1124Y"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124U"EReorder the modifiers to comply with the Java Language Specification.(ʹ
+[
+java:S1124M"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124["EReorder the modifiers to comply with the Java Language Specification.(Ō
+`
+java:S11249"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S11245"EReorder the modifiers to comply with the Java Language Specification.(Ƒ
+`
+java:S1124+"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124g"EReorder the modifiers to comply with the Java Language Specification.(ƒ
+`
+java:S1124'"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124Q"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124G"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124S"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124e"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124o"EReorder the modifiers to comply with the Java Language Specification.(
+Z
+java:S1124m"EReorder the modifiers to comply with the Java Language Specification.(-
+[
+java:S1124-"EReorder the modifiers to comply with the Java Language Specification.(
+Z
+java:S11247"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124O"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124#"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124"EReorder the modifiers to comply with the Java Language Specification.(㘱
+Z
+java:S1124;"EReorder the modifiers to comply with the Java Language Specification.(K
+[
+java:S1124?"EReorder the modifiers to comply with the Java Language Specification.(֫
+`
+java:S1124%"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S1124_"EReorder the modifiers to comply with the Java Language Specification.(
+[
+java:S11243"EReorder the modifiers to comply with the Java Language Specification.(̥
+`
+java:S1124K"EReorder the modifiers to comply with the Java Language Specification.(
+`
+java:S1124W"EReorder the modifiers to comply with the Java Language Specification.(ԣ
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/c/6/c65f5dc8218ef1da6f6bfb5d1b14aea855a54d7f b/src/.idea/sonarlint/issuestore/c/6/c65f5dc8218ef1da6f6bfb5d1b14aea855a54d7f
new file mode 100644
index 0000000..758f050
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/c/6/c65f5dc8218ef1da6f6bfb5d1b14aea855a54d7f
@@ -0,0 +1,32 @@
+
+`
+java:S1124j"EReorder the modifiers to comply with the Java Language Specification.(
+C
+java:S1905M"&Remove this unnecessary cast to "int".(8.
+U
+java:S1118Y":Add a private constructor to hide the implicit public one.(Ū
+a
+java:S1124"EReorder the modifiers to comply with the Java Language Specification.(
+X java:S125O"Remove this unused import 'net.micode.notes.tool.ScreenUtils'.(Ś8.
+Q
+java:S1161":Add the "@Override" annotation above this method signature(
+a
+java:S1128"?Remove this unused import 'android.gesture.GestureOverlayView'.(8.
+g
+java:S1301"KReplace this "switch" statement by "if" statements to increase readability.(崡
+D
+java:S1128*".Remove this unused import 'android.view.Menu'.(҅
+V
+java:S1128"4Remove this unused import 'android.gesture.Gesture'.(8.
+H
+java:S1128"2Remove this unused import 'android.app.ActionBar'.(
+M
+java:S11288"0Remove this unused import 'java.util.ArrayList'.(8.
+V java:S110="").(л
-\
-java:S1126}"AReplace this if-then-else statement by a single return statement.(Ʒ
j
java:S1192?"ODefine a constant instead of duplicating this literal "Wrong note id:" 3 times.(
+\
+java:S1126}"AReplace this if-then-else statement by a single return statement.(Ʒ
+U
+java:S1155">Use isEmpty() to check whether the collection is empty or not.(
i
java:S3776"RRefactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed.(
-U
-java:S1155">Use isEmpty() to check whether the collection is empty or not.(
\ No newline at end of file
+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.(暩
\ No newline at end of file
diff --git a/src/.idea/sonarlint/issuestore/e/0/e094aec5c3e1b6f44539adff3114f5a1ad603ddc b/src/.idea/sonarlint/issuestore/e/0/e094aec5c3e1b6f44539adff3114f5a1ad603ddc
new file mode 100644
index 0000000..3705f5e
--- /dev/null
+++ b/src/.idea/sonarlint/issuestore/e/0/e094aec5c3e1b6f44539adff3114f5a1ad603ddc
@@ -0,0 +1,11 @@
+
+Y java:S125"").(ʩ
+X java:S125~"").(
+u
+java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(
+u
+java:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(
+Y java:S125"
+ android:targetSdkVersion="28" />
@@ -35,9 +35,11 @@
+ android:label="@string/app_name"
+ android:testOnly="true" >
+
+
+
+
-
\ No newline at end of file
+ %1$s results for \"%2$s\"
+ switch to default gestrueset gestrue
+ 短信
+ 邮件
+ 设置为隐私便签显示目前便签数量撤销隐私便签输入隐私密码打开图库打开相机开始画图便签便签2x2便签4x4没有关联内容,点击新建便签。访客模式下,便签内容不可见...新建便签成功删除提醒创建提醒已过期yyyyMMddMM月dd日 kk:mm知道了查看呼叫电话发送邮件浏览网页打开地图新建文件夹导出文本同步取消同步设置搜索删除移动到文件夹选中了 %d 项没有选中项,操作无效全选取消全选文字大小小正常大超大进入清单模式退出清单模式查看文件夹刪除文件夹修改文件夹名称文件夹 %1$s 已存在,请重新命名分享发送到桌面提醒我删除提醒选择文件夹上一级文件夹已添加到桌面删除确认要删除所选的 %d 条便签吗?确认要删除该条便签吗?确认删除文件夹及所包含的便签吗?已将所选 %1$d 条便签移到 %2$s 文件夹SD卡被占用,不能操作导出文本时发生错误,请检查SD卡要查看的便签不存在不能为空便签设置闹钟提醒不能将空便签发送到桌面导出成功导出失败已将文本文件(%1$s)输出至SD卡(%2$s)目录同步便签...同步成功同步失败同步已取消与%1$s同步成功同步失败,请检查网络和帐号设置同步失败,发生内部错误同步已取消登录%1$s...正在获取服务器便签列表...正在同步本地便签...设置同步账号与google task同步便签记录上次同步于 %1$s添加账号更换账号删除账号取消立即同步取消同步当前帐号 %1$s如更换同步帐号,过去的帐号同步信息将被清空,再次切换的同时可能会造成数据重复同步便签请选择google帐号,便签将与该帐号的google task内容同步。正在同步中,不能修改同步帐号同步帐号已设置为%1$s新建便签背景颜色随机删除通话便签请输入名称正在搜索便签搜索便签便签中的文字便签设置取消
+ %1$s 条符合“%2$s”的搜索结果
+ 采用自定义手势采用默认手势
+ 短信
+ 郵件
+ 便簽便簽2x2便簽4x4沒有關聯內容,點擊新建便簽。訪客模式下,便籤內容不可見...新建便簽成功刪除提醒創建提醒已過期yyyyMMddMM月dd日 kk:mm知道了查看呼叫電話發送郵件浏覽網頁打開地圖已將所選 %1$d 便籤移到 %2$s 文件夾新建文件夾導出文本同步取消同步設置搜尋刪除移動到文件夾選中了 %d 項沒有選中項,操作無效全選取消全選文字大小小正常大超大進入清單模式退出清單模式查看文件夾刪除文件夾修改文件夾名稱文件夾 %1$s 已存在,請重新命名分享發送到桌面提醒我刪除提醒選擇文件夾上一級文件夾已添加到桌面刪除确认要刪除所選的 %d 條便籤嗎?确认要删除該條便籤嗎?確認刪除檔夾及所包含的便簽嗎?SD卡被佔用,不能操作導出TXT時發生錯誤,請檢查SD卡要查看的便籤不存在不能爲空便籤設置鬧鐘提醒不能將空便籤發送到桌面導出成功導出失敗已將文本文件(%1$s)導出至SD(%2$s)目錄同步便簽...同步成功同步失敗同步已取消與%1$s同步成功同步失敗,請檢查網絡和帳號設置同步失敗,發生內部錯誤同步已取消登陸%1$s...正在獲取服務器便籤列表...正在同步本地便籤...設置同步賬號与google task同步便簽記錄上次同步于 %1$s添加賬號更換賬號刪除賬號取消立即同步取消同步當前帳號 %1$s如更換同步帳號,過去的帳號同步信息將被清空,再次切換的同時可能會造成數據重復同步便簽請選擇google帳號,便簽將與該帳號的google task內容同步。正在同步中,不能修改同步帳號同步帳號已設置為%1$s新建便籤背景顏色隨機刪除通話便籤請輸入名稱正在搜索便籤搜索便籤便籤中的文字便籤設置取消
+ %1$s 條符合”%2$s“的搜尋結果
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 2f337fc..d93d606 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 @@
-#Fri Oct 30 09:36:17 CST 2020
+#Sun Nov 22 00:11:23 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 276cce5..840dcbd 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/incremental/packageDebug/tmp/debug/zip-cache/javaResources0 b/src/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/javaResources0
index 945a7c5..af5950f 100644
Binary files a/src/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/javaResources0 and b/src/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/javaResources0 differ
diff --git a/src/app/build/intermediates/instant_app_manifest/debug/AndroidManifest.xml b/src/app/build/intermediates/instant_app_manifest/debug/AndroidManifest.xml
index 29f0237..9c10789 100644
--- a/src/app/build/intermediates/instant_app_manifest/debug/AndroidManifest.xml
+++ b/src/app/build/intermediates/instant_app_manifest/debug/AndroidManifest.xml
@@ -22,7 +22,7 @@
+ android:targetSdkVersion="28" />
@@ -36,9 +36,11 @@
+ android:label="@string/app_name"
+ android:testOnly="true" >
+
+
+
+ F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml
-24 android:targetSdkVersion="22" />
+24 android:targetSdkVersion="28" />
24-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml
25
26
@@ -57,218 +57,243 @@
35-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:33:22-68
36
37 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:34:5-147:19
-38 android:debuggable="true"
-39 android:icon="@drawable/icon_app"
-39-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:35:9-42
-40 android:label="@string/app_name" >
-40-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:36:9-41
-41 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:37:9-49:20
-42 android:name="net.micode.notes.ui.NotesListActivity"
-42-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:38:13-49
-43 android:configChanges="keyboardHidden|orientation|screenSize"
-43-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:39:13-74
-44 android:label="@string/app_name"
-44-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:40:13-45
-45 android:launchMode="singleTop"
-45-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:41:13-43
-46 android:theme="@style/NoteTheme"
-46-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:42:13-45
-47 android:windowSoftInputMode="adjustPan" >
-47-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:43:13-52
-48
-49
-50
-50-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:45:13-48:29
-51
-51-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:46:17-69
-51-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:46:25-66
-52
-53
-53-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:47:17-77
-53-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:47:27-74
-54
-55
-56 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:51:9-79:20
-57 android:name="net.micode.notes.ui.NoteEditActivity"
-57-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:52:13-48
-58 android:configChanges="keyboardHidden|orientation|screenSize"
-58-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:53:13-74
-59 android:launchMode="singleTop"
-59-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:54:13-43
-60 android:theme="@style/NoteTheme" >
-60-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:55:13-45
-61
-61-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:57:13-62:29
-62
-62-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:58:17-69
-62-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:58:25-66
-63
-64
-64-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:59:17-76
-64-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:59:27-73
+37-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:34:5-160:19
+38 android:appComponentFactory="androidx.core.app.CoreComponentFactory"
+38-->[androidx.core:core:1.0.0] C:\Users\Lenovo\.gradle\caches\transforms-2\files-2.1\e4e0a5e35a3d558d6a79b640a6620774\core-1.0.0\AndroidManifest.xml:22:18-86
+39 android:debuggable="true"
+40 android:icon="@drawable/icon_app"
+40-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:35:9-42
+41 android:label="@string/app_name"
+41-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:36:9-41
+42 android:testOnly="true" >
+43 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:37:9-50:20
+44 android:name="net.micode.notes.ui.NotesListActivity"
+44-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:38:13-49
+45 android:configChanges="keyboardHidden|orientation|screenSize"
+45-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:39:13-74
+46 android:label="@string/app_name"
+46-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:40:13-45
+47 android:launchMode="singleTop"
+47-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:41:13-43
+48 android:theme="@style/NoteTheme"
+48-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:42:13-45
+49 android:windowSoftInputMode="adjustPan" >
+49-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:43:13-52
+50
+51
+52
+52-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:45:13-48:29
+53
+53-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:46:17-69
+53-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:46:25-66
+54
+55
+55-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:47:17-77
+55-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:47:27-74
+56
+57
+58 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:52:9-80:20
+59 android:name="net.micode.notes.ui.NoteEditActivity"
+59-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:53:13-48
+60 android:configChanges="keyboardHidden|orientation|screenSize"
+60-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:54:13-74
+61 android:launchMode="singleTop"
+61-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:55:13-43
+62 android:theme="@style/NoteTheme" >
+62-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:56:13-45
+63
+63-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:58:13-63:29
+64
+64-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:59:17-69
+64-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:59:25-66
65
-66
-66-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:17-78
-66-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:23-75
-67
-67-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:17-78
-67-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:23-75
-68
-69
-69-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:64:13-69:29
-70
-70-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:65:17-79
-70-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:65:25-76
-71
-72
-72-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:59:17-76
-72-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:59:27-73
+66
+66-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:17-76
+66-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:27-73
+67
+68
+68-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:61:17-78
+68-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:61:23-75
+69
+69-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:61:17-78
+69-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:61:23-75
+70
+71
+71-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:65:13-70:29
+72
+72-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:66:17-79
+72-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:66:25-76
73
-74
-74-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:17-78
-74-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:23-75
-75
-75-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:17-78
-75-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:23-75
-76
-77
-77-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:71:13-74:29
-78
-78-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:72:17-71
-78-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:72:25-68
-79
-80
-80-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:59:17-76
-80-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:59:27-73
-81
-82
-83 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:76:13-78:54
-84 android:name="android.app.searchable"
-84-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:77:17-54
-85 android:resource="@xml/searchable" />
-85-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:78:17-51
-86
-87
-88 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:81:9-84:43
-89 android:name="net.micode.notes.data.NotesProvider"
-89-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:82:13-63
-90 android:authorities="micode_notes"
-90-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:83:13-47
-91 android:multiprocess="true" />
-91-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:84:13-40
-92
-93 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:86:9-98:20
-94 android:name="net.micode.notes.widget.NoteWidgetProvider_2x"
-94-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:87:13-57
-95 android:label="@string/app_widget2x2" >
-95-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:88:13-50
-96
-96-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:89:13-93:29
-97
-97-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:90:17-84
-97-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:90:25-81
-98
-98-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:91:17-85
-98-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:91:25-82
-99
-99-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:92:17-85
-99-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:92:25-82
-100
-101
-102 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:95:13-97:58
-103 android:name="android.appwidget.provider"
-103-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:96:17-58
-104 android:resource="@xml/widget_2x_info" />
-104-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:97:17-55
-105
-106 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:99:9-112:20
-107 android:name="net.micode.notes.widget.NoteWidgetProvider_4x"
-107-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:100:13-57
-108 android:label="@string/app_widget4x4" >
-108-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:101:13-50
-109
-109-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:89:13-93:29
-110
-110-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:90:17-84
-110-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:90:25-81
-111
-111-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:91:17-85
-111-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:91:25-82
-112
-112-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:92:17-85
-112-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:92:25-82
-113
-114
-115 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:95:13-97:58
-116 android:name="android.appwidget.provider"
-116-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:96:17-58
-117 android:resource="@xml/widget_4x_info" />
-117-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:97:17-55
-118
-119
-119-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:114:9-118:20
-119-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:114:19-55
-120
-120-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:115:13-117:29
-121
-121-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:116:17-79
-121-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:116:25-76
-122
-123
-124 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:120:9-123:20
-125 android:name="net.micode.notes.ui.AlarmReceiver"
-125-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:121:13-61
-126 android:process=":remote" >
-126-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:122:13-38
-127
-128
-129 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:125:9-130:20
-130 android:name="net.micode.notes.ui.AlarmAlertActivity"
-130-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:126:13-50
-131 android:label="@string/app_name"
-131-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:127:13-45
-132 android:launchMode="singleInstance"
-132-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:128:13-48
-133 android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" >
-133-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:129:13-75
-134
-135 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:132:9-137:20
-136 android:name="net.micode.notes.ui.NotesPreferenceActivity"
-136-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:133:13-71
-137 android:label="@string/preferences_title"
-137-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:134:13-54
-138 android:launchMode="singleTop"
-138-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:135:13-43
-139 android:theme="@android:style/Theme.Holo.Light" >
-139-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:136:13-60
-140
-141
-142 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:139:9-142:19
-143 android:name="net.micode.notes.gtask.remote.GTaskSyncService"
-143-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:140:13-74
-144 android:exported="false" >
-144-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:141:13-37
-145
-146
-147 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:144:9-146:52
-148 android:name="android.app.default_searchable"
-148-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:145:13-58
-149 android:value=".ui.NoteEditActivity" />
-149-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:146:13-49
-150
-151
-152
+74
+74-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:17-76
+74-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:27-73
+75
+76
+76-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:61:17-78
+76-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:61:23-75
+77
+77-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:61:17-78
+77-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:61:23-75
+78
+79
+79-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:72:13-75:29
+80
+80-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:73:17-71
+80-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:73:25-68
+81
+82
+82-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:17-76
+82-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:60:27-73
+83
+84
+85 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:77:13-79:54
+86 android:name="android.app.searchable"
+86-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:78:17-54
+87 android:resource="@xml/searchable" />
+87-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:79:17-51
+88
+89
+90 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:82:9-85:43
+91 android:name="net.micode.notes.data.NotesProvider"
+91-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:83:13-63
+92 android:authorities="micode_notes"
+92-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:84:13-47
+93 android:multiprocess="true" />
+93-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:85:13-40
+94
+95 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:87:9-99:20
+96 android:name="net.micode.notes.widget.NoteWidgetProvider_2x"
+96-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:88:13-57
+97 android:label="@string/app_widget2x2" >
+97-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:89:13-50
+98
+98-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:90:13-94:29
+99
+99-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:91:17-84
+99-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:91:25-81
+100
+100-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:92:17-85
+100-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:92:25-82
+101
+101-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:93:17-85
+101-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:93:25-82
+102
+103
+104 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:96:13-98:58
+105 android:name="android.appwidget.provider"
+105-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:97:17-58
+106 android:resource="@xml/widget_2x_info" />
+106-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:98:17-55
+107
+108 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:100:9-113:20
+109 android:name="net.micode.notes.widget.NoteWidgetProvider_4x"
+109-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:101:13-57
+110 android:label="@string/app_widget4x4" >
+110-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:102:13-50
+111
+111-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:90:13-94:29
+112
+112-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:91:17-84
+112-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:91:25-81
+113
+113-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:92:17-85
+113-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:92:25-82
+114
+114-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:93:17-85
+114-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:93:25-82
+115
+116
+117 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:96:13-98:58
+118 android:name="android.appwidget.provider"
+118-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:97:17-58
+119 android:resource="@xml/widget_4x_info" />
+119-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:98:17-55
+120
+121
+121-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:115:9-119:20
+121-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:115:19-55
+122
+122-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:116:13-118:29
+123
+123-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:117:17-79
+123-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:117:25-76
+124
+125
+126 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:121:9-124:20
+127 android:name="net.micode.notes.ui.AlarmReceiver"
+127-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:122:13-61
+128 android:process=":remote" >
+128-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:123:13-38
+129
+130
+131 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:126:9-131:20
+132 android:name="net.micode.notes.ui.AlarmAlertActivity"
+132-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:127:13-50
+133 android:label="@string/app_name"
+133-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:128:13-45
+134 android:launchMode="singleInstance"
+134-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:129:13-48
+135 android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" >
+135-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:130:13-75
+136
+137 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:132:9-137:20
+138 android:name="net.micode.notes.ui.MyBoard"
+138-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:133:13-39
+139 android:label="MyBoard"
+139-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:134:13-36
+140 android:launchMode="singleInstance"
+140-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:135:13-48
+141 android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" >
+141-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:136:13-75
+142
+143 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:138:9-143:20
+144 android:name="net.micode.notes.ui.GestureSetting"
+144-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:139:13-46
+145 android:label="GestrueSetting"
+145-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:140:13-43
+146 android:launchMode="singleInstance"
+146-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:141:13-48
+147 android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" >
+147-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:142:13-75
+148
+149 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:145:9-150:20
+150 android:name="net.micode.notes.ui.NotesPreferenceActivity"
+150-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:146:13-71
+151 android:label="@string/preferences_title"
+151-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:147:13-54
+152 android:launchMode="singleTop"
+152-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:148:13-43
+153 android:theme="@android:style/Theme.Holo.Light" >
+153-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:149:13-60
+154
+155
+156 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:152:9-155:19
+157 android:name="net.micode.notes.gtask.remote.GTaskSyncService"
+157-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:153:13-74
+158 android:exported="false" >
+158-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:154:13-37
+159
+160
+161 F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:157:9-159:52
+162 android:name="android.app.default_searchable"
+162-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:158:13-58
+163 android:value=".ui.NoteEditActivity" />
+163-->F:\Git\work_room\p3p7sqtgz\src\app\src\main\AndroidManifest.xml:159:13-49
+164
+165
+166
diff --git a/src/app/build/intermediates/merged_java_res/debug/out.jar b/src/app/build/intermediates/merged_java_res/debug/out.jar
index 15cb0ec..a25b7a9 100644
Binary files a/src/app/build/intermediates/merged_java_res/debug/out.jar and b/src/app/build/intermediates/merged_java_res/debug/out.jar differ
diff --git a/src/app/build/intermediates/merged_manifests/debug/AndroidManifest.xml b/src/app/build/intermediates/merged_manifests/debug/AndroidManifest.xml
index eb47700..ea95b5b 100644
--- a/src/app/build/intermediates/merged_manifests/debug/AndroidManifest.xml
+++ b/src/app/build/intermediates/merged_manifests/debug/AndroidManifest.xml
@@ -21,7 +21,7 @@
+ android:targetSdkVersion="28" />
@@ -35,9 +35,11 @@
+ android:label="@string/app_name"
+ android:testOnly="true" >
+
+
+
+
+
+
+
+
+ Type: INTEGER (long)
@@ -206,35 +208,35 @@ public class Notes {
/**
- * Generic data column, the meaning is {@link #MIMETYPE} specific, used for
+ * Generic data column, the meaning is specific, used for
* integer data type
*
Type: INTEGER
*/
String DATA1 = "data1";
/**
- * Generic data column, the meaning is {@link #MIMETYPE} specific, used for
+ * Generic data column, the meaning is specific, used for
* integer data type
*
Type: INTEGER
*/
String DATA2 = "data2";
/**
- * Generic data column, the meaning is {@link #MIMETYPE} specific, used for
+ * Generic data column, the meaning is specific, used for
* TEXT data type
*
Type: TEXT
*/
String DATA3 = "data3";
/**
- * Generic data column, the meaning is {@link #MIMETYPE} specific, used for
+ * Generic data column, the meaning is specific, used for
* TEXT data type
*
Type: TEXT
*/
String DATA4 = "data4";
/**
- * Generic data column, the meaning is {@link #MIMETYPE} specific, used for
+ * Generic data column, the meaning is specific, used for
* TEXT data type
*
Type: TEXT
*/
@@ -250,6 +252,9 @@ public class Notes {
public static final int MODE_CHECK_LIST = 1;
+ public static final int MODE_PRIVATE_TYPE = 2;//隐私模式,加密码 mine 1 这里留了一个bug,就是清单模式和私密便签模式同时使用了一个变量储存,懒得改了。。。。。
+
+
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/text_note";
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/text_note";
diff --git a/src/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java b/src/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java
index cb629e9..093a686 100644
--- a/src/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java
+++ b/src/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java
@@ -18,6 +18,7 @@ package net.micode.notes.data;
import android.content.ContentValues;
import android.content.Context;
+import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
@@ -25,6 +26,7 @@ import android.util.Log;
import net.micode.notes.data.Notes.DataColumns;
import net.micode.notes.data.Notes.DataConstants;
import net.micode.notes.data.Notes.NoteColumns;
+import net.micode.notes.ui.NoteItemData;
public class NotesDatabaseHelper extends SQLiteOpenHelper {
@@ -60,7 +62,8 @@ public class NotesDatabaseHelper extends SQLiteOpenHelper {
NoteColumns.LOCAL_MODIFIED + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.ORIGIN_PARENT_ID + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.GTASK_ID + " TEXT NOT NULL DEFAULT ''," +
- NoteColumns.VERSION + " INTEGER NOT NULL DEFAULT 0" +
+ NoteColumns.VERSION + " INTEGER NOT NULL DEFAULT 0," +
+ NoteColumns.PASSWORD + " TEXT NOT NULL DEFAULT '' " +//mine 1
")";
private static final String CREATE_DATA_TABLE_SQL =
@@ -234,7 +237,42 @@ public class NotesDatabaseHelper extends SQLiteOpenHelper {
db.execSQL(FOLDER_DELETE_NOTES_ON_DELETE_TRIGGER);
db.execSQL(FOLDER_MOVE_NOTES_ON_TRASH_TRIGGER);
}
-
+ /*public int retCount(){
+ int NotesCount = mNotesCount;
+ int ItemCount = getCount();
+ for (int i = 0; i < ItemCount; i++) {
+ Cursor c = (Cursor) getItem(i);
+ if (c != null) {
+ if (NoteItemData.getNoteType(c) == Notes.TYPE_FOLDER) {
+ NoteItemData NoteItem = new NoteItemData(mContext, c);
+ NotesCount += NoteItem.getNotesCount();
+ }
+ } else {
+ Log.e(TAG, "Invalid cursor");
+ return -1;
+ }
+ }
+ return NotesCount;
+ }*/
+ public void dosearch(String querystring) //搜索时不区分大小写,仿照上面的递归
+ {
+ Cursor cursor = null;
+ SQLiteDatabase db = mInstance.getReadableDatabase();
+ String query_sql_string = "select * from " + TABLE.DATA + " where content like " + "'%"+ querystring + "%'";
+ //Log.i(TAG,query_sql_string);
+ cursor = db.rawQuery(query_sql_string,null);
+ cursor.moveToFirst();
+ if(cursor!=null)
+ {
+ while(cursor.moveToNext())
+ {
+
+ String content = cursor.getString(cursor.getColumnIndex("content"));
+ Log.i(TAG, cursor.getString(cursor.getColumnIndex("_id")));
+ }
+ }
+ cursor.close();
+ }
private void createSystemFolder(SQLiteDatabase db) {
ContentValues values = new ContentValues();
diff --git a/src/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java b/src/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java
index b3b61e7..ad063dd 100644
--- a/src/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java
+++ b/src/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java
@@ -77,8 +77,21 @@ public class GTaskASyncTask extends AsyncTask {
pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(mContext,
NotesListActivity.class), 0);
}
+ /* Notification.Builder builder1 = new Notification.Builder(mContext);
+ builder1.setSmallIcon(R.drawable.advise2); //设置图标
+ builder1.setTicker("显示第二个通知");
+ builder1.setContentTitle("通知"); //设置标题
+ builder1.setContentText("点击查看详细内容"); //消息内容
+ builder1.setWhen(System.currentTimeMillis()); //发送时间
+ builder1.setDefaults(Notification.DEFAULT_ALL); //设置默认的提示音,振动方式,灯光
+ builder1.setAutoCancel(true);//打开程序后图标消失
+ Intent intent =new Intent (MainActivity.this,Center.class);
+ PendingIntent pendingIntent =PendingIntent.getActivity(MainActivity.this, 0, intent, 0);
+ builder1.setContentIntent(pendingIntent);
+ Notification notification1 = builder1.build();
+ notificationManager.notify(124, notification1); // 通过通知管理器发送通知
notification.setLatestEventInfo(mContext, mContext.getString(R.string.app_name), content,
- pendingIntent);
+ pendingIntent);*/
mNotifiManager.notify(GTASK_SYNC_NOTIFICATION_ID, notification);
}
diff --git a/src/app/src/main/java/net/micode/notes/model/Note.java b/src/app/src/main/java/net/micode/notes/model/Note.java
index 48cde80..5417205 100644
--- a/src/app/src/main/java/net/micode/notes/model/Note.java
+++ b/src/app/src/main/java/net/micode/notes/model/Note.java
@@ -70,7 +70,7 @@ public class Note {
mNoteData = new NoteData();
}
- public void setNoteValue(String key, String value) {
+ public void setNoteValue(String key, String value) {//使用这个加密码
mNoteDiffValues.put(key, value);
mNoteDiffValues.put(NoteColumns.LOCAL_MODIFIED, 1);
mNoteDiffValues.put(NoteColumns.MODIFIED_DATE, System.currentTimeMillis());
diff --git a/src/app/src/main/java/net/micode/notes/model/WorkingNote.java b/src/app/src/main/java/net/micode/notes/model/WorkingNote.java
index be081e4..1ff0c13 100644
--- a/src/app/src/main/java/net/micode/notes/model/WorkingNote.java
+++ b/src/app/src/main/java/net/micode/notes/model/WorkingNote.java
@@ -31,6 +31,8 @@ import net.micode.notes.data.Notes.NoteColumns;
import net.micode.notes.data.Notes.TextNote;
import net.micode.notes.tool.ResourceParser.NoteBgResources;
+import java.security.NoSuchAlgorithmException;
+
public class WorkingNote {
// Note for the working note
@@ -101,6 +103,8 @@ public class WorkingNote {
private static final int NOTE_MODIFIED_DATE_COLUMN = 5;
+
+
// New note construct
private WorkingNote(Context context, long folderId) {
mContext = context;
@@ -123,6 +127,19 @@ public class WorkingNote {
mNote = new Note();
loadNote();
}
+//mine 12
+ public boolean comparePassword(String passWord)
+ {
+ Cursor cursor = mContext.getContentResolver().query(
+ ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, mNoteId), new String[]{NoteColumns.PASSWORD}, null,
+ null, null);
+
+ int passWordIndex = cursor.getColumnIndexOrThrow(NoteColumns.PASSWORD);
+ cursor.moveToFirst();
+ String str = cursor.getString(passWordIndex);
+ cursor.close();
+ return str.equals(passWord);
+ }
private void loadNote() {
Cursor cursor = mContext.getContentResolver().query(
@@ -137,6 +154,7 @@ public class WorkingNote {
mWidgetType = cursor.getInt(NOTE_WIDGET_TYPE_COLUMN);
mAlertDate = cursor.getLong(NOTE_ALERTED_DATE_COLUMN);
mModifiedDate = cursor.getLong(NOTE_MODIFIED_DATE_COLUMN);
+
}
cursor.close();
} else {
@@ -228,6 +246,14 @@ public class WorkingNote {
public void setOnSettingStatusChangedListener(NoteSettingChangedListener l) {
mNoteSettingStatusListener = l;
}
+ //mine 4
+ public void setmPwd(String password)
+ {
+ mNote.setNoteValue(NoteColumns.PASSWORD, String.valueOf(password));
+ }
+ public void delmPwd(){
+ mNote.setNoteValue(NoteColumns.PASSWORD, "");
+ }
public void setAlertDate(long date, boolean set) {
if (date != mAlertDate) {
@@ -257,9 +283,9 @@ public class WorkingNote {
}
}
- public void setCheckListMode(int mode) {
+ public void setCheckListMode(int mode, boolean listed) {
if (mMode != mode) {
- if (mNoteSettingStatusListener != null) {
+ if (mNoteSettingStatusListener != null && listed) {
mNoteSettingStatusListener.onCheckListModeChanged(mMode, mode);
}
mMode = mode;
diff --git a/src/app/src/main/java/net/micode/notes/tool/ImageUtils.java b/src/app/src/main/java/net/micode/notes/tool/ImageUtils.java
new file mode 100644
index 0000000..4f24516
--- /dev/null
+++ b/src/app/src/main/java/net/micode/notes/tool/ImageUtils.java
@@ -0,0 +1,356 @@
+package net.micode.notes.tool;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Matrix;
+import android.net.Uri;
+import android.util.Base64;
+import android.util.Log;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.InputStream;
+//mine 357
+/**
+ * Created by sendtion on 2016/5/25.
+ */
+public class ImageUtils {
+ /**
+ * 图片压缩处理,size参数为压缩比,比如size为2,则压缩为1/4
+ **/
+ public static Bitmap compressBitmap(String path, byte[] data, Context context, Uri uri, int size, boolean width) {
+ BitmapFactory.Options options = null;
+ if (size > 0) {
+ BitmapFactory.Options info = new BitmapFactory.Options();
+ /**如果设置true的时候,decode时候Bitmap返回的为数据将空*/
+ info.inJustDecodeBounds = false;
+ decodeBitmap(path, data, context, uri, info);
+ int dim = info.outWidth;
+ if (!width) dim = Math.max(dim, info.outHeight);
+ options = new BitmapFactory.Options();
+ /**把图片宽高读取放在Options里*/
+ options.inSampleSize = size;
+ }
+ Bitmap bm = null;
+ try {
+ bm = decodeBitmap(path, data, context, uri, options);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return bm;
+ }
+
+
+ /**
+ * 把byte数据解析成图片
+ */
+ private static Bitmap decodeBitmap(String path, byte[] data, Context context, Uri uri, BitmapFactory.Options options) {
+ Bitmap result = null;
+ if (path != null) {
+ result = BitmapFactory.decodeFile(path, options);
+ } else if (data != null) {
+ result = BitmapFactory.decodeByteArray(data, 0, data.length, options);
+ } else if (uri != null) {
+ ContentResolver cr = context.getContentResolver();
+ InputStream inputStream = null;
+ try {
+ inputStream = cr.openInputStream(uri);
+ result = BitmapFactory.decodeStream(inputStream, null, options);
+ inputStream.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return result;
+ }
+
+
+ /**
+ * 把bitmap转换成String
+ *
+ * @param filePath
+ * @return
+ */
+ public static String bitmapToString(String filePath) {
+
+ Bitmap bm = getSmallBitmap(filePath, 480, 800);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ bm.compress(Bitmap.CompressFormat.JPEG, 40, baos);
+ byte[] b = baos.toByteArray();
+
+ return Base64.encodeToString(b, Base64.DEFAULT);
+
+ }
+
+ /**
+ * 计算图片的缩放值
+ *
+ * @param options
+ * @param reqWidth
+ * @param reqHeight
+ * @return
+ */
+ public static int calculateInSampleSize(BitmapFactory.Options options,
+ int reqWidth, int reqHeight) {
+ // Raw height and width of image
+ final int height = options.outHeight;
+ final int width = options.outWidth;
+ int inSampleSize = 1;
+
+ if (height > reqHeight || width > reqWidth) {
+
+ // Calculate ratios of height and width to requested height and
+ // width
+ final int heightRatio = Math.round((float) height / (float) reqHeight);
+ final int widthRatio = Math.round((float) width / (float) reqWidth);
+
+ // Choose the smallest ratio as inSampleSize value, this will
+ // guarantee
+ // a final image with both dimensions larger than or equal to the
+ // requested height and width.
+ inSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;
+ }
+
+ return inSampleSize;
+ }
+
+ /**
+ * 根据路径获得图片并压缩返回bitmap用于显示
+ *
+ * @return
+ */
+ public static Bitmap getSmallBitmap(String filePath, int newWidth, int newHeight) {
+ final BitmapFactory.Options options = new BitmapFactory.Options();
+ options.inJustDecodeBounds = true;
+ BitmapFactory.decodeFile(filePath, options);
+
+ // Calculate inSampleSize
+ options.inSampleSize = calculateInSampleSize(options, newWidth, newHeight);
+
+ // Decode bitmap with inSampleSize set
+ options.inJustDecodeBounds = false;
+
+ Bitmap bitmap = BitmapFactory.decodeFile(filePath, options);
+ Bitmap newBitmap = compressImage(bitmap, 600);
+ if (bitmap != null){
+ bitmap.recycle();
+ }
+ return newBitmap;
+ }
+
+ /**
+ * 根据路径删除图片
+ *
+ * @param path
+ */
+ public static void deleteTempFile(String path) {
+ File file = new File(path);
+ if (file.exists()) {
+ file.delete();
+ }
+ }
+
+ /**
+ * 添加到图库
+ */
+ public static void galleryAddPic(Context context, String path) {
+ Intent mediaScanIntent = new Intent(
+ Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
+ File f = new File(path);
+ Uri contentUri = Uri.fromFile(f);
+ mediaScanIntent.setData(contentUri);
+ context.sendBroadcast(mediaScanIntent);
+ }
+
+ //使用Bitmap加Matrix来缩放
+ public static Bitmap resizeImage(Bitmap bitmapOrg, int newWidth, int newHeight)
+ {
+// Bitmap bitmapOrg = BitmapFactory.decodeFile(imagePath);
+ // 获取这个图片的宽和高
+ int width = bitmapOrg.getWidth();
+ int height = bitmapOrg.getHeight();
+ //如果宽度为0 保持原图
+ if(newWidth == 0){
+ newWidth = width;
+ newHeight = height;
+ }
+ // 创建操作图片用的matrix对象
+ Matrix matrix = new Matrix();
+ // 计算宽高缩放率
+ float scaleWidth = newWidth / width;
+ float scaleHeight = newHeight / height;
+ // 缩放图片动作
+ matrix.postScale(scaleWidth, scaleHeight);
+ Bitmap resizedBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0, newWidth,
+ newHeight, matrix, true);
+ //Log.e("###newWidth=", resizedBitmap.getWidth()+"");
+ //Log.e("###newHeight=", resizedBitmap.getHeight()+"");
+ resizedBitmap = compressImage(resizedBitmap, 100);//质量压缩
+ return resizedBitmap;
+ }
+
+ //使用BitmapFactory.Options的inSampleSize参数来缩放
+ public static Bitmap resizeImage2(String path, int width, int height)
+ {
+ BitmapFactory.Options options = new BitmapFactory.Options();
+ options.inJustDecodeBounds = true;//不加载bitmap到内存中
+ BitmapFactory.decodeFile(path,options);
+ int outWidth = options.outWidth;
+ int outHeight = options.outHeight;
+ options.inDither = false;
+ options.inPreferredConfig = Bitmap.Config.ARGB_8888;
+ options.inSampleSize = 1;
+
+ if (outWidth != 0 && outHeight != 0 && width != 0 && height != 0)
+ {
+ int sampleSize=(outWidth/width+outHeight/height)/2;
+ Log.d("###", "sampleSize = " + sampleSize);
+ options.inSampleSize = sampleSize;
+ }
+
+ options.inJustDecodeBounds = false;
+ return BitmapFactory.decodeFile(path, options);
+ }
+
+ /**
+ * 通过像素压缩图片,将修改图片宽高,适合获得缩略图,Used to get thumbnail
+ * @param srcPath
+ * @return
+ */
+ public static Bitmap compressBitmapByPath(String srcPath, float pixelW, float pixelH) {
+ BitmapFactory.Options newOpts = new BitmapFactory.Options();
+ //开始读入图片,此时把options.inJustDecodeBounds 设回true了
+ newOpts.inJustDecodeBounds = true;
+ newOpts.inPreferredConfig = Bitmap.Config.RGB_565;
+ Bitmap bitmap = BitmapFactory.decodeFile(srcPath,newOpts);//此时返回bm为空
+
+ newOpts.inJustDecodeBounds = false;
+ int w = newOpts.outWidth;
+ int h = newOpts.outHeight;
+ //现在主流手机比较多是800*480分辨率,所以高和宽我们设置为
+ float hh = pixelH;//这里设置高度为800f
+ float ww = pixelW;//这里设置宽度为480f
+ //缩放比。由于是固定比例缩放,只用高或者宽其中一个数据进行计算即可
+ int be = 1;//be=1表示不缩放
+ if (w > h && w > ww) {//如果宽度大的话根据宽度固定大小缩放
+ be = (int) (newOpts.outWidth / ww);
+ } else if (w < h && h > hh) {//如果高度高的话根据宽度固定大小缩放
+ be = (int) (newOpts.outHeight / hh);
+ }
+ if (be <= 0)
+ be = 1;
+ newOpts.inSampleSize = be;//设置缩放比例
+ //重新读入图片,注意此时已经把options.inJustDecodeBounds 设回false了
+ bitmap = BitmapFactory.decodeFile(srcPath, newOpts);
+ // return compress(bitmap, maxSize); // 这里再进行质量压缩的意义不大,反而耗资源,删除
+ return bitmap;
+ }
+
+ /**
+ * 通过大小压缩,将修改图片宽高,适合获得缩略图,Used to get thumbnail
+ * @param image
+ * @param pixelW
+ * @param pixelH
+ * @return
+ */
+ public static Bitmap compressBitmapByBmp(Bitmap image, float pixelW, float pixelH) {
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+ image.compress(Bitmap.CompressFormat.JPEG, 100, os);
+ if( os.toByteArray().length / 1024>1024) {//判断如果图片大于1M,进行压缩避免在生成图片(BitmapFactory.decodeStream)时溢出
+ os.reset();//重置baos即清空baos
+ image.compress(Bitmap.CompressFormat.JPEG, 50, os);//这里压缩50%,把压缩后的数据存放到baos中
+ }
+ ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
+ BitmapFactory.Options newOpts = new BitmapFactory.Options();
+ //开始读入图片,此时把options.inJustDecodeBounds 设回true了
+ newOpts.inJustDecodeBounds = true;
+ newOpts.inPreferredConfig = Bitmap.Config.RGB_565;
+ Bitmap bitmap = BitmapFactory.decodeStream(is, null, newOpts);
+ newOpts.inJustDecodeBounds = false;
+ int w = newOpts.outWidth;
+ int h = newOpts.outHeight;
+ float hh = pixelH;// 设置高度为240f时,可以明显看到图片缩小了
+ float ww = pixelW;// 设置宽度为120f,可以明显看到图片缩小了
+ //缩放比。由于是固定比例缩放,只用高或者宽其中一个数据进行计算即可
+ int be = 1;//be=1表示不缩放
+ if (w > h && w > ww) {//如果宽度大的话根据宽度固定大小缩放
+ be = (int) (newOpts.outWidth / ww);
+ } else if (w < h && h > hh) {//如果高度高的话根据宽度固定大小缩放
+ be = (int) (newOpts.outHeight / hh);
+ }
+ if (be <= 0) be = 1;
+ newOpts.inSampleSize = be;//设置缩放比例
+ //重新读入图片,注意此时已经把options.inJustDecodeBounds 设回false了
+ is = new ByteArrayInputStream(os.toByteArray());
+ bitmap = BitmapFactory.decodeStream(is, null, newOpts);
+ int desWidth = (int) (w / be);
+ int desHeight = (int) (h / be);
+ bitmap = Bitmap.createScaledBitmap(bitmap, desWidth, desHeight, true);
+ //压缩好比例大小后再进行质量压缩
+// return compress(bitmap, maxSize); // 这里再进行质量压缩的意义不大,反而耗资源,删除
+ return bitmap;
+ }
+
+ /**
+ * 质量压缩
+ * @param image
+ * @param maxSize
+ */
+ public static Bitmap compressImage(Bitmap image, int maxSize){
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+ // scale
+ int options = 80;
+ // Store the bitmap into output stream(no compress)
+ image.compress(Bitmap.CompressFormat.JPEG, options, os);
+ // Compress by loop
+ while ( os.toByteArray().length / 1024 > maxSize) {
+ // Clean up os
+ os.reset();
+ // interval 10
+ options -= 10;
+ image.compress(Bitmap.CompressFormat.JPEG, options, os);
+ }
+
+ Bitmap bitmap = null;
+ byte[] b = os.toByteArray();
+ if (b.length != 0) {
+ bitmap = BitmapFactory.decodeByteArray(b, 0, b.length);
+ }
+ return bitmap;
+ }
+
+ /**
+ * 对图片进行缩放
+ * @param bgimage
+ * @param newWidth
+ * @param newHeight
+ * @return
+ */
+ public static Bitmap zoomImage(Bitmap bgimage, double newWidth, double newHeight) {
+ // 获取这个图片的宽和高
+ float width = bgimage.getWidth();
+ float height = bgimage.getHeight();
+ //如果宽度为0 保持原图
+ if(newWidth == 0){
+ newWidth = width;
+ newHeight = height;
+ }
+ // 创建操作图片用的matrix对象
+ Matrix matrix = new Matrix();
+ // 计算宽高缩放率
+ float scaleWidth = ((float) newWidth) / width;
+ float scaleHeight = ((float) newHeight) / height;
+ // 缩放图片动作
+ matrix.postScale(scaleWidth, scaleHeight);
+ Bitmap bitmap = Bitmap.createBitmap(bgimage, 0, 0, (int) width,
+ (int) height, matrix, true);
+ bitmap = compressImage(bitmap, 100);//质量压缩
+ return bitmap;
+ }
+
+}
diff --git a/src/app/src/main/java/net/micode/notes/tool/ScreenUtils.java b/src/app/src/main/java/net/micode/notes/tool/ScreenUtils.java
new file mode 100644
index 0000000..bd59390
--- /dev/null
+++ b/src/app/src/main/java/net/micode/notes/tool/ScreenUtils.java
@@ -0,0 +1,97 @@
+package net.micode.notes.tool;
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.Rect;
+import android.util.DisplayMetrics;
+import android.view.View;
+import android.view.WindowManager;
+//mine 97
+/**
+ * Created by sendtion on 2016/5/25.
+ */
+public class ScreenUtils {
+
+ /**
+ * 获得屏幕宽度
+ * @param context
+ * @return
+ */
+ public static int getScreenWidth(Context context)
+ {
+ WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
+ DisplayMetrics outMetrics = new DisplayMetrics();
+ wm.getDefaultDisplay().getMetrics(outMetrics);
+ return outMetrics.widthPixels;
+ }
+
+ /**
+ * 获得屏幕高度
+ * @param context
+ * @return
+ */
+ public static int getScreenHeight(Context context) {
+ WindowManager wm = (WindowManager) context
+ .getSystemService(Context.WINDOW_SERVICE);
+ DisplayMetrics outMetrics = new DisplayMetrics();
+ wm.getDefaultDisplay().getMetrics(outMetrics);
+ return outMetrics.heightPixels;
+ }
+
+ /**
+ * 获得状态栏高度
+ * @param context
+ * @return
+ */
+ public static int getStatusHeight(Context context) {
+ int statusHeight = -1;
+ try {
+ Class> clazz = Class.forName("com.android.internal.R$dimen");
+ Object object = clazz.newInstance();
+ int height = Integer.parseInt(clazz.getField("status_bar_height")
+ .get(object).toString());
+ statusHeight = context.getResources().getDimensionPixelSize(height);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return statusHeight;
+ }
+
+ /**
+ * 获取当前屏幕截图,包含状态栏
+ */
+ public static Bitmap snapShotWithStatusBar(Activity activity){
+ View view = activity.getWindow().getDecorView();
+ view.setDrawingCacheEnabled(true);
+ view.buildDrawingCache();
+ Bitmap bmp = view.getDrawingCache();
+ int width = getScreenWidth(activity);
+ int height = getScreenHeight(activity);
+ Bitmap bp = null;
+ bp = Bitmap.createBitmap(bmp, 0, 0, width, height);
+ view.destroyDrawingCache();
+ return bp;
+ }
+
+ /**
+ * 获取当前屏幕截图,不包含状态栏
+ *
+ */
+ public static Bitmap snapShotWithoutStatusBar(Activity activity){
+ View view = activity.getWindow().getDecorView();
+ view.setDrawingCacheEnabled(true);
+ view.buildDrawingCache();
+ Bitmap bmp = view.getDrawingCache();
+ Rect frame = new Rect();
+ activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
+ int statusBarHeight = frame.top;
+ int width = getScreenWidth(activity);
+ int height = getScreenHeight(activity);
+ Bitmap bp = null;
+ bp = Bitmap.createBitmap(bmp, 0, statusBarHeight, width, height
+ - statusBarHeight);
+ view.destroyDrawingCache();
+ return bp;
+ }
+}
diff --git a/src/app/src/main/java/net/micode/notes/ui/GestureSetting.java b/src/app/src/main/java/net/micode/notes/ui/GestureSetting.java
new file mode 100644
index 0000000..683d362
--- /dev/null
+++ b/src/app/src/main/java/net/micode/notes/ui/GestureSetting.java
@@ -0,0 +1,104 @@
+package net.micode.notes.ui;
+
+import android.Manifest;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.SharedPreferences;
+import android.gesture.Gesture;
+import android.gesture.GestureLibraries;
+import android.gesture.GestureLibrary;
+import android.gesture.GestureOverlayView;
+import android.graphics.Bitmap;
+import android.graphics.Color;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.Toast;
+
+import androidx.core.app.ActivityCompat;
+
+import net.micode.notes.R;
+
+public class GestureSetting extends Activity {
+ //单选按钮的按钮群
+ private RadioGroup radgroup;
+ //当前被选中的单选按钮
+ private RadioButton radbtn;
+ //绘制的手势
+ private GestureOverlayView gesture;
+ //用SharedPreferences来存储哪些功能已经被绑定
+ private SharedPreferences.Editor editor;
+ //用来保存的对话框
+ private View saveDialog;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ //加载活动视图
+ setContentView(R.layout.gesture_setting);
+ //打开数据库编辑器
+ editor = getSharedPreferences("Gesture",MODE_PRIVATE).edit();
+ //返回NotesListActivity活动会用到
+ setResult(RESULT_OK);
+ ActivityCompat.requestPermissions(GestureSetting.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);//动态申请权限
+ //获取手势编辑组件后,设置相关参数
+ gesture = (GestureOverlayView) findViewById(R.id.gesture);
+ gesture.setGestureColor(Color.GREEN);
+ gesture.setGestureStrokeWidth(5);
+ gesture.addOnGesturePerformedListener(new GestureOverlayView.OnGesturePerformedListener() {
+ @Override
+ public void onGesturePerformed(GestureOverlayView gestureOverlayView, final Gesture gesture) {
+ saveDialog = getLayoutInflater().inflate(R.layout.dialog_save,null,false);
+ //添加视图
+ radgroup = (RadioGroup)saveDialog.findViewById(R.id.radioGroup);
+ //初始化当前选中的单选按钮,即CreateNewFolder
+ radbtn = (RadioButton)saveDialog.findViewById(R.id.CreateNewFolder);
+ //单选按钮变换监听器
+ radgroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(RadioGroup group, int checkedId) {
+ //改变当前选中的单选按钮
+ radbtn = (RadioButton) saveDialog.findViewById(checkedId);
+ Toast.makeText(getApplicationContext(), "按钮组值发生改变,你选了" + radbtn.getText(), Toast.LENGTH_SHORT).show();
+ }
+ });
+ //手势的图片
+ ImageView img_show = (ImageView) saveDialog.findViewById(R.id.img_show);
+ Bitmap bitmap = gesture.toBitmap(128,128,10,0xffff0000);
+ img_show.setImageBitmap(bitmap);
+ new AlertDialog.Builder(GestureSetting.this).setView(saveDialog)
+ .setPositiveButton("保存",new DialogInterface.OnClickListener()
+ {
+ @Override
+ public void onClick(DialogInterface dialogInterface, int i) {
+ //打开数据库,如果功能还未对应手势,则添加功能和手势的绑定
+ SharedPreferences pref = getSharedPreferences("Gesture",MODE_PRIVATE);
+ if(pref.getString(radbtn.getText().toString(),"False").equals("False")) {
+ editor.putString(radbtn.getText().toString(), "True");
+ editor.apply();
+ //获取文件对应的手势库
+ GestureLibrary gestureLib = GestureLibraries.fromFile("/mnt/sdcard/mygestures");
+ //添加手势
+ gestureLib.addGesture(radbtn.getText().toString(), gesture);
+ //储存手势
+ gestureLib.save();
+ }
+ else{//若功能已经绑定手势,则提醒即将覆盖旧的手势
+ editor.putString(radbtn.getText().toString(), "True");
+ editor.apply();
+ Toast.makeText(GestureSetting.this,"此操作已被设置手势,即将覆盖",Toast.LENGTH_LONG);
+ GestureLibrary gestureLib = GestureLibraries.fromFile("/mnt/sdcard/mygestures");
+ //移除旧的手势
+ gestureLib.removeEntry(radbtn.getText().toString());
+ //添加新的手势
+ gestureLib.addGesture(radbtn.getText().toString(), gesture);
+ gestureLib.save();
+ }
+ }
+ }).setNegativeButton("取消", null).show();
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/src/app/src/main/java/net/micode/notes/ui/MyBoard.java b/src/app/src/main/java/net/micode/notes/ui/MyBoard.java
new file mode 100644
index 0000000..a034eae
--- /dev/null
+++ b/src/app/src/main/java/net/micode/notes/ui/MyBoard.java
@@ -0,0 +1,127 @@
+package net.micode.notes.ui;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import net.micode.notes.R;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Matrix;
+import android.graphics.Paint;
+import android.os.Bundle;
+import android.os.Environment;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.Toast;
+//mine 127
+public class MyBoard extends Activity {
+ private ImageView imageView;
+ private Bitmap copyBitmap;
+ private Paint paint;
+ private Canvas canvas;
+ private float startX;
+ private float startY;
+ private int ColorBox[] = {Color.BLACK,Color.GRAY,Color.LTGRAY,Color.RED,Color.BLUE,Color.YELLOW,Color.CYAN,Color.MAGENTA};//颜色种类
+ private int ColorIndex = 0;//当前指向的颜色
+ private int SizeBox[] = {5,10,15,20,25};//字体大小
+ private int SizeIndex = 0;//当前指向的字体大小
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.myboard);
+
+ imageView = (ImageView) findViewById(R.id.iv_image);
+ //使用Bitmap工厂把背景图片加载进来
+ Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.huaban);
+ //创建一个空的图片,宽度和高度 还有信息跟原图片一样
+ copyBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), bitmap.getConfig());
+ //创建画笔
+ paint = new Paint();
+ paint.setStrokeWidth(SizeBox[SizeIndex]);
+ paint.setColor(ColorBox[0]);
+ //创建一个画布
+ canvas = new Canvas(copyBitmap);
+ //开始画画
+ canvas.drawBitmap(bitmap, new Matrix(), paint);
+ imageView.setImageBitmap(copyBitmap);//用copyBitmap覆盖
+
+ //图片的触摸事件(即拖动画笔画画)
+ imageView.setOnTouchListener(new View.OnTouchListener() {
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ //获取动作的事件
+ int action = event.getAction();
+ switch (action) {
+ case MotionEvent.ACTION_DOWN:
+ //按下事件
+ startX = event.getX();
+ startY = event.getY();
+ //Log.e("按下", startX + "," + startY);
+ break;
+ case MotionEvent.ACTION_MOVE:
+ //滑动事件
+ float x = event.getX();
+ float y = event.getY();
+ //在画布上画直线,不能画点,滑动事件获得的坐标不是连续的
+ canvas.drawLine(startX, startY, x, y, paint);
+ //更新图片
+ imageView.setImageBitmap(copyBitmap);
+ startX = x;
+ startY = y;
+ //Log.e("滑动", x + "," + y);
+ break;
+ case MotionEvent.ACTION_UP:
+ //抬起事件
+ float upX = event.getX();
+ float upY = event.getY();
+ //Log.e("抬起", upX + "," + upY);
+ break;
+ }
+ //必须设置为true,否则只执行按下事件
+ return true;
+ }
+ });
+
+ }
+ public void ClearBoard(View View){//清空画板,方法是重新创建一个画布
+ Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.huaban);
+ Paint paint = new Paint();
+ canvas.drawBitmap(bitmap, new Matrix(), paint);
+ }
+ //修改画笔的颜色
+ public void changeColor(View view) {
+ paint.setColor(ColorBox[(++ColorIndex)%8]);
+ }
+
+ //设置画笔的粗细
+ public void bold(View view) {
+ paint.setStrokeWidth(SizeBox[((++SizeIndex)%5)]);
+ }
+
+ //保存图片
+ public void save(View view) {
+ //创建一个图片的文件
+ String draw_path = Environment.getExternalStorageDirectory()+"/"+System.currentTimeMillis() + ".png";
+ File file = new File(draw_path);
+ FileOutputStream straeam;
+ try {
+ straeam = new FileOutputStream(file);
+ //生成图片,参数①为图片的类型,参数②为图片质量,参数③为文件输出流
+ copyBitmap.compress(Bitmap.CompressFormat.PNG, 100, straeam);
+ Toast.makeText(this, "保存成功", Toast.LENGTH_SHORT).show();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ Intent intent1=new Intent();//构造Intent,用于传递数据
+ intent1.putExtra("draw path",draw_path);//传递储存的路径
+ setResult(RESULT_OK,intent1);//专门向上一个活动传递数据的
+ finish();
+ }
+}
\ No newline at end of file
diff --git a/src/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java b/src/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
index 168d18e..c73605d 100644
--- a/src/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
+++ b/src/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java
@@ -16,9 +16,17 @@
package net.micode.notes.ui;
+import android.Manifest;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Environment;
+import android.provider.MediaStore;
import android.app.Activity;
import android.app.AlarmManager;
import android.app.AlertDialog;
+import android.app.Dialog;
import android.app.PendingIntent;
import android.app.SearchManager;
import android.appwidget.AppWidgetManager;
@@ -27,14 +35,19 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.database.Cursor;
import android.graphics.Paint;
import android.os.Bundle;
import android.preference.PreferenceManager;
+import android.text.Editable;
import android.text.Spannable;
import android.text.SpannableString;
+import android.text.Spanned;
import android.text.TextUtils;
+import android.text.TextWatcher;
import android.text.format.DateUtils;
import android.text.style.BackgroundColorSpan;
+import android.text.style.ImageSpan;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -43,6 +56,8 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
@@ -52,28 +67,45 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
+import androidx.annotation.RequiresApi;
+import androidx.core.app.ActivityCompat;
+
import net.micode.notes.R;
import net.micode.notes.data.Notes;
import net.micode.notes.data.Notes.TextNote;
+import net.micode.notes.data.NotesDatabaseHelper;
import net.micode.notes.model.WorkingNote;
import net.micode.notes.model.WorkingNote.NoteSettingChangedListener;
import net.micode.notes.tool.DataUtils;
+import net.micode.notes.tool.ImageUtils;
import net.micode.notes.tool.ResourceParser;
import net.micode.notes.tool.ResourceParser.TextAppearanceResources;
+import net.micode.notes.tool.ScreenUtils;
import net.micode.notes.ui.DateTimePickerDialog.OnDateTimeSetListener;
import net.micode.notes.ui.NoteEditText.OnTextViewChangeListener;
import net.micode.notes.widget.NoteWidgetProvider_2x;
import net.micode.notes.widget.NoteWidgetProvider_4x;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.util.Date;
+import java.sql.Timestamp;
public class NoteEditActivity extends Activity implements OnClickListener,
NoteSettingChangedListener, OnTextViewChangeListener {
+
+
private class HeadViewHolder {
public TextView tvModified;
@@ -85,6 +117,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
private static final Map sBgSelectorBtnsMap = new HashMap();
+
static {
sBgSelectorBtnsMap.put(R.id.iv_bg_yellow, ResourceParser.YELLOW);
sBgSelectorBtnsMap.put(R.id.iv_bg_red, ResourceParser.RED);
@@ -94,6 +127,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
private static final Map sBgSelectorSelectionMap = new HashMap();
+
static {
sBgSelectorSelectionMap.put(ResourceParser.YELLOW, R.id.iv_bg_yellow_select);
sBgSelectorSelectionMap.put(ResourceParser.RED, R.id.iv_bg_red_select);
@@ -103,6 +137,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
private static final Map sFontSizeBtnsMap = new HashMap();
+
static {
sFontSizeBtnsMap.put(R.id.ll_font_large, ResourceParser.TEXT_LARGE);
sFontSizeBtnsMap.put(R.id.ll_font_small, ResourceParser.TEXT_SMALL);
@@ -111,6 +146,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
private static final Map sFontSelectorSelectionMap = new HashMap();
+
static {
sFontSelectorSelectionMap.put(ResourceParser.TEXT_LARGE, R.id.iv_large_select);
sFontSelectorSelectionMap.put(ResourceParser.TEXT_SMALL, R.id.iv_small_select);
@@ -118,6 +154,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
sFontSelectorSelectionMap.put(ResourceParser.TEXT_SUPER, R.id.iv_super_select);
}
+ public long mId;
+
private static final String TAG = "NoteEditActivity";
private HeadViewHolder mNoteHeaderHolder;
@@ -135,6 +173,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
private WorkingNote mWorkingNote;
private SharedPreferences mSharedPrefs;
+
private int mFontSizeId;
private static final String PREFERENCE_FONT_SIZE = "pref_font_size";
@@ -147,18 +186,134 @@ public class NoteEditActivity extends Activity implements OnClickListener,
private LinearLayout mEditTextList;
private String mUserQuery;
+
private Pattern mPattern;
+ private TextView textView;
+ //mine 1
+ private String pathTakingPhoto;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.note_edit);
-
if (savedInstanceState == null && !initActivityState(getIntent())) {
finish();
return;
}
+ //mine 4
+ if (!(mWorkingNote.comparePassword(getIntent().getStringExtra("password")))) {
+ Toast.makeText(getApplicationContext(), "密码错误", Toast.LENGTH_SHORT);
+ finish();
+ return;
+ }
initResources();
+ count();
+ }
+
+ private String Textchange(String oriText) {
+ StringBuffer stringBuffer = new StringBuffer(oriText);
+ int Flag1 = -1;
+ int Flag2 = -1;
+ do {//不计入表示图片的字符
+ Flag1 = stringBuffer.indexOf("");
+ if (Flag1 != -1 && Flag2 != -1) {
+ stringBuffer = stringBuffer.replace(Flag1, Flag2 + 1, "");
+ }
+ } while (Flag1 != -1 && Flag2 != -1);
+
+ do {//不计入换行字符
+ Flag1 = stringBuffer.indexOf("\n");
+
+ if (Flag1 != -1) {
+ stringBuffer = stringBuffer.replace(Flag1, Flag1 + 1, "");
+ }
+ } while (Flag1 != -1);
+ do {//不计入空格字符
+ Flag1 = stringBuffer.indexOf(" ");
+
+ if (Flag1 != -1) {
+ stringBuffer = stringBuffer.replace(Flag1, Flag1 + 1, "");
+ }
+ } while (Flag1 != -1);
+ return stringBuffer.toString();
+ }
+
+ private void count() {//图片删除有bug
+ mNoteEditor.addTextChangedListener(new TextWatcher() {
+ int currentLength = 0;
+ @Override
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+ textView.setText("字符数:" + currentLength);
+ }
+ @Override
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
+ currentLength = Textchange(mNoteEditor.getText().toString()).length();
+ }
+ @Override
+ public void afterTextChanged(Editable s) {
+ textView.setText("字符数:" + currentLength);
+ }
+ });
+ }
+ //mine 40
+ @RequiresApi(api = Build.VERSION_CODES.KITKAT)
+ private void initEditText() {
+ InputStream in = null;
+ switch (getIntent().getIntExtra("open_mode", 0)) {
+ case 1:
+ in = getResources().openRawResource(R.raw.event);
+ break;
+ case 2:
+ in = getResources().openRawResource(R.raw.contact);
+ break;
+ case 3:
+ in = getResources().openRawResource(R.raw.passwd);
+ break;
+ default:
+ break;
+ }
+ if (in == null) return;
+ Editable edit = mNoteEditor.getText();
+ StringBuilder sb = new StringBuilder();//代表一个字符序列可变的字符串,线程不安全,但性能较高
+ try (InputStreamReader isr = new InputStreamReader(in); BufferedReader br = new BufferedReader(isr);) {
+ //使用指定的字符集读取字节并将它们解码为字符
+ //缓冲区流读入
+ char[] buf = new char[1024];
+ int len = 0;
+ while ((len = br.read(buf)) > 0) {//read读取一个字符,若读取到末尾则返回-1,这里是加载到buf中
+ sb.append(buf, 0, len);//从buf0开始的len长度的字符串加载到sb后
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ edit.append(sb.toString());
+ mNoteEditor.setText(edit);
+ if (in != null) {
+ try {
+ in.close();
+ } catch (IOException e) {
+ Log.e(TAG, "initEditText " + e.toString());
+ }
+ }
+ }
+ //mine 3
+ @RequiresApi(api = Build.VERSION_CODES.KITKAT)
+ @Override
+ protected void onResume() {
+ super.onResume();
+ initNoteScreen();
+ initEditText();
+ initImage();
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+ if (saveNote()) {
+ Log.d(TAG, "Note data was saved with length:" + mWorkingNote.getContent().length());
+ }
+ clearSettingState();
}
/**
@@ -186,27 +341,27 @@ public class NoteEditActivity extends Activity implements OnClickListener,
*/
mWorkingNote = null;
if (TextUtils.equals(Intent.ACTION_VIEW, intent.getAction())) {
- long noteId = intent.getLongExtra(Intent.EXTRA_UID, 0);
+ mId = intent.getLongExtra(Intent.EXTRA_UID, 0);
mUserQuery = "";
/**
* Starting from the searched result
*/
if (intent.hasExtra(SearchManager.EXTRA_DATA_KEY)) {
- noteId = Long.parseLong(intent.getStringExtra(SearchManager.EXTRA_DATA_KEY));
+ mId = Long.parseLong(intent.getStringExtra(SearchManager.EXTRA_DATA_KEY));
mUserQuery = intent.getStringExtra(SearchManager.USER_QUERY);
}
- if (!DataUtils.visibleInNoteDatabase(getContentResolver(), noteId, Notes.TYPE_NOTE)) {
+ if (!DataUtils.visibleInNoteDatabase(getContentResolver(), mId, Notes.TYPE_NOTE)) {
Intent jump = new Intent(this, NotesListActivity.class);
startActivity(jump);
showToast(R.string.error_note_not_exist);
finish();
return false;
} else {
- mWorkingNote = WorkingNote.load(this, noteId);
+ mWorkingNote = WorkingNote.load(this, mId);
if (mWorkingNote == null) {
- Log.e(TAG, "load note failed with note id" + noteId);
+ Log.e(TAG, "load note failed with note id" + mId);
finish();
return false;
}
@@ -214,7 +369,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN
| WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
- } else if(TextUtils.equals(Intent.ACTION_INSERT_OR_EDIT, intent.getAction())) {
+ } else if (TextUtils.equals(Intent.ACTION_INSERT_OR_EDIT, intent.getAction())) {
// New note
long folderId = intent.getLongExtra(Notes.INTENT_EXTRA_FOLDER_ID, 0);
int widgetId = intent.getIntExtra(Notes.INTENT_EXTRA_WIDGET_ID,
@@ -253,6 +408,13 @@ public class NoteEditActivity extends Activity implements OnClickListener,
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
| WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
+ } else if (TextUtils.equals(Intent.ACTION_SEARCH, intent.getAction())) //点击搜索按钮响应
+ {
+ String querystring = intent.getStringExtra(SearchManager.QUERY); //获取搜索框内的字符串
+ NotesDatabaseHelper dbhelper = new NotesDatabaseHelper(this);
+ dbhelper.dosearch(querystring);
+ finish();
+ return false;
} else {
Log.e(TAG, "Intent not specified action, should not support");
finish();
@@ -262,12 +424,6 @@ public class NoteEditActivity extends Activity implements OnClickListener,
return true;
}
- @Override
- protected void onResume() {
- super.onResume();
- initNoteScreen();
- }
-
private void initNoteScreen() {
mNoteEditor.setTextAppearance(this, TextAppearanceResources
.getTexAppearanceResource(mFontSizeId));
@@ -296,7 +452,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
private void showAlertHeader() {
- if (mWorkingNote.hasClockAlert()) {
+ if (mWorkingNote.hasClockAlert()) {
long time = System.currentTimeMillis();
if (time > mWorkingNote.getAlertDate()) {
mNoteHeaderHolder.tvAlertDate.setText(R.string.note_alert_expired);
@@ -309,8 +465,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
} else {
mNoteHeaderHolder.tvAlertDate.setVisibility(View.GONE);
mNoteHeaderHolder.ivAlertIcon.setVisibility(View.GONE);
- };
-
+ }
}
@Override
@@ -351,7 +506,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
private boolean inRangeOfView(View view, MotionEvent ev) {
- int []location = new int[2];
+ int[] location = new int[2];
view.getLocationOnScreen(location);
int x = location[0];
int y = location[1];
@@ -359,8 +514,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|| ev.getX() > (x + view.getWidth())
|| ev.getY() < y
|| ev.getY() > (y + view.getHeight())) {
- return false;
- }
+ return false;
+ }
return true;
}
@@ -375,6 +530,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
mNoteEditor = (EditText) findViewById(R.id.note_edit_view);
mNoteEditorPanel = findViewById(R.id.sv_note_edit);
mNoteBgColorSelector = findViewById(R.id.note_bg_color_selector);
+
+ textView = (TextView) findViewById(R.id.text_num);//mine
for (int id : sBgSelectorBtnsMap.keySet()) {
ImageView iv = (ImageView) findViewById(id);
iv.setOnClickListener(this);
@@ -384,29 +541,22 @@ public class NoteEditActivity extends Activity implements OnClickListener,
for (int id : sFontSizeBtnsMap.keySet()) {
View view = findViewById(id);
view.setOnClickListener(this);
- };
+ }
+ ;
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
mFontSizeId = mSharedPrefs.getInt(PREFERENCE_FONT_SIZE, ResourceParser.BG_DEFAULT_FONT_SIZE);
+
/**
* HACKME: Fix bug of store the resource id in shared preference.
* The id may larger than the length of resources, in this case,
* return the {@link ResourceParser#BG_DEFAULT_FONT_SIZE}
*/
- if(mFontSizeId >= TextAppearanceResources.getResourcesSize()) {
+ if (mFontSizeId >= TextAppearanceResources.getResourcesSize()) {
mFontSizeId = ResourceParser.BG_DEFAULT_FONT_SIZE;
}
mEditTextList = (LinearLayout) findViewById(R.id.note_edit_list);
}
- @Override
- protected void onPause() {
- super.onPause();
- if(saveNote()) {
- Log.d(TAG, "Note data was saved with length:" + mWorkingNote.getContent().length());
- }
- clearSettingState();
- }
-
private void updateWidget() {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
if (mWorkingNote.getWidgetType() == Notes.TYPE_WIDGET_2X) {
@@ -418,10 +568,9 @@ public class NoteEditActivity extends Activity implements OnClickListener,
return;
}
- intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[] {
- mWorkingNote.getWidgetId()
+ intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[]{
+ mWorkingNote.getWidgetId()
});
-
sendBroadcast(intent);
setResult(RESULT_OK, intent);
}
@@ -454,10 +603,9 @@ public class NoteEditActivity extends Activity implements OnClickListener,
@Override
public void onBackPressed() {
- if(clearSettingState()) {
+ if (clearSettingState()) {
return;
}
-
saveNote();
super.onBackPressed();
}
@@ -483,7 +631,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
@Override
- public boolean onPrepareOptionsMenu(Menu menu) {
+ public boolean onPrepareOptionsMenu(Menu menu) {//准备菜单
if (isFinishing()) {
return true;
}
@@ -494,6 +642,11 @@ public class NoteEditActivity extends Activity implements OnClickListener,
} else {
getMenuInflater().inflate(R.menu.note_edit, menu);
}
+ if (mWorkingNote.getCheckListMode() == TextNote.MODE_PRIVATE_TYPE) {//mine 5
+ menu.findItem(R.id.menu_setPrivate).setVisible(false);
+ } else {
+ menu.findItem(R.id.menu_leavePrivate).setVisible(false);
+ }
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
menu.findItem(R.id.menu_list_mode).setTitle(R.string.menu_normal_mode);
} else {
@@ -509,7 +662,26 @@ public class NoteEditActivity extends Activity implements OnClickListener,
@Override
public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
+ switch (item.getItemId()) {//mine 17
+ case R.id.menu_draw:
+ startDraw();
+ break;
+ case R.id.menu_take_photo:
+ startTakePhoto();
+ break;
+ case R.id.menu_camera:
+ callGallery();
+ break;
+ case R.id.menu_setPrivate://设置为私密便签
+ if (mNoteEditor.getText().toString().equals("")) {
+ Toast.makeText(getApplicationContext(), "为空的便签不能设置密码", Toast.LENGTH_SHORT).show();
+ } else {
+ setPwd();
+ }
+ break;
+ case R.id.menu_leavePrivate://设置为
+ delPwd();
+ break;
case R.id.menu_new_note:
createNewNote();
break;
@@ -534,7 +706,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
break;
case R.id.menu_list_mode:
mWorkingNote.setCheckListMode(mWorkingNote.getCheckListMode() == 0 ?
- TextNote.MODE_CHECK_LIST : 0);
+ TextNote.MODE_CHECK_LIST : 0, true);
break;
case R.id.menu_share:
getWorkingText();
@@ -559,7 +731,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
DateTimePickerDialog d = new DateTimePickerDialog(this, System.currentTimeMillis());
d.setOnDateTimeSetListener(new OnDateTimeSetListener() {
public void OnDateTimeSet(AlertDialog dialog, long date) {
- mWorkingNote.setAlertDate(date , true);
+ mWorkingNote.setAlertDate(date, true);
}
});
d.show();
@@ -584,6 +756,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
finish();
Intent intent = new Intent(this, NoteEditActivity.class);
intent.setAction(Intent.ACTION_INSERT_OR_EDIT);
+ intent.putExtra("password", "");
intent.putExtra(Notes.INTENT_EXTRA_FOLDER_ID, mWorkingNote.getFolderId());
startActivity(intent);
}
@@ -628,7 +801,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);
AlarmManager alarmManager = ((AlarmManager) getSystemService(ALARM_SERVICE));
showAlertHeader();
- if(!set) {
+ if (!set) {
alarmManager.cancel(pendingIntent);
} else {
alarmManager.set(AlarmManager.RTC_WAKEUP, date, pendingIntent);
@@ -648,7 +821,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
updateWidget();
}
- public void onEditTextDelete(int index, String text) {
+ public void onEditTextDelete(int index, String text) {//wait
int childCount = mEditTextList.getChildCount();
if (childCount == 1) {
return;
@@ -661,7 +834,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
mEditTextList.removeViewAt(index);
NoteEditText edit = null;
- if(index == 0) {
+ if (index == 0) {
edit = (NoteEditText) mEditTextList.getChildAt(0).findViewById(
R.id.et_edit_text);
} else {
@@ -678,7 +851,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
/**
* Should not happen, check for debug
*/
- if(index > mEditTextList.getChildCount()) {
+ if (index > mEditTextList.getChildCount()) {
Log.e(TAG, "Index out of mEditTextList boundrary, should not happen");
}
@@ -698,7 +871,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
String[] items = text.split("\n");
int index = 0;
for (String item : items) {
- if(!TextUtils.isEmpty(item)) {
+ if (!TextUtils.isEmpty(item)) {
mEditTextList.addView(getListItem(item, index));
index++;
}
@@ -763,7 +936,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
Log.e(TAG, "Wrong index, should not happen");
return;
}
- if(hasText) {
+ if (hasText) {
mEditTextList.getChildAt(index).findViewById(R.id.cb_edit_item).setVisibility(View.VISIBLE);
} else {
mEditTextList.getChildAt(index).findViewById(R.id.cb_edit_item).setVisibility(View.GONE);
@@ -783,6 +956,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
mNoteEditor.setVisibility(View.VISIBLE);
}
}
+
//可以看首先对输入框内的文本进行非空判断,然后对这个CheckBox进行了判断是否选中,
// 但是最后都是在文本后加换行,然后把这个文本作为参数传给mWorkingNote的setWorkingText方法。
private boolean getWorkingText() {
@@ -808,7 +982,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
return hasChecked;
}
- private boolean saveNote() {
+ private boolean saveNote() {//把内容存到数据库里
getWorkingText();
boolean saved = mWorkingNote.saveNote();
if (saved) {
@@ -873,4 +1047,265 @@ public class NoteEditActivity extends Activity implements OnClickListener,
private void showToast(int resId, int duration) {
Toast.makeText(this, resId, duration).show();
}
+
+ //mine 261
+ private void showSoftInput() {//显示软键盘
+ InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);//获取方法的管理者对象
+ if (inputMethodManager != null) {
+ inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);//使软键盘显示,第二个参数hideFlags等于0
+ }
+ }
+
+ private void hideSoftInput(View view) {//隐藏软键盘
+ InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+ inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);//隐藏软键盘
+ }
+
+ private void setPwd() {//wait
+ final AlertDialog.Builder builder = new AlertDialog.Builder(this);//初始化对话框
+ View view = LayoutInflater.from(this).inflate(R.layout.dialog_pwd, null);//加载对话框的布局文件
+ final EditText etPwd = (EditText) view.findViewById(R.id.set_private_pwd);//初始化对话框里的文本对象
+ showSoftInput();//显示软键盘
+ builder.setPositiveButton(android.R.string.ok, null);//确定按钮
+ builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {//取消按钮
+ hideSoftInput(etPwd);//隐藏软键盘
+ }
+ });
+ final Dialog dialog = builder.setView(view).show();//显示出来
+ final Button positive = (Button) dialog.findViewById(android.R.id.button1);//加载确定按钮布局文件
+ positive.setOnClickListener(new OnClickListener() {
+ public void onClick(View v) {//设置确定按钮的接收器
+ hideSoftInput(etPwd);//点击确定后收起软键盘
+ String Password = etPwd.getText().toString();
+ if (!TextUtils.isEmpty(Password)) {//输入不为空
+ //Toast.makeText(getApplicationContext(), Password, Toast.LENGTH_SHORT).show();
+ //加到数据库里
+ mWorkingNote.setmPwd(Password);
+ saveNote();
+ mWorkingNote.setCheckListMode(mWorkingNote.getCheckListMode() == 0 ?//改workingnote的mMode的值,对应上文的界面设置
+ TextNote.MODE_PRIVATE_TYPE : 0, false);
+ }
+ dialog.dismiss();//撤销对话框
+ }
+
+ });
+ if (TextUtils.isEmpty(etPwd.getText())) {//如果文件夹名称为空,则不能选择确定按钮
+ positive.setEnabled(false);
+ }
+ etPwd.addTextChangedListener(new TextWatcher() {//添加文本更改监听器,即判断文本更改状态
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {//文本更改之前(未完成)
+ // TODO Auto-generated method stub
+ }
+ public void onTextChanged(CharSequence s, int start, int before, int count) {//当前文本改变触发,
+ if (TextUtils.isEmpty(etPwd.getText())) {//文本为空确定按键不可用,不为空则可用
+ positive.setEnabled(false);
+ } else {
+ positive.setEnabled(true);
+ }
+ }
+ public void afterTextChanged(Editable s) {//文本修改之后(未完成)
+ // TODO Auto-generated method stub
+ }
+ });
+ }
+
+ private void delPwd() {
+ //从数据库把password设置为‘’
+ mWorkingNote.delmPwd();
+ saveNote();
+ mWorkingNote.setCheckListMode(mWorkingNote.getCheckListMode() == 0 ?
+ TextNote.MODE_PRIVATE_TYPE : 0, false);
+ }
+ private void callGallery() {
+ ActivityCompat.requestPermissions(NoteEditActivity.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);//动态申请权限
+ ActivityCompat.requestPermissions(NoteEditActivity.this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1);//动态申请权限
+ Intent getAlbum = new Intent(Intent.ACTION_PICK);//隐私传递intent
+ getAlbum.setType("image/*");
+ startActivityForResult(getAlbum, 1);//以请求码为1(onActivityResult方法里会处理),开始活动。
+ }
+
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {//处理从图库中返回的图片。
+ switch (requestCode) {
+ case 1:
+ //对于上面的callGallery()方法
+ try {
+ // 获得图片的uri
+ Uri originalUri = data.getData();
+ String[] proj = {MediaStore.Images.Media.DATA};
+ //创建从数据库中查询的光标
+ Cursor cursor = getContentResolver().query(originalUri, proj, null, null, null);
+ //获得用户选择的图片的索引值
+ int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
+ // 将光标移至开头 ,这个很重要,不小心很容易引起越界
+ cursor.moveToFirst();
+ // 最后根据索引值获取图片路径
+ String path = cursor.getString(column_index);
+ //插入图片
+ insertImg(path);
+ } catch (Exception e) {
+ e.printStackTrace();
+ Toast.makeText(NoteEditActivity.this, "图片插入失败", Toast.LENGTH_SHORT).show();
+ }
+ break;
+ case 2://打开相机
+ try {
+ if(resultCode == RESULT_OK) {
+ saveCameraImage(data);
+ String tagPath = "";
+ SpannableString ss = new SpannableString(tagPath);
+ // 将拍摄的照片显示出来
+ insertPhotoToEditText(ss);
+ initImage();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ Toast.makeText(NoteEditActivity.this, "图片插入失败", Toast.LENGTH_SHORT).show();
+ }
+ break;
+ case 3://开始画画
+ try {
+ if (resultCode == RESULT_OK) {
+ String tagPath = "";
+ SpannableString ss = new SpannableString(tagPath);
+ // 将画显示出来
+ insertPhotoToEditText(ss);
+ initImage();
+ }
+ }catch (Exception e) {
+ e.printStackTrace();
+ Toast.makeText(NoteEditActivity.this, "画图失败", Toast.LENGTH_SHORT).show();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ private void insertImg(String path) {
+ String tagPath = "";//为图片路径加上标签
+ Bitmap bitmap = BitmapFactory.decodeFile(path);//根据路径找到图片
+ if (bitmap != null) {
+ //格式化存储路径
+ SpannableString ss = getBitmapMime(path, tagPath);
+ //将图片插入文本视图
+ insertPhotoToEditText(ss);
+ Log.d("insertimage", path + "与" + tagPath);
+ } else {
+ Toast.makeText(NoteEditActivity.this, "插入失败,无读写存储权限,请到权限中心开启", Toast.LENGTH_LONG).show();
+ }
+ }
+ private SpannableString getBitmapMime(String path, String tagPath) {
+ SpannableString ss = new SpannableString(tagPath);//这里使用加了标签的图片路径
+ int width = ScreenUtils.getScreenWidth(NoteEditActivity.this);
+ //int height = ScreenUtils.getScreenHeight(NoteEditActivity.this);
+ BitmapFactory.Options options = new BitmapFactory.Options();
+ //路径对应的图片
+ Bitmap bitmap = BitmapFactory.decodeFile(path, options);
+ //适应屏幕,锁定横纵比缩小图片。
+ bitmap = ImageUtils.zoomImage(bitmap, (width - 32) * 0.8,
+ bitmap.getHeight() / (bitmap.getWidth() / ((width - 32) * 0.8)));
+ ImageSpan imageSpan = new ImageSpan(this, bitmap);
+ ss.setSpan(imageSpan, 0, tagPath.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+ return ss;
+ }
+ private void insertPhotoToEditText(SpannableString ss) {//把文本插入便签,如
+ Editable et = mNoteEditor.getText();
+ int start = mNoteEditor.getSelectionStart();
+ ss.getSpans(0, ss.length(), ImageSpan.class);
+ // 将图片添加进EditText中
+ if (start < 0 || start >= et.length()) {
+ //如果是在文本的结尾
+ et.append(ss);
+ } else {
+ //如果是在文本的中间
+ et.insert(start, ss);
+ }
+ //将图片路径写入数据库——非常关键,否则无法显示图片
+ mWorkingNote.setWorkingText(et + "\n");
+ mNoteEditor.setText(et);
+ mNoteEditor.setSelection(start + ss.length());
+ mNoteEditor.setFocusableInTouchMode(true);
+ mNoteEditor.setFocusable(true);
+ }
+ private void initImage() {
+ String input = String.valueOf(mWorkingNote.getContent());
+ if (input != "null") {//创建新便签时,input的值是“null”,必须判断,不然创建的新便签都会有一个null的字符串
+ Pattern p = Pattern.compile("\\");
+ Matcher m = p.matcher(input);
+ SpannableString spannable = new SpannableString(input);
+ while (m.find()) {
+ String s = m.group();
+ int start = m.start();
+ int end = m.end();
+ String path = s.replaceAll("\\", "").trim();//得到路径
+
+ int width = ScreenUtils.getScreenWidth(NoteEditActivity.this);//屏幕的宽度
+ try {
+ BitmapFactory.Options options = new BitmapFactory.Options();
+ Bitmap bitmap = BitmapFactory.decodeFile(path, options);
+ //适应屏幕,锁定横纵比缩小图片。
+ bitmap = ImageUtils.zoomImage(bitmap, (width - 32) * 0.8,
+ bitmap.getHeight() / (bitmap.getWidth() / ((width - 32) * 0.8)));
+ ImageSpan imageSpan = new ImageSpan(NoteEditActivity.this, bitmap);
+ spannable.setSpan(imageSpan, start, end, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ mNoteEditor.setVisibility(View.VISIBLE);
+ mNoteEditor.setText(spannable);
+ }
+ }
+
+ private void startTakePhoto() {//打开相机的方法
+ Timestamp ts=new Timestamp(new Date().getTime());//用当前时间做一个时间戳,作为图片的名称
+ pathTakingPhoto = ts.toString().replace(":","_")+".jpg";//因为时间戳中 : 字符是不允许出现在文件名称中的
+ File outputImage = new File(getExternalCacheDir(), pathTakingPhoto);//将每次相机拍摄的图片存储下来
+ try {
+ outputImage.createNewFile();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ ActivityCompat.requestPermissions(NoteEditActivity.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);//动态申请权限
+ ActivityCompat.requestPermissions(NoteEditActivity.this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1);//动态申请权限
+ // 启动相机程序
+ Intent getAlbum = new Intent("android.media.action.IMAGE_CAPTURE");//隐私传递intent,打开相机
+ startActivityForResult(getAlbum, 2);//以请求码为2,开始活动
+ }
+ private void saveCameraImage(Intent data) {//存储图片至SD卡
+ // 检查sd card是否存在
+ if (!Environment.getExternalStorageState().equals(
+ Environment.MEDIA_MOUNTED)) {
+ Log.i(TAG, "sd card is not avaiable/writeable right now.");
+ return;
+ }
+ // 为图片命名啊
+ Bitmap bmp = (Bitmap) data.getExtras().get("data");// 解析返回的图片成bitmap
+ // 保存文件
+ FileOutputStream fos = null;
+ File file = new File(getExternalCacheDir(),pathTakingPhoto);
+ try {// 写入SD card
+ fos = new FileOutputStream(file.toString());
+ bmp.compress(Bitmap.CompressFormat.JPEG, 100, fos);
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ fos.flush();
+ fos.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ }
+ private void startDraw(){
+ ActivityCompat.requestPermissions(NoteEditActivity.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);//动态申请权限
+ ActivityCompat.requestPermissions(NoteEditActivity.this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1);//动态申请权限
+ // 启动相机程序
+ Intent getAlbum = new Intent(this,MyBoard.class);//传递intent,画板
+ startActivityForResult(getAlbum, 3);//以请求码为3,开始活动
+ }
}
diff --git a/src/app/src/main/java/net/micode/notes/ui/NoteItemData.java b/src/app/src/main/java/net/micode/notes/ui/NoteItemData.java
index f79d921..471c5a7 100644
--- a/src/app/src/main/java/net/micode/notes/ui/NoteItemData.java
+++ b/src/app/src/main/java/net/micode/notes/ui/NoteItemData.java
@@ -25,7 +25,7 @@ import net.micode.notes.data.Notes;
import net.micode.notes.data.Notes.NoteColumns;
import net.micode.notes.tool.DataUtils;
-
+//mine 5
public class NoteItemData {
static final String [] PROJECTION = new String [] {
NoteColumns.ID,
@@ -40,6 +40,7 @@ public class NoteItemData {
NoteColumns.TYPE,
NoteColumns.WIDGET_ID,
NoteColumns.WIDGET_TYPE,
+ NoteColumns.PASSWORD//mine
};
private static final int ID_COLUMN = 0;
@@ -54,6 +55,7 @@ public class NoteItemData {
private static final int TYPE_COLUMN = 9;
private static final int WIDGET_ID_COLUMN = 10;
private static final int WIDGET_TYPE_COLUMN = 11;
+ private static final int PASSWORD = 12;
private long mId;
private long mAlertDate;//提醒时间
@@ -69,6 +71,7 @@ public class NoteItemData {
private int mWidgetType;
private String mName;
private String mPhoneNumber;
+ private String mPassWord;
private boolean mIsLastItem;
private boolean mIsFirstItem;
@@ -91,6 +94,7 @@ public class NoteItemData {
mType = cursor.getInt(TYPE_COLUMN);
mWidgetId = cursor.getInt(WIDGET_ID_COLUMN);
mWidgetType = cursor.getInt(WIDGET_TYPE_COLUMN);
+ mPassWord=cursor.getString(PASSWORD);
mPhoneNumber = "";
if (mParentId == Notes.ID_CALL_RECORD_FOLDER) {
@@ -106,6 +110,7 @@ public class NoteItemData {
if (mName == null) {
mName = "";
}
+
checkPostion(cursor);
}
@@ -133,6 +138,9 @@ public class NoteItemData {
}
}
}
+ public String getmPassWord(){
+ return mPassWord;
+}
public boolean isOneFollowingFolder() {
return mIsOneNoteFollowingFolder;
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 aa1b000..093638d 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
@@ -16,6 +16,8 @@
package net.micode.notes.ui;
+import android.Manifest;
+import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
@@ -29,6 +31,12 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.gesture.Gesture;
+import android.gesture.GestureLibraries;
+import android.gesture.GestureLibrary;
+import android.gesture.GestureOverlayView;
+import android.gesture.Prediction;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
@@ -41,6 +49,7 @@ import android.view.ActionMode;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.Display;
+import android.view.GestureDetector;
import android.view.HapticFeedbackConstants;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -62,14 +71,18 @@ import android.widget.PopupMenu;
import android.widget.TextView;
import android.widget.Toast;
+import androidx.core.app.ActivityCompat;
+
import net.micode.notes.R;
import net.micode.notes.data.Notes;
import net.micode.notes.data.Notes.NoteColumns;
+import net.micode.notes.data.NotesDatabaseHelper;
import net.micode.notes.gtask.remote.GTaskSyncService;
import net.micode.notes.model.WorkingNote;
import net.micode.notes.tool.BackupUtils;
import net.micode.notes.tool.DataUtils;
import net.micode.notes.tool.ResourceParser;
+import net.micode.notes.tool.ScreenUtils;
import net.micode.notes.ui.NotesListAdapter.AppWidgetAttribute;
import net.micode.notes.widget.NoteWidgetProvider_2x;
import net.micode.notes.widget.NoteWidgetProvider_4x;
@@ -78,13 +91,14 @@ import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.util.ArrayList;
import java.util.HashSet;
public class NotesListActivity extends Activity implements OnClickListener, OnItemLongClickListener {//点击监听器和长按监听器两个接口
//final 表示不想被继承
private static final int FOLDER_NOTE_LIST_QUERY_TOKEN = 0;
//查询记号:当从数据库中查询调取相关数据时,这个TOKEN会起到一个标签或指示器的作用
- private static final int FOLDER_LIST_QUERY_TOKEN = 1;
+ private static final int FOLDER_LIST_QUERY_TOKEN = 1;
//文件夹请求(长按便签然后点移动到文件夹)
private static final int MENU_FOLDER_DELETE = 0;
@@ -93,10 +107,13 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
private static final int MENU_FOLDER_CHANGE_NAME = 2;
//上面三个是对文件夹长按操作要用到的数值
private static final String PREFERENCE_ADD_INTRODUCTION = "net.micode.notes.introduction";
+
//用于第一次打开小米便签的判断
private enum ListEditState {
NOTE_LIST, SUB_FOLDER, CALL_RECORD_FOLDER
- };
+ }
+ private NotesDatabaseHelper dbHelper = new NotesDatabaseHelper(this);
+
//enum是枚举
//编辑的三种状态,主界面,文件夹下和CALL_RECORD_FOLDER
//CALL_RECORD_FOLDER不清楚是什么界面
@@ -138,19 +155,53 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
+ NoteColumns.NOTES_COUNT + ">0)";
private final static int REQUEST_CODE_OPEN_NODE = 102;//打开某个便签时返回的
- private final static int REQUEST_CODE_NEW_NODE = 103;//新建便签时返回的
-
+ private final static int REQUEST_CODE_NEW_NODE = 103;//新建便签时返回的
+ private final static int GESTURE_SETTING = 104;
+ //mine 4
+ private String inputPwd;
+ private AlertDialog alertDialog1;
+ private GestureDetector mGestureDetector;
+ private GestureLibrary library;
+ private GestureOverlayView gestures_overlay;
+ private TextView gestureViewName;
+ private int GestureMode = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {//创建活动,为防止切换到别的活动时,因为内存不足此活动被回收,所以用存储的状态做参数
super.onCreate(savedInstanceState);//调用父类的创建,以保存的状态为参数
setContentView(R.layout.note_list);//设置视图
initResources();//初始化内容
-
+ GestureLoad();
/**
* Insert an introduction when user firstly use this application
*/
setAppInfoFromRawRes();//从Res文件下的资源,加载便签
}
+ private void GestureLoad(){
+ ActivityCompat.requestPermissions(NotesListActivity.this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1);//动态申请权限
+ //加载手势文件
+ if(GestureMode == 0) {//系统自定义数据库
+ library = GestureLibraries.fromRawResource(NotesListActivity.this, R.raw.gestures);
+ if (library.load()) {//加载数据库
+ Toast.makeText(NotesListActivity.this, "手势库加载成功", Toast.LENGTH_SHORT).show();
+ } else {
+ Toast.makeText(NotesListActivity.this, "手势库加载失败", Toast.LENGTH_SHORT).show();
+ }
+ }
+ else {//用户自定义数据库
+ library = GestureLibraries.fromFile("/mnt/sdcard/mygestures");
+ if (library.load()) {//加载数据库
+ Toast.makeText(NotesListActivity.this, "手势库加载成功", Toast.LENGTH_SHORT).show();
+ } else {
+ Toast.makeText(NotesListActivity.this, "手势库加载失败", Toast.LENGTH_SHORT).show();
+ GestureMode = 0;
+ }
+ }
+ }
+ @Override
+ protected void onStart() {//在onActivityResult之后调用,此活动变为可见时使用
+ super.onStart();//调用父类,启动活动
+ startAsyncNotesListQuery();//同步便签列表
+ }
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {//从一个活动被销毁时,转换成另一个活动时会调用
@@ -158,54 +209,49 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
&& (requestCode == REQUEST_CODE_OPEN_NODE || requestCode == REQUEST_CODE_NEW_NODE)) {
mNotesListAdapter.changeCursor(null);//从编辑界面返回应该把在便签内的光标删除
//RESULT_OK是另外一个活动返回的数据,保存便签时会出现,删除与桌面挂件有关联的便签或文件夹会出现
+ }else if(resultCode == RESULT_OK && requestCode == GESTURE_SETTING)
+ {
+ GestureMode = 1;
+ GestureLoad();
} else {
super.onActivityResult(requestCode, resultCode, data);//调用父类的方法
}
}
-//try语句允许我们定义在执行时进行错误测试的代码块。
+
+ //try语句允许我们定义在执行时进行错误测试的代码块。
//catch 语句允许我们定义当 try 代码块发生错误时,所执行的代码块。
//finally 语句在 try 和 catch 之后无论有无异常都会执行。
@TargetApi(Build.VERSION_CODES.KITKAT)
private void setAppInfoFromRawRes() {
- //作用:从res中的raw文件夹中导入资源,具体来说,载入一开始的便签的内容
+ //作用:从res中的raw文件夹中导入资源,具体来说,载入一开始的便签的内容
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
if (!sp.getBoolean(PREFERENCE_ADD_INTRODUCTION, false)) {
//getBoolean :判断if 不存在第一个参数,返回false的值。这里如果是第一次进入小米便签,则执行下面的语句
StringBuilder sb = new StringBuilder();//代表一个字符序列可变的字符串,线程不安全,但性能较高
InputStream in = null;
try {
- in = getResources().openRawResource(R.raw.introduction);//加载Welcome to use MIUI notes!
- //if (in != null) {
- try(InputStreamReader isr = new InputStreamReader(in);BufferedReader br = new BufferedReader(isr);){
+ in = getResources().openRawResource(R.raw.introduction);//加载Welcome to use MIUI notes!
+ try (InputStreamReader isr = new InputStreamReader(in); BufferedReader br = new BufferedReader(isr);) {
//使用指定的字符集读取字节并将它们解码为字符
//缓冲区流读入
- char [] buf = new char[1024];
+ char[] buf = new char[1024];
int len = 0;
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
//e.printStackTrace();//在命令行打印异常信息在程序中出错的位置及原因
- Log.e(TAG, "setAppInfoFromRawRes: " + e.toString() );
+ Log.e(TAG, "setAppInfoFromRawRes: " + e.toString());
return;
} finally {
-
- if(in != null) {
+ if (in != null) {
try {
in.close();
} catch (IOException e) {
- // TODO Auto-generated catch block
- //e.printStackTrace();//同上,异常处理
- Log.e(TAG, "setAppInfoFromRawRes: " + e.toString() );
+ Log.e(TAG, "setAppInfoFromRawRes: " + e.toString());
}
-
}
}
@@ -222,12 +268,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
}
}
- @Override
- protected void onStart() {//在onActivityResult之后调用,此活动变为可见时使用
- super.onStart();//调用父类,启动活动
- startAsyncNotesListQuery();//同步便签列表
- }
-
+ @SuppressLint({"ClickableViewAccessibility", "WrongViewCast"})
private void initResources() {
mContentResolver = this.getContentResolver();//获取应用数据
mBackgroundQueryHandler = new BackgroundQueryHandler(this.getContentResolver());//?
@@ -237,6 +278,12 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
null, false);//增加页脚 ?
mNotesListView.setOnItemClickListener(new OnListItemClickListener());//设置视图点击监听器
mNotesListView.setOnItemLongClickListener(this);//设置长按监听器
+ mNotesListView.setOnTouchListener(new OnTouchListener() {//mine
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ return mGestureDetector.onTouchEvent(event);//此处为传递
+ }
+ });//mine
mNotesListAdapter = new NotesListAdapter(this);//设置便签视图配置器
mNotesListView.setAdapter(mNotesListAdapter);
mAddNewNote = (Button) findViewById(R.id.btn_new_note);//获得最下方的创建便签的按键
@@ -248,8 +295,100 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
mTitleBar = (TextView) findViewById(R.id.tv_title_bar);//文件夹下的标头
mState = ListEditState.NOTE_LIST;//设置状态为主界面
mModeCallBack = new ModeCallback();//对便签的方法调用,删除和移动
+ inputPwd = "";//mine
+ mGestureDetector = new GestureDetector(new gesturelistener());
+ gestures_overlay = (GestureOverlayView) findViewById(R.id.gesture_view);
+ gestures_overlay.addOnGesturePerformedListener(new gestureOverlayListener());
+ gestureViewName = findViewById(R.id.gesture_view_name);
}
+ //设置监听
+ private class gestureOverlayListener implements GestureOverlayView.OnGesturePerformedListener {//mine
+ @Override
+ public void onGesturePerformed(GestureOverlayView overlay,
+ Gesture gesture) {
+ //识别手势: 通过 library 读取手势文件 ,在这里读取
+ //这个列表包含定义好的手势,可以理解为键值对(名字:手势)
+ ArrayList predictions=library.recognize(gesture);
+ //这是绘制的手势,等下在手势数据库中比对
+ Prediction prediction=predictions.get(0);
+ //更加相似度 来 取得 区间(0.0~10.0 大致区间)
+ if(prediction.score>=3.0) {
+ //通过 name 来判断 值
+ if (prediction.name.equals("Create New Folder")) {
+ showCreateOrModifyFolderDialog(true);
+ }
+ else if(prediction.name.equals("Create Normal Note")) {
+ createNewNote(0);
+ }
+ else if(prediction.name.equals("Create Event Note")) {
+ createNewNote(1);
+ }
+ else if(prediction.name.equals("Create Contact Note")) {
+ createNewNote(2);
+ }
+ else if(prediction.name.equals("Create Passwd Note")) {
+ createNewNote(3);
+ }
+ }
+ else{
+ Toast.makeText(NotesListActivity.this,"手势无法匹配或者手势不存在",Toast.LENGTH_LONG);
+ }
+ gestures_overlay.setVisibility(View.GONE);//相应完将手势响应视图设置为不可见
+ gestureViewName.setVisibility(View.GONE);
+ }
+ }
+ private class gesturelistener implements GestureDetector.OnGestureListener{//mine
+
+ public boolean onDown(MotionEvent e) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+ public void onShowPress(MotionEvent e) {
+ // TODO Auto-generated method stub
+ }
+ public boolean onSingleTapUp(MotionEvent e) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+ public boolean onScroll(MotionEvent e1, MotionEvent e2,
+ float distanceX, float distanceY) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+ public void onLongPress(MotionEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+ public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
+ float velocityY) {
+ float minMoveY = ScreenUtils.getScreenHeight(NotesListActivity.this)/4;// 最小滑动距离Y
+ float minVelocityY = ScreenUtils.getScreenHeight(NotesListActivity.this)/3;// 最小滑动速度Y
+ float minMoveX = ScreenUtils.getScreenWidth(NotesListActivity.this)/3; // 最小滑动距离X
+ float minVelocityX = ScreenUtils.getScreenWidth(NotesListActivity.this)/2; // 最小滑动速度X
+ float beginX = e1.getX();
+ float endX = e2.getX();
+ float beginY = e1.getY();
+ float endY = e2.getY();
+ int normalGestureCase = 0;
+ if (Math.abs(beginX - endX) > minMoveX && Math.abs(beginY-endY) > minMoveY){//无效滑动
+ normalGestureCase = 0;
+ } else if (beginX - endX > minMoveX && Math.abs(velocityX) > minVelocityX) { // 左滑
+ normalGestureCase = 1;
+ }else if(endY - beginY > minMoveY && Math.abs(velocityY) > minVelocityY){//下滑
+ normalGestureCase = 2;
+ }
+ if(normalGestureCase == 1){
+ startPreferenceActivity();
+ }
+ else if(normalGestureCase == 2){
+ Toast.makeText(NotesListActivity.this,"进入手势界面",Toast.LENGTH_LONG);
+ gestures_overlay.setVisibility(View.VISIBLE);
+ gestureViewName.setVisibility(View.VISIBLE);
+ }
+ return true;
+ }
+ }
private class ModeCallback implements ListView.MultiChoiceModeListener, OnMenuItemClickListener {//对便签的方法调用,删除和移动,继承多选监听器(用于批量处理便签)和菜单点击监听器
private DropdownMenu mDropDownMenu;//下拉的菜单
private ActionMode mActionMode;//表面目前进行的是删除还是移动
@@ -273,12 +412,12 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
mAddNewNote.setVisibility(View.GONE);//选择模式下,不能添加性便签
View customView = LayoutInflater.from(NotesListActivity.this).inflate(
- R.layout.note_list_dropdown_menu, null);//?
+ R.layout.note_list_dropdown_menu, null);//
mode.setCustomView(customView);
mDropDownMenu = new DropdownMenu(NotesListActivity.this,
(Button) customView.findViewById(R.id.selection_menu),
R.menu.note_list_dropdown);//
- mDropDownMenu.setOnDropdownMenuItemClickListener(new PopupMenu.OnMenuItemClickListener(){
+ mDropDownMenu.setOnDropdownMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
public boolean onMenuItemClick(MenuItem item) {//点击全选
mNotesListAdapter.selectAll(!mNotesListAdapter.isAllSelected());//把便签全选
updateMenu();//更新菜单界面
@@ -325,9 +464,10 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
public void finishActionMode() {
mActionMode.finish();
}
-//here
+
+ //here
public void onItemCheckedStateChanged(ActionMode mode, int position, long id,
- boolean checked) {
+ boolean checked) {
mNotesListAdapter.setCheckedItem(position, checked);
updateMenu();
}
@@ -341,20 +481,26 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
switch (item.getItemId()) {
case R.id.delete:
+ if(WithoutPassword()){
AlertDialog.Builder builder = new AlertDialog.Builder(NotesListActivity.this);
builder.setTitle(getString(R.string.alert_title_delete));
builder.setIcon(android.R.drawable.ic_dialog_alert);
builder.setMessage(getString(R.string.alert_message_delete_notes,
- mNotesListAdapter.getSelectedCount()));
+ mNotesListAdapter.getSelectedCount()));
builder.setPositiveButton(android.R.string.ok,
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog,
- int which) {
- batchDelete();
- }
- });
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog,
+ int which) {
+ Log.e(TAG, "onClick: which:" + which );
+ batchDelete();
+ }
+ });
builder.setNegativeButton(android.R.string.cancel, null);
builder.show();
+ }
+ else{
+ Toast.makeText(getApplicationContext(),"不能删除含有密码的便签",Toast.LENGTH_SHORT).show();
+ }
break;
case R.id.move:
startQueryDestinationFolders();//查询目的文件夹
@@ -365,10 +511,29 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
return true;
}
}
+ public boolean WithoutPassword(){//mine 20
+ SQLiteDatabase db = null;//数据库对象
+ for (long id:mNotesListAdapter.getSelectedItemIds()) {
+ try{
+ db = dbHelper.getWritableDatabase();
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ Cursor cursor = db.query("note", new String[]{NoteColumns.ID,NoteColumns.PASSWORD},//对数据库查询的光标
+ "_id = ?",new String[]{String.valueOf(id)},null,null,null);
+ cursor.moveToFirst();//防止遗漏,先把光标移到最上面
+ String p = cursor.getString(cursor.getColumnIndex("note_password"));//找对应的密码
+ if(!p.equals(""))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
//Ontouch 可以获得更多的信息,比如多点,触摸的强度,按下,松开,拖动等。。。。
//但Onclick 只适用于组件的事件触发
private class NewNoteOnTouchListener implements OnTouchListener {
-
public boolean onTouch(View v, MotionEvent event) {//行为动作和视图
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN: {
@@ -432,26 +597,29 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
return false;
}
- };
+ }
private void startAsyncNotesListQuery() {//同步便签列表
String selection = (mCurrentFolderId == Notes.ID_ROOT_FOLDER) ? ROOT_FOLDER_SELECTION
: NORMAL_SELECTION;//如果当前ID和父文件夹ID相同,则为父文件夹模式,否则是常规模式
mBackgroundQueryHandler.startQuery(FOLDER_NOTE_LIST_QUERY_TOKEN, null,
- Notes.CONTENT_NOTE_URI, NoteItemData.PROJECTION, selection, new String[] {
- String.valueOf(mCurrentFolderId)//后台异步对数据库进行操作,加快数据处理速度
+ Notes.CONTENT_NOTE_URI, NoteItemData.PROJECTION, selection, new String[]{
+ String.valueOf(mCurrentFolderId)//后台异步对数据库进行操作,加快数据处理速度
}, NoteColumns.TYPE + " DESC," + NoteColumns.MODIFIED_DATE + " DESC");
}
-//3.函数:AsyncQueryHandler异步查询操作帮助类,可以处理增删改ContentProvider提供的数据。
-// 通过提供onxxxComplete的回调窗口,实现事件的完成处理,API中提供Insert,Delete,updata,Query四种方法,
-// BackgroundQueryHandler继承这个类,可以实现对数据库的查询操作
+
+ //3.函数:AsyncQueryHandler异步查询操作帮助类,可以处理增删改ContentProvider提供的数据。
+ // 通过提供onxxxComplete的回调窗口,实现事件的完成处理,API中提供Insert,Delete,updata,Query四种方法,
+ // BackgroundQueryHandler继承这个类,可以实现对数据库的查询操作
private final class BackgroundQueryHandler extends AsyncQueryHandler {//背景处理
+
//可以使用Activity提供的getContentResolver()方法来获取ContentResolver对象
public BackgroundQueryHandler(ContentResolver contentResolver) {//使用ContentResolver调用ContentProvider提供的接口,
// 对ContentProvider中的数据进行添加、删除、修改和查询操作时
super(contentResolver);
}
-//1.异步查询框架AsyncQueryHandler,当单查询完毕后,会调用onQueryComplete(token, cookie, cursor)通知查询完毕,并且传回cursor
+
+ //1.异步查询框架AsyncQueryHandler,当单查询完毕后,会调用onQueryComplete(token, cookie, cursor)通知查询完毕,并且传回cursor
@Override
protected void onQueryComplete(int token, Object cookie, Cursor cursor) {//token判断情况,cookie,cursor光标判断选择的那个
switch (token) {
@@ -492,9 +660,11 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
builder.show();//显示对话框
}
- private void createNewNote() {//创建新便签
+ private void createNewNote(int openMode) {//mine 2
Intent intent = new Intent(this, NoteEditActivity.class);
intent.setAction(Intent.ACTION_INSERT_OR_EDIT);
+ intent.putExtra("password","");
+ intent.putExtra("open_mode",openMode);
intent.putExtra(Notes.INTENT_EXTRA_FOLDER_ID, mCurrentFolderId);
//putExtra(“A”,B)中,AB为键值对,第一个参数为键名,第二个参数为键对应的值。
// 顺便提一下,如果想取出Intent对象中的这些值,需要在你的另一个Activity中用getXXXXXExtra方法,
@@ -566,13 +736,17 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
}
}
- private void openNode(NoteItemData data) {//打开便签,参数为数据
+
+
+ private void openNode(NoteItemData data) {//打开便签,参数为数据 mine 2
Intent intent = new Intent(this, NoteEditActivity.class);
intent.setAction(Intent.ACTION_VIEW);
+ intent.putExtra("password",inputPwd);
+ inputPwd = "";
intent.putExtra(Intent.EXTRA_UID, data.getId());
this.startActivityForResult(intent, REQUEST_CODE_OPEN_NODE);
-
}
+
private void openFolder(NoteItemData data) {//.打开文件夹
mCurrentFolderId = data.getId();//获取当前文件夹的id
startAsyncNotesListQuery();//开始开始异步的便签列表反馈
@@ -586,15 +760,17 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
mTitleBar.setText(R.string.call_record_folder_name);//title设置为call notes
} else {
mTitleBar.setText(data.getSnippet());//否则文本的前部片段内容,即文件夹名称
- Log.d(TAG,data.getSnippet());
+ Log.d(TAG, data.getSnippet());
}
mTitleBar.setVisibility(View.VISIBLE);//设置title可见
}
+
+
public void onClick(View v) {//文件夹界面的点击相应的函数
switch (v.getId()) {
case R.id.btn_new_note://创建新便签
- createNewNote();
+ showList();
break;
default:
break;
@@ -621,7 +797,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
if (!create) {//给文件夹改名
if (mFocusNoteDataItem != null) {
etName.setText(mFocusNoteDataItem.getSnippet());//提取文件夹的title
- Log.d(TAG,mFocusNoteDataItem.getSnippet());
+ Log.d(TAG, mFocusNoteDataItem.getSnippet());
builder.setTitle(getString(R.string.menu_folder_change_name));//设置文本框,内容是change_name
} else {
Log.e(TAG, "The long click data item is null");
@@ -640,7 +816,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
});
final Dialog dialog = builder.setView(view).show();//显示出来
- final Button positive = (Button)dialog.findViewById(android.R.id.button1);//加载确定按钮布局文件
+ final Button positive = (Button) dialog.findViewById(android.R.id.button1);//加载确定按钮布局文件
positive.setOnClickListener(new OnClickListener() {
public void onClick(View v) {//设置确定按钮的接收器
hideSoftInput(etName);//点击确定后收起软键盘
@@ -658,8 +834,8 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
values.put(NoteColumns.TYPE, Notes.TYPE_FOLDER);//存储类型为文件夹
values.put(NoteColumns.LOCAL_MODIFIED, 1);//local_modified对应1 添加值到value里
mContentResolver.update(Notes.CONTENT_NOTE_URI, values, NoteColumns.ID
- + "=?", new String[] {
- String.valueOf(mFocusNoteDataItem.getId())
+ + "=?", new String[]{
+ String.valueOf(mFocusNoteDataItem.getId())
});//将内容笔记URI及笔记专栏ID更新至内容解决器
}
} else if (!TextUtils.isEmpty(name)) {//如果是新建,输入不空
@@ -734,8 +910,8 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
return;
}
- intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[] {
- appWidgetId
+ intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[]{
+ appWidgetId
});//储存id的键值对
sendBroadcast(intent);//发送广播
@@ -798,6 +974,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
@Override
public boolean onPrepareOptionsMenu(Menu menu) {//准备菜单,根据不同的状态加载不同的菜单
menu.clear();//先把原先的菜单删除
+
if (mState == ListEditState.NOTE_LIST) {
getMenuInflater().inflate(R.menu.note_list, menu);
// set sync or sync_cancel
@@ -810,13 +987,29 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
} else {
Log.e(TAG, "Wrong state:" + mState);
}
+ if (GestureMode == 0){
+ menu.findItem(R.id.default_gesture).setVisible(false);
+ }
+ else if (GestureMode == 1){
+ menu.findItem(R.id.set_gesture).setVisible(false);
+ }
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {//六个菜单
- switch (item.getItemId()) {
- case R.id.menu_countAllNotes:{
+ switch (item.getItemId()) {//mine 6
+ case R.id.set_gesture: {
+ startSetting();
+ Toast.makeText(NotesListActivity.this,"启用自定义手势",Toast.LENGTH_LONG);
+ break;
+ }
+ case R.id.default_gesture:{
+ GestureMode = 0;
+ Toast.makeText(NotesListActivity.this,"启用默认手势",Toast.LENGTH_LONG);
+ break;
+ }
+ case R.id.menu_countAllNotes: {
showNumberofNotes();
break;
}
@@ -845,7 +1038,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
break;
}
case R.id.menu_new_note: {
- createNewNote();
+ showList();
break;
}
case R.id.menu_search:
@@ -857,18 +1050,36 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
return true;
}
-
-
+ private void startSetting(){
+ Intent intent = new Intent(NotesListActivity.this, GestureSetting.class);
+ this.startActivityForResult(intent,GESTURE_SETTING);
+ }
@Override
public boolean onSearchRequested() {//查找功能
startSearch(null, false, null /* appData */, false);//好像还没实现
return true;
}
- private void showNumberofNotes() {
+ public void showList(){//mine 12
+ final String[] items = {"普通便签", "事件便签", "联系人便签", "密码便签"};
+ AlertDialog.Builder alertBuilder = new AlertDialog.Builder(this);
+ alertBuilder.setTitle("选择创建的便签");
+ alertBuilder.setItems(items, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialogInterface, int i) {
+ createNewNote(i);
+ Toast.makeText(NotesListActivity.this, items[i], Toast.LENGTH_SHORT).show();
+ alertDialog1.dismiss();
+ }
+ });
+ alertDialog1 = alertBuilder.create();
+ alertDialog1.show();
+ }
+ private void showNumberofNotes() {// mine 4
StringBuilder strbdr = new StringBuilder("");
strbdr.append("当前有 " + Integer.toString(mNotesListAdapter.retCount()) + " 个便签");
Toast.makeText(this, strbdr.toString(), Toast.LENGTH_LONG).show();
}
+
private void exportNoteToText() {//输出便签到SD卡
final BackupUtils backup = BackupUtils.getInstance(NotesListActivity.this);//备份笔记信息
new AsyncTask() {
@@ -922,7 +1133,8 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
}
private class OnListItemClickListener implements OnItemClickListener {//监听列表点击监听器,接口是OnItemClickListener
-//position代表选中的便签项在视图中的索引
+
+ //position代表选中的便签项在视图中的索引
public void onItemClick(AdapterView> parent, View view, int position, long id) {//项目被点击的响应
if (view instanceof NotesListItem) {//判断view是否是NotesListItem的一个实例,如果是就获取他的项目信息装入item中
NoteItemData item = ((NotesListItem) view).getItemData();
@@ -941,7 +1153,8 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|| item.getType() == Notes.TYPE_SYSTEM) {
openFolder(item);//如果点到文件夹,就打开
} else if (item.getType() == Notes.TYPE_NOTE) {
- openNode(item);//打开便签
+ testNode(item);// 有个判断
+
} else {
Log.e(TAG, "Wrong note type in NOTE_LIST");
}
@@ -949,7 +1162,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
case SUB_FOLDER:
case CALL_RECORD_FOLDER://子文件夹下的情况
if (item.getType() == Notes.TYPE_NOTE) {
- openNode(item);
+ testNode(item);
} else {
Log.e(TAG, "Wrong note type in SUB_FOLDER");
}
@@ -961,18 +1174,70 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
}
}
+ public void testNode(final NoteItemData item){//mine 52
+ if(item.getmPassWord().equals(""))//判断是否有密码,如果没有密码,那么item.getmPassWord()返回的值就是空字符串
+ {
+ openNode(item);
+ }
+ else{
+ final AlertDialog.Builder builder = new AlertDialog.Builder(this);//初始化对话框
+ View view = LayoutInflater.from(this).inflate(R.layout.dialog_pwd, null);//加载对话框的布局文件
+ final EditText etPwd = (EditText) view.findViewById(R.id.set_private_pwd);//初始化对话框里的文本对象
+ showSoftInput();//显示软键盘
+ builder.setPositiveButton(android.R.string.ok, null);//确定按钮
+ builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {//取消按钮
+ hideSoftInput(etPwd);//隐藏软键盘
+ }
+ });
+ final Dialog dialog = builder.setView(view).show();//显示出来
+ final Button positive = (Button)dialog.findViewById(android.R.id.button1);//加载确定按钮布局文件
+ positive.setOnClickListener(new OnClickListener() {
+ public void onClick(View v) {//设置确定按钮的接收器
+ hideSoftInput(etPwd);//点击确定后收起软键盘
+ String Password = etPwd.getText().toString();//文本框里的输入值
+ if (!TextUtils.isEmpty(Password)) {//输入不为空
+ inputPwd = Password;
+ openNode(item);
+ }
+ dialog.dismiss();//撤销对话框
+
+ }
+
+ });
+ if (TextUtils.isEmpty(etPwd.getText())) {//如果文件夹名称为空,则不能选择确定按钮
+ positive.setEnabled(false);
+ }
+
+ etPwd.addTextChangedListener(new TextWatcher() {//添加文本更改监听器,即判断文本更改状态
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {//文本更改之前(未完成)
+ // TODO Auto-generated method stub
+ }
+ public void onTextChanged(CharSequence s, int start, int before, int count) {//当前文本改变触发,
+ if (TextUtils.isEmpty(etPwd.getText())) {//文本为空确定按键不可用,不为空则可用
+ positive.setEnabled(false);
+ } else {
+ positive.setEnabled(true);
+ }
+ }
+ public void afterTextChanged(Editable s) {//文本修改之后(未完成)
+ // TODO Auto-generated method stub
+ }
+ });
+ }
+ }
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 + ")";
+ selection = (mState == ListEditState.NOTE_LIST) ? selection :
+ "(" + selection + ") OR (" + NoteColumns.ID + "=" + Notes.ID_ROOT_FOLDER + ")";
mBackgroundQueryHandler.startQuery(FOLDER_LIST_QUERY_TOKEN,
null,
Notes.CONTENT_NOTE_URI,
FoldersListAdapter.PROJECTION,
selection,
- new String[] {
+ new String[]{
String.valueOf(Notes.TYPE_FOLDER),
String.valueOf(Notes.ID_TRASH_FOLER),
String.valueOf(mCurrentFolderId)
@@ -997,5 +1262,4 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
return false;
}
-
}
diff --git a/src/app/src/main/java/net/micode/notes/ui/NotesListItem.java b/src/app/src/main/java/net/micode/notes/ui/NotesListItem.java
index eb2b430..42b6e39 100644
--- a/src/app/src/main/java/net/micode/notes/ui/NotesListItem.java
+++ b/src/app/src/main/java/net/micode/notes/ui/NotesListItem.java
@@ -29,7 +29,7 @@ import net.micode.notes.data.Notes;
import net.micode.notes.tool.DataUtils;
import net.micode.notes.tool.ResourceParser.NoteItemBgResources;
//构建便签列表的各个项目的详细具体信息,如显示提醒标签的图标,设置列表项的背景颜色,继承线性列表,例如设置便签最后修改时间等
-
+//mine 12
public class NotesListItem extends LinearLayout {
private ImageView mAlert;//提醒的图片视图
private TextView mTitle;//标题的文本视图
@@ -37,6 +37,7 @@ public class NotesListItem extends LinearLayout {
private TextView mCallName;//CallName的文本视图
private NoteItemData mItemData;//便签数据项
private CheckBox mCheckBox;//选择模式下,便签项前勾选的列表
+ private ImageView mKey;//提醒的图片视图
public NotesListItem(Context context) {//加载视图和对应的资源文件
super(context);
@@ -46,6 +47,7 @@ public class NotesListItem extends LinearLayout {
mTime = (TextView) findViewById(R.id.tv_time);
mCallName = (TextView) findViewById(R.id.tv_name);
mCheckBox = (CheckBox) findViewById(android.R.id.checkbox);
+ mKey = (ImageView) findViewById(R.id.for_key);
}
public void bind(Context context, NoteItemData data, boolean choiceMode, boolean checked) {//对于当前列表的每一项,都需要绑定对于的checkBox
@@ -75,6 +77,12 @@ public class NotesListItem extends LinearLayout {
} else {
mAlert.setVisibility(View.GONE);
}
+ if(!data.getmPassWord().equals("") && data.getType() == Notes.TYPE_NOTE){//如果便签为私密便签
+ mKey.setImageResource(R.drawable.key);
+ mKey.setVisibility(View.VISIBLE);
+ } else {
+ mKey.setVisibility(View.GONE);
+ }
} else {
mCallName.setVisibility(View.GONE);//设置联系人姓名不可见
mTitle.setTextAppearance(context, R.style.TextAppearancePrimaryItem);
@@ -92,6 +100,12 @@ public class NotesListItem extends LinearLayout {
} else {
mAlert.setVisibility(View.GONE);
}
+ if(!data.getmPassWord().equals("") && data.getType() == Notes.TYPE_NOTE){
+ mKey.setImageResource(R.drawable.key);
+ mKey.setVisibility(View.VISIBLE);
+ } else {
+ mKey.setVisibility(View.GONE);
+ }
}
}
mTime.setText(DateUtils.getRelativeTimeSpanString(data.getModifiedDate()));//设置最后一次改变的时间
diff --git a/src/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java b/src/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java
index c1ea444..75d2256 100644
--- a/src/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java
+++ b/src/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java
@@ -27,6 +27,9 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
+import android.gesture.Gesture;
+import android.gesture.GestureOverlayView;
+import android.gesture.Prediction;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
@@ -34,9 +37,11 @@ import android.preference.PreferenceActivity;
import android.preference.PreferenceCategory;
import android.text.TextUtils;
import android.text.format.DateFormat;
+import android.view.GestureDetector;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
+import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
@@ -46,6 +51,10 @@ import net.micode.notes.R;
import net.micode.notes.data.Notes;
import net.micode.notes.data.Notes.NoteColumns;
import net.micode.notes.gtask.remote.GTaskSyncService;
+import net.micode.notes.tool.ScreenUtils;
+
+import java.util.ArrayList;
+
//主要是用于登录账号;将便签的内容与Google Task上的数据进行同步;设置新建便签默认颜色随机等
// 类:NotesPreferenceActivity,在小米便签中主要实现的是对背景颜色和字体大小的数据储存。
// 继承了PreferenceActivity主要功能为对系统信息和配置进行自动保存的Activity
diff --git a/src/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java b/src/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java
index 77fefd7..95a4875 100644
--- a/src/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java
+++ b/src/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java
@@ -71,27 +71,27 @@ 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++) {
+ for (int i = 0; i < appWidgetIds.length; i++) {//扫描所有的桌面挂件
if (appWidgetIds[i] != 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.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);//下面有关intent的操作,都是准备传递数据
intent.putExtra(Notes.INTENT_EXTRA_WIDGET_ID, appWidgetIds[i]);
intent.putExtra(Notes.INTENT_EXTRA_WIDGET_TYPE, getWidgetType());
Cursor c = getNoteWidgetInfo(context, appWidgetIds[i]);
- if (c != null && c.moveToFirst()) {
+ if (c != null && c.moveToFirst()) {//判断桌面挂件是否关联便签
if (c.getCount() > 1) {
Log.e(TAG, "Multiple message with same widget id:" + appWidgetIds[i]);
c.close();
return;
- }
+ }//
snippet = c.getString(COLUMN_SNIPPET);
bgId = c.getInt(COLUMN_BG_COLOR_ID);
intent.putExtra(Intent.EXTRA_UID, c.getLong(COLUMN_ID));
intent.setAction(Intent.ACTION_VIEW);
- } else {
+ } else {//没有关联
snippet = context.getResources().getString(R.string.widget_havenot_content);
intent.setAction(Intent.ACTION_INSERT_OR_EDIT);
}
diff --git a/src/app/src/main/res/drawable-hdpi/huaban.png b/src/app/src/main/res/drawable-hdpi/huaban.png
new file mode 100644
index 0000000..9c9eaff
Binary files /dev/null and b/src/app/src/main/res/drawable-hdpi/huaban.png differ
diff --git a/src/app/src/main/res/drawable-hdpi/list_background.png b/src/app/src/main/res/drawable-hdpi/list_background.png
index 087e1f9..df34362 100644
Binary files a/src/app/src/main/res/drawable-hdpi/list_background.png and b/src/app/src/main/res/drawable-hdpi/list_background.png differ
diff --git a/src/app/src/main/res/layout/dialog_pwd.xml b/src/app/src/main/res/layout/dialog_pwd.xml
new file mode 100644
index 0000000..ca37a18
--- /dev/null
+++ b/src/app/src/main/res/layout/dialog_pwd.xml
@@ -0,0 +1,7 @@
+
+
diff --git a/src/app/src/main/res/layout/dialog_save.xml b/src/app/src/main/res/layout/dialog_save.xml
new file mode 100644
index 0000000..311b472
--- /dev/null
+++ b/src/app/src/main/res/layout/dialog_save.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/src/main/res/layout/gesture_setting.xml b/src/app/src/main/res/layout/gesture_setting.xml
new file mode 100644
index 0000000..4466566
--- /dev/null
+++ b/src/app/src/main/res/layout/gesture_setting.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/src/main/res/layout/myboard.xml b/src/app/src/main/res/layout/myboard.xml
new file mode 100644
index 0000000..5f142c1
--- /dev/null
+++ b/src/app/src/main/res/layout/myboard.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/src/main/res/layout/note_edit.xml b/src/app/src/main/res/layout/note_edit.xml
index c0a8bfb..f1c738b 100644
--- a/src/app/src/main/res/layout/note_edit.xml
+++ b/src/app/src/main/res/layout/note_edit.xml
@@ -30,6 +30,12 @@
android:id="@+id/note_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
+
+
+
diff --git a/src/app/src/main/res/layout/note_list.xml b/src/app/src/main/res/layout/note_list.xml
index e163cf4..377801d 100644
--- a/src/app/src/main/res/layout/note_list.xml
+++ b/src/app/src/main/res/layout/note_list.xml
@@ -25,7 +25,14 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
-
+
+
+
+ android:id="@+id/menu_setPrivate"
+ android:title="@string/menu_SetPrivate"/>
+
+
+
+
\ No newline at end of file
diff --git a/src/app/src/main/res/menu/note_list.xml b/src/app/src/main/res/menu/note_list.xml
index 34cd21b..7c5b3b0 100644
--- a/src/app/src/main/res/menu/note_list.xml
+++ b/src/app/src/main/res/menu/note_list.xml
@@ -40,4 +40,10 @@
+
+
diff --git a/src/app/src/main/res/raw-zh-rCN/contact.txt b/src/app/src/main/res/raw-zh-rCN/contact.txt
new file mode 100644
index 0000000..b12b1fa
--- /dev/null
+++ b/src/app/src/main/res/raw-zh-rCN/contact.txt
@@ -0,0 +1,8 @@
+联系人姓名:
+年龄:
+性别:
+生日:
+关系:
+地址:
+qq号码:
+微信号码:
diff --git a/src/app/src/main/res/raw-zh-rCN/event.txt b/src/app/src/main/res/raw-zh-rCN/event.txt
new file mode 100644
index 0000000..aa77f04
--- /dev/null
+++ b/src/app/src/main/res/raw-zh-rCN/event.txt
@@ -0,0 +1,5 @@
+事件名称:
+优先级:
+发生时间:
+参与人物:
+需做的准备:
diff --git a/src/app/src/main/res/raw-zh-rCN/gestures.txt b/src/app/src/main/res/raw-zh-rCN/gestures.txt
new file mode 100644
index 0000000..564059f
Binary files /dev/null and b/src/app/src/main/res/raw-zh-rCN/gestures.txt differ
diff --git a/src/app/src/main/res/raw-zh-rCN/passwd b/src/app/src/main/res/raw-zh-rCN/passwd
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/src/main/res/raw-zh-rCN/passwd.txt b/src/app/src/main/res/raw-zh-rCN/passwd.txt
new file mode 100644
index 0000000..14f9f2e
--- /dev/null
+++ b/src/app/src/main/res/raw-zh-rCN/passwd.txt
@@ -0,0 +1,5 @@
+账户所属平台:
+昵称:
+账号:
+密码:
+安保问题答案:
diff --git a/src/app/src/main/res/raw/contact b/src/app/src/main/res/raw/contact
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/src/main/res/raw/contact.txt b/src/app/src/main/res/raw/contact.txt
new file mode 100644
index 0000000..be66f01
--- /dev/null
+++ b/src/app/src/main/res/raw/contact.txt
@@ -0,0 +1,9 @@
+联系人姓名:
+年龄:
+性别:
+生日:
+关系:
+地址:
+qq号码:
+微信号码:
+
diff --git a/src/app/src/main/res/raw/event b/src/app/src/main/res/raw/event
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/src/main/res/raw/event.txt b/src/app/src/main/res/raw/event.txt
new file mode 100644
index 0000000..c634882
--- /dev/null
+++ b/src/app/src/main/res/raw/event.txt
@@ -0,0 +1,4 @@
+事件名称:
+发生时间:
+参与人物:
+需做的准备:
diff --git a/src/app/src/main/res/raw/gestrues b/src/app/src/main/res/raw/gestrues
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/src/main/res/raw/gestures b/src/app/src/main/res/raw/gestures
new file mode 100644
index 0000000..8bc4ea1
Binary files /dev/null and b/src/app/src/main/res/raw/gestures differ
diff --git a/src/app/src/main/res/raw/gestures.txt b/src/app/src/main/res/raw/gestures.txt
new file mode 100644
index 0000000..564059f
Binary files /dev/null and b/src/app/src/main/res/raw/gestures.txt differ
diff --git a/src/app/src/main/res/raw/passwd b/src/app/src/main/res/raw/passwd
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/src/main/res/raw/passwd.txt b/src/app/src/main/res/raw/passwd.txt
new file mode 100644
index 0000000..14f9f2e
--- /dev/null
+++ b/src/app/src/main/res/raw/passwd.txt
@@ -0,0 +1,5 @@
+账户所属平台:
+昵称:
+账号:
+密码:
+安保问题答案:
diff --git a/src/app/src/main/res/values-zh-rCN/strings.xml b/src/app/src/main/res/values-zh-rCN/strings.xml
index 127480a..eeb6037 100644
--- a/src/app/src/main/res/values-zh-rCN/strings.xml
+++ b/src/app/src/main/res/values-zh-rCN/strings.xml
@@ -18,8 +18,16 @@
- 弹出自定义消息
+
+ 设置为隐私便签显示目前便签数量
+ 撤销隐私便签
+ 输入隐私密码
+ 打开图库
+ 打开相机
+ 开始画图
+ 采用自定义手势
+ 采用默认手势便签
diff --git a/src/app/src/main/res/values/strings.xml b/src/app/src/main/res/values/strings.xml
index fce541e..b4eaa7c 100644
--- a/src/app/src/main/res/values/strings.xml
+++ b/src/app/src/main/res/values/strings.xml
@@ -17,8 +17,16 @@
- Pop message
+ set private modecount how many notes are there
+ delete private mode
+ Please input PassWord
+ open the album
+ take photo
+ start draw
+ set gestrue
+ switch to default gestrue
+
NotesNotes 2x2Notes 4x4
diff --git a/src/build.gradle b/src/build.gradle
index 8f652eb..17bc55b 100644
--- a/src/build.gradle
+++ b/src/build.gradle
@@ -2,9 +2,8 @@
buildscript {
repositories {
- maven {
- url "https://plugins.gradle.org/m2/"
- }
+ maven {url "https://plugins.gradle.org/m2/"}
+ maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
google()
//mavenCentral()
jcenter()
diff --git a/src/local.properties b/src/local.properties
index 1f641ce..a53d312 100644
--- a/src/local.properties
+++ b/src/local.properties
@@ -4,5 +4,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
-#Fri Oct 23 20:47:15 CST 2020
-sdk.dir=D\:\\Android\\AndroidSDK
+#Fri Oct 30 16:52:12 CST 2020
+sdk.dir=F\:\\Android\\Sdk