Merge remote-tracking branch 'origin/ziji_wu' into develop
# Conflicts: # src/.gradle/5.4.1/executionHistory/executionHistory.bin # src/.gradle/5.4.1/executionHistory/executionHistory.lock # src/.gradle/5.4.1/fileHashes/fileHashes.bin # src/.gradle/5.4.1/fileHashes/fileHashes.lock # src/.gradle/5.4.1/fileHashes/resourceHashesCache.bin # src/.gradle/5.4.1/javaCompile/javaCompile.lock # src/.gradle/buildOutputCleanup/buildOutputCleanup.lock # src/.gradle/buildOutputCleanup/outputFiles.bin # src/.idea/caches/build_file_checksums.ser # src/.idea/caches/gradle_models.ser # src/.idea/sonarlint/issuestore/1/e/1eb2363b523dbcae43d3c6e4790c64436af61b13 # src/.idea/sonarlint/issuestore/3/e/3e688be40dc69cfd1062f41d0fc27fe261a26710 # src/.idea/sonarlint/issuestore/5/7/577f30d26378ec8a2bd2e4a43f3c79b3f04c402c # src/.idea/sonarlint/issuestore/6/a/6a65e747031f27aef20597b4181148a9fbf963d5 # src/.idea/sonarlint/issuestore/a/7/a7641cfac724321d508c2a284223a711011a93f5 # src/.idea/sonarlint/issuestore/a/d/ad72331a1bed265bb9c0fe838faa74dbf69fce32 # src/.idea/sonarlint/issuestore/d/d/dd970bd8ce083850fca1d4d159647ccd110e57cb # src/.idea/workspace.xml # src/app/app.iml # src/app/build.gradle # src/app/build/intermediates/dex/debug/mergeDexDebug/out/classes.dex # src/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt # src/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/dPcwR9oS2EmiImbvDZ1Qg_iwk3M= # src/app/build/intermediates/javac/debug/classes/net/micode/notes/data/NotesDatabaseHelper.class # src/app/build/intermediates/javac/debug/classes/net/micode/notes/data/NotesProvider.class # src/app/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_ # src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/data/NotesDatabaseHelper.dex # src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/data/NotesProvider.dex # src/app/build/outputs/apk/debug/app-debug.apk # src/app/src/main/java/net/micode/notes/data/NotesProvider.java
This commit is contained in:
parent
28c432d2fa
commit
634087f21a
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -19,7 +19,7 @@
|
|||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/resValues/debug" />
|
||||
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
|
||||
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
|
||||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
||||
</configuration>
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
<application
|
||||
android:debuggable="true"
|
||||
android:icon="@drawable/icon_app"
|
||||
android:label="@string/app_name"
|
||||
android:testOnly="true" >
|
||||
android:label="@string/app_name" >
|
||||
<activity
|
||||
android:name="net.micode.notes.ui.NotesListActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
<application
|
||||
android:debuggable="true"
|
||||
android:icon="@drawable/icon_app"
|
||||
android:label="@string/app_name"
|
||||
android:testOnly="true" >
|
||||
android:label="@string/app_name" >
|
||||
<activity
|
||||
android:name="net.micode.notes.ui.NotesListActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
|
|
|
@ -58,215 +58,214 @@
|
|||
37 android:debuggable="true"
|
||||
38 android:icon="@drawable/icon_app"
|
||||
38-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:34:9-42
|
||||
39 android:label="@string/app_name"
|
||||
39 android:label="@string/app_name" >
|
||||
39-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:35:9-41
|
||||
40 android:testOnly="true" >
|
||||
41 <activity
|
||||
41-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:36:9-49:20
|
||||
42 android:name="net.micode.notes.ui.NotesListActivity"
|
||||
42-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:37:13-49
|
||||
43 android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
43-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:38:13-74
|
||||
44 android:label="@string/app_name"
|
||||
44-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:39:13-45
|
||||
45 android:launchMode="singleTop"
|
||||
45-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:40:13-43
|
||||
46 android:theme="@style/NoteTheme"
|
||||
46-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:41:13-45
|
||||
47 android:uiOptions="splitActionBarWhenNarrow"
|
||||
47-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:42:13-57
|
||||
48 android:windowSoftInputMode="adjustPan" >
|
||||
48-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:43:13-52
|
||||
49 <intent-filter>
|
||||
49-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:45:13-48:29
|
||||
50 <action android:name="android.intent.action.MAIN" />
|
||||
50-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:46:17-69
|
||||
50-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:46:25-66
|
||||
51
|
||||
52 <category android:name="android.intent.category.LAUNCHER" />
|
||||
52-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:47:17-77
|
||||
52-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:47:27-74
|
||||
53 </intent-filter>
|
||||
54 </activity>
|
||||
55 <activity
|
||||
55-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:51:9-79:20
|
||||
56 android:name="net.micode.notes.ui.NoteEditActivity"
|
||||
56-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:52:13-48
|
||||
57 android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
57-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:53:13-74
|
||||
58 android:launchMode="singleTop"
|
||||
58-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:54:13-43
|
||||
59 android:theme="@style/NoteTheme" >
|
||||
59-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:55:13-45
|
||||
60 <intent-filter>
|
||||
60-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:57:13-62:29
|
||||
61 <action android:name="android.intent.action.VIEW" />
|
||||
61-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:58:17-69
|
||||
61-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:58:25-66
|
||||
62
|
||||
63 <category android:name="android.intent.category.DEFAULT" />
|
||||
63-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:17-76
|
||||
63-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:27-73
|
||||
64
|
||||
65 <data android:mimeType="vnd.android.cursor.item/text_note" />
|
||||
40 <activity
|
||||
40-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:36:9-49:20
|
||||
41 android:name="net.micode.notes.ui.NotesListActivity"
|
||||
41-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:37:13-49
|
||||
42 android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
42-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:38:13-74
|
||||
43 android:label="@string/app_name"
|
||||
43-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:39:13-45
|
||||
44 android:launchMode="singleTop"
|
||||
44-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:40:13-43
|
||||
45 android:theme="@style/NoteTheme"
|
||||
45-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:41:13-45
|
||||
46 android:uiOptions="splitActionBarWhenNarrow"
|
||||
46-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:42:13-57
|
||||
47 android:windowSoftInputMode="adjustPan" >
|
||||
47-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:43:13-52
|
||||
48 <intent-filter>
|
||||
48-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:45:13-48:29
|
||||
49 <action android:name="android.intent.action.MAIN" />
|
||||
49-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:46:17-69
|
||||
49-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:46:25-66
|
||||
50
|
||||
51 <category android:name="android.intent.category.LAUNCHER" />
|
||||
51-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:47:17-77
|
||||
51-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:47:27-74
|
||||
52 </intent-filter>
|
||||
53 </activity>
|
||||
54 <activity
|
||||
54-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:51:9-79:20
|
||||
55 android:name="net.micode.notes.ui.NoteEditActivity"
|
||||
55-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:52:13-48
|
||||
56 android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
56-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:53:13-74
|
||||
57 android:launchMode="singleTop"
|
||||
57-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:54:13-43
|
||||
58 android:theme="@style/NoteTheme" >
|
||||
58-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:55:13-45
|
||||
59 <intent-filter>
|
||||
59-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:57:13-62:29
|
||||
60 <action android:name="android.intent.action.VIEW" />
|
||||
60-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:58:17-69
|
||||
60-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:58:25-66
|
||||
61
|
||||
62 <category android:name="android.intent.category.DEFAULT" />
|
||||
62-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:17-76
|
||||
62-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:27-73
|
||||
63
|
||||
64 <data android:mimeType="vnd.android.cursor.item/text_note" />
|
||||
64-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:17-78
|
||||
64-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:23-75
|
||||
65 <data android:mimeType="vnd.android.cursor.item/call_note" />
|
||||
65-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:17-78
|
||||
65-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:23-75
|
||||
66 <data android:mimeType="vnd.android.cursor.item/call_note" />
|
||||
66-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:17-78
|
||||
66-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:23-75
|
||||
67 </intent-filter>
|
||||
68 <intent-filter>
|
||||
68-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:64:13-69:29
|
||||
69 <action android:name="android.intent.action.INSERT_OR_EDIT" />
|
||||
69-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:65:17-79
|
||||
69-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:65:25-76
|
||||
70
|
||||
71 <category android:name="android.intent.category.DEFAULT" />
|
||||
71-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:17-76
|
||||
71-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:27-73
|
||||
72
|
||||
73 <data android:mimeType="vnd.android.cursor.item/text_note" />
|
||||
66 </intent-filter>
|
||||
67 <intent-filter>
|
||||
67-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:64:13-69:29
|
||||
68 <action android:name="android.intent.action.INSERT_OR_EDIT" />
|
||||
68-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:65:17-79
|
||||
68-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:65:25-76
|
||||
69
|
||||
70 <category android:name="android.intent.category.DEFAULT" />
|
||||
70-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:17-76
|
||||
70-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:27-73
|
||||
71
|
||||
72 <data android:mimeType="vnd.android.cursor.item/text_note" />
|
||||
72-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:17-78
|
||||
72-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:23-75
|
||||
73 <data android:mimeType="vnd.android.cursor.item/call_note" />
|
||||
73-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:17-78
|
||||
73-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:23-75
|
||||
74 <data android:mimeType="vnd.android.cursor.item/call_note" />
|
||||
74-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:17-78
|
||||
74-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:60:23-75
|
||||
75 </intent-filter>
|
||||
76 <intent-filter>
|
||||
76-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:71:13-74:29
|
||||
77 <action android:name="android.intent.action.SEARCH" />
|
||||
77-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:72:17-71
|
||||
77-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:72:25-68
|
||||
78
|
||||
79 <category android:name="android.intent.category.DEFAULT" />
|
||||
79-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:17-76
|
||||
79-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:27-73
|
||||
80 </intent-filter>
|
||||
81
|
||||
82 <meta-data
|
||||
82-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:76:13-78:54
|
||||
83 android:name="android.app.searchable"
|
||||
83-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:77:17-54
|
||||
84 android:resource="@xml/searchable" />
|
||||
84-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:78:17-51
|
||||
85 </activity>
|
||||
86
|
||||
87 <provider
|
||||
87-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:81:9-84:43
|
||||
88 android:name="net.micode.notes.data.NotesProvider"
|
||||
88-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:82:13-63
|
||||
89 android:authorities="micode_notes"
|
||||
89-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:83:13-47
|
||||
90 android:multiprocess="true" />
|
||||
90-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:84:13-40
|
||||
91
|
||||
92 <receiver
|
||||
92-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:86:9-98:20
|
||||
93 android:name="net.micode.notes.widget.NoteWidgetProvider_2x"
|
||||
93-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:87:13-57
|
||||
94 android:label="@string/app_widget2x2" >
|
||||
94-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:88:13-50
|
||||
95 <intent-filter>
|
||||
95-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:89:13-93:29
|
||||
96 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
96-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:90:17-84
|
||||
96-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:90:25-81
|
||||
97 <action android:name="android.appwidget.action.APPWIDGET_DELETED" />
|
||||
97-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:91:17-85
|
||||
97-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:91:25-82
|
||||
98 <action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
|
||||
98-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:92:17-85
|
||||
98-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:92:25-82
|
||||
99 </intent-filter>
|
||||
100
|
||||
101 <meta-data
|
||||
101-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:95:13-97:58
|
||||
102 android:name="android.appwidget.provider"
|
||||
102-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:96:17-58
|
||||
103 android:resource="@xml/widget_2x_info" />
|
||||
103-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:97:17-55
|
||||
104 </receiver>
|
||||
105 <receiver
|
||||
105-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:99:9-112:20
|
||||
106 android:name="net.micode.notes.widget.NoteWidgetProvider_4x"
|
||||
106-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:100:13-57
|
||||
107 android:label="@string/app_widget4x4" >
|
||||
107-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:101:13-50
|
||||
108 <intent-filter>
|
||||
108-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:89:13-93:29
|
||||
109 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
109-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:90:17-84
|
||||
109-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:90:25-81
|
||||
110 <action android:name="android.appwidget.action.APPWIDGET_DELETED" />
|
||||
110-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:91:17-85
|
||||
110-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:91:25-82
|
||||
111 <action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
|
||||
111-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:92:17-85
|
||||
111-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:92:25-82
|
||||
112 </intent-filter>
|
||||
113
|
||||
114 <meta-data
|
||||
114-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:95:13-97:58
|
||||
115 android:name="android.appwidget.provider"
|
||||
115-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:96:17-58
|
||||
116 android:resource="@xml/widget_4x_info" />
|
||||
116-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:97:17-55
|
||||
117 </receiver>
|
||||
118 <receiver android:name="net.micode.notes.ui.AlarmInitReceiver" >
|
||||
118-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:114:9-118:20
|
||||
118-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:114:19-55
|
||||
119 <intent-filter>
|
||||
119-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:115:13-117:29
|
||||
120 <action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
120-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:116:17-79
|
||||
120-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:116:25-76
|
||||
121 </intent-filter>
|
||||
122 </receiver>
|
||||
123 <receiver
|
||||
123-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:120:9-123:20
|
||||
124 android:name="net.micode.notes.ui.AlarmReceiver"
|
||||
124-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:121:13-61
|
||||
125 android:process=":remote" >
|
||||
125-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:122:13-38
|
||||
126 </receiver>
|
||||
127
|
||||
128 <activity
|
||||
128-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:125:9-130:20
|
||||
129 android:name="net.micode.notes.ui.AlarmAlertActivity"
|
||||
129-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:126:13-50
|
||||
130 android:label="@string/app_name"
|
||||
130-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:127:13-45
|
||||
131 android:launchMode="singleInstance"
|
||||
131-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:128:13-48
|
||||
132 android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" >
|
||||
132-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:129:13-75
|
||||
133 </activity>
|
||||
134 <activity
|
||||
134-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:132:9-137:20
|
||||
135 android:name="net.micode.notes.ui.NotesPreferenceActivity"
|
||||
135-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:133:13-71
|
||||
136 android:label="@string/preferences_title"
|
||||
136-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:134:13-54
|
||||
137 android:launchMode="singleTop"
|
||||
137-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:135:13-43
|
||||
138 android:theme="@android:style/Theme.Holo.Light" >
|
||||
138-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:136:13-60
|
||||
139 </activity>
|
||||
140
|
||||
141 <service
|
||||
141-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:139:9-142:19
|
||||
142 android:name="net.micode.notes.gtask.remote.GTaskSyncService"
|
||||
142-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:140:13-74
|
||||
143 android:exported="false" >
|
||||
143-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:141:13-37
|
||||
144 </service>
|
||||
145
|
||||
146 <meta-data
|
||||
146-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:144:9-146:52
|
||||
147 android:name="android.app.default_searchable"
|
||||
147-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:145:13-58
|
||||
148 android:value=".ui.NoteEditActivity" />
|
||||
148-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:146:13-49
|
||||
149 </application>
|
||||
150
|
||||
151</manifest>
|
||||
74 </intent-filter>
|
||||
75 <intent-filter>
|
||||
75-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:71:13-74:29
|
||||
76 <action android:name="android.intent.action.SEARCH" />
|
||||
76-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:72:17-71
|
||||
76-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:72:25-68
|
||||
77
|
||||
78 <category android:name="android.intent.category.DEFAULT" />
|
||||
78-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:17-76
|
||||
78-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:59:27-73
|
||||
79 </intent-filter>
|
||||
80
|
||||
81 <meta-data
|
||||
81-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:76:13-78:54
|
||||
82 android:name="android.app.searchable"
|
||||
82-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:77:17-54
|
||||
83 android:resource="@xml/searchable" />
|
||||
83-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:78:17-51
|
||||
84 </activity>
|
||||
85
|
||||
86 <provider
|
||||
86-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:81:9-84:43
|
||||
87 android:name="net.micode.notes.data.NotesProvider"
|
||||
87-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:82:13-63
|
||||
88 android:authorities="micode_notes"
|
||||
88-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:83:13-47
|
||||
89 android:multiprocess="true" />
|
||||
89-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:84:13-40
|
||||
90
|
||||
91 <receiver
|
||||
91-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:86:9-98:20
|
||||
92 android:name="net.micode.notes.widget.NoteWidgetProvider_2x"
|
||||
92-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:87:13-57
|
||||
93 android:label="@string/app_widget2x2" >
|
||||
93-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:88:13-50
|
||||
94 <intent-filter>
|
||||
94-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:89:13-93:29
|
||||
95 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
95-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:90:17-84
|
||||
95-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:90:25-81
|
||||
96 <action android:name="android.appwidget.action.APPWIDGET_DELETED" />
|
||||
96-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:91:17-85
|
||||
96-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:91:25-82
|
||||
97 <action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
|
||||
97-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:92:17-85
|
||||
97-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:92:25-82
|
||||
98 </intent-filter>
|
||||
99
|
||||
100 <meta-data
|
||||
100-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:95:13-97:58
|
||||
101 android:name="android.appwidget.provider"
|
||||
101-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:96:17-58
|
||||
102 android:resource="@xml/widget_2x_info" />
|
||||
102-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:97:17-55
|
||||
103 </receiver>
|
||||
104 <receiver
|
||||
104-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:99:9-112:20
|
||||
105 android:name="net.micode.notes.widget.NoteWidgetProvider_4x"
|
||||
105-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:100:13-57
|
||||
106 android:label="@string/app_widget4x4" >
|
||||
106-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:101:13-50
|
||||
107 <intent-filter>
|
||||
107-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:89:13-93:29
|
||||
108 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
108-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:90:17-84
|
||||
108-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:90:25-81
|
||||
109 <action android:name="android.appwidget.action.APPWIDGET_DELETED" />
|
||||
109-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:91:17-85
|
||||
109-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:91:25-82
|
||||
110 <action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
|
||||
110-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:92:17-85
|
||||
110-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:92:25-82
|
||||
111 </intent-filter>
|
||||
112
|
||||
113 <meta-data
|
||||
113-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:95:13-97:58
|
||||
114 android:name="android.appwidget.provider"
|
||||
114-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:96:17-58
|
||||
115 android:resource="@xml/widget_4x_info" />
|
||||
115-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:97:17-55
|
||||
116 </receiver>
|
||||
117 <receiver android:name="net.micode.notes.ui.AlarmInitReceiver" >
|
||||
117-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:114:9-118:20
|
||||
117-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:114:19-55
|
||||
118 <intent-filter>
|
||||
118-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:115:13-117:29
|
||||
119 <action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
119-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:116:17-79
|
||||
119-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:116:25-76
|
||||
120 </intent-filter>
|
||||
121 </receiver>
|
||||
122 <receiver
|
||||
122-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:120:9-123:20
|
||||
123 android:name="net.micode.notes.ui.AlarmReceiver"
|
||||
123-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:121:13-61
|
||||
124 android:process=":remote" >
|
||||
124-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:122:13-38
|
||||
125 </receiver>
|
||||
126
|
||||
127 <activity
|
||||
127-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:125:9-130:20
|
||||
128 android:name="net.micode.notes.ui.AlarmAlertActivity"
|
||||
128-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:126:13-50
|
||||
129 android:label="@string/app_name"
|
||||
129-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:127:13-45
|
||||
130 android:launchMode="singleInstance"
|
||||
130-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:128:13-48
|
||||
131 android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" >
|
||||
131-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:129:13-75
|
||||
132 </activity>
|
||||
133 <activity
|
||||
133-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:132:9-137:20
|
||||
134 android:name="net.micode.notes.ui.NotesPreferenceActivity"
|
||||
134-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:133:13-71
|
||||
135 android:label="@string/preferences_title"
|
||||
135-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:134:13-54
|
||||
136 android:launchMode="singleTop"
|
||||
136-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:135:13-43
|
||||
137 android:theme="@android:style/Theme.Holo.Light" >
|
||||
137-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:136:13-60
|
||||
138 </activity>
|
||||
139
|
||||
140 <service
|
||||
140-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:139:9-142:19
|
||||
141 android:name="net.micode.notes.gtask.remote.GTaskSyncService"
|
||||
141-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:140:13-74
|
||||
142 android:exported="false" >
|
||||
142-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:141:13-37
|
||||
143 </service>
|
||||
144
|
||||
145 <meta-data
|
||||
145-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:144:9-146:52
|
||||
146 android:name="android.app.default_searchable"
|
||||
146-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:145:13-58
|
||||
147 android:value=".ui.NoteEditActivity" />
|
||||
147-->C:\Project\minote\src\app\src\main\AndroidManifest.xml:146:13-49
|
||||
148 </application>
|
||||
149
|
||||
150</manifest>
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
<application
|
||||
android:debuggable="true"
|
||||
android:icon="@drawable/icon_app"
|
||||
android:label="@string/app_name"
|
||||
android:testOnly="true" >
|
||||
android:label="@string/app_name" >
|
||||
<activity
|
||||
android:name="net.micode.notes.ui.NotesListActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
|
|
|
@ -57,14 +57,17 @@ public class WorkingNote {
|
|||
//记录Widget类型
|
||||
private int mWidgetType;
|
||||
|
||||
//记录文件夹id
|
||||
private long mFolderId;
|
||||
|
||||
private Context mContext;
|
||||
|
||||
private static final String TAG = "WorkingNote";
|
||||
|
||||
//是否删除标识
|
||||
private boolean mIsDeleted;
|
||||
|
||||
//用于检查便签设置是否更改
|
||||
private NoteSettingChangedListener mNoteSettingStatusListener;
|
||||
|
||||
public static final String[] DATA_PROJECTION = new String[] {
|
||||
|
@ -77,6 +80,7 @@ public class WorkingNote {
|
|||
DataColumns.DATA4,
|
||||
};
|
||||
|
||||
//定义了便签显示的一系列参数
|
||||
public static final String[] NOTE_PROJECTION = new String[] {
|
||||
NoteColumns.PARENT_ID,
|
||||
NoteColumns.ALERTED_DATE,
|
||||
|
@ -86,6 +90,7 @@ public class WorkingNote {
|
|||
NoteColumns.MODIFIED_DATE
|
||||
};
|
||||
|
||||
//定义了一系列id
|
||||
private static final int DATA_ID_COLUMN = 0;
|
||||
|
||||
private static final int DATA_CONTENT_COLUMN = 1;
|
||||
|
@ -136,8 +141,11 @@ public class WorkingNote {
|
|||
ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, mNoteId), NOTE_PROJECTION, null,
|
||||
null, null);
|
||||
|
||||
//如果查询到的内容有效
|
||||
if (cursor != null) {
|
||||
if (cursor.moveToFirst()) {
|
||||
//如果将游标置于第一个元素成功
|
||||
//将便签参数以这个元素初始化
|
||||
mFolderId = cursor.getLong(NOTE_PARENT_ID_COLUMN);
|
||||
mBgColorId = cursor.getInt(NOTE_BG_COLOR_ID_COLUMN);
|
||||
mWidgetId = cursor.getInt(NOTE_WIDGET_ID_COLUMN);
|
||||
|
@ -145,63 +153,89 @@ public class WorkingNote {
|
|||
mAlertDate = cursor.getLong(NOTE_ALERTED_DATE_COLUMN);
|
||||
mModifiedDate = cursor.getLong(NOTE_MODIFIED_DATE_COLUMN);
|
||||
}
|
||||
//关闭cursor
|
||||
cursor.close();
|
||||
} else {
|
||||
//否则,记录错误,抛出异常
|
||||
Log.e(TAG, "No note with id:" + mNoteId);
|
||||
throw new IllegalArgumentException("Unable to find note with id " + mNoteId);
|
||||
}
|
||||
//加载便签数据的方法
|
||||
loadNoteData();
|
||||
}
|
||||
|
||||
//实现了加载便签数据的方法
|
||||
private void loadNoteData() {
|
||||
Cursor cursor = mContext.getContentResolver().query(Notes.CONTENT_DATA_URI, DATA_PROJECTION,
|
||||
DataColumns.NOTE_ID + "=?", new String[] {
|
||||
String.valueOf(mNoteId)
|
||||
}, null);
|
||||
|
||||
//如果查询到了内容有效
|
||||
if (cursor != null) {
|
||||
if (cursor.moveToFirst()) {
|
||||
do {
|
||||
String type = cursor.getString(DATA_MIME_TYPE_COLUMN);
|
||||
//匹配数据类型
|
||||
//如果是便签类的数据
|
||||
if (DataConstants.NOTE.equals(type)) {
|
||||
//初始化
|
||||
mContent = cursor.getString(DATA_CONTENT_COLUMN);
|
||||
mMode = cursor.getInt(DATA_MODE_COLUMN);
|
||||
mNote.setTextDataId(cursor.getLong(DATA_ID_COLUMN));
|
||||
} else if (DataConstants.CALL_NOTE.equals(type)) {
|
||||
//如果是通话记录类的数据
|
||||
mNote.setCallDataId(cursor.getLong(DATA_ID_COLUMN));
|
||||
} else {
|
||||
//都不是,保错
|
||||
Log.d(TAG, "Wrong note type with type:" + type);
|
||||
}
|
||||
} while (cursor.moveToNext());
|
||||
} while (cursor.moveToNext());//遍历cursor中的所有内容
|
||||
}
|
||||
cursor.close();
|
||||
} else {
|
||||
//cursor为null,当前id找不到内容
|
||||
//将错误信息记入日志,抛出异常
|
||||
Log.e(TAG, "No data with id:" + mNoteId);
|
||||
throw new IllegalArgumentException("Unable to find note's data with id " + mNoteId);
|
||||
}
|
||||
}
|
||||
|
||||
//该方法实现了创建新的空便签的方法
|
||||
public static WorkingNote createEmptyNote(Context context, long folderId, int widgetId,
|
||||
int widgetType, int defaultBgColorId) {
|
||||
//创建新的便签
|
||||
WorkingNote note = new WorkingNote(context, folderId);
|
||||
//设置背景色
|
||||
note.setBgColorId(defaultBgColorId);
|
||||
//设置widget
|
||||
note.setWidgetId(widgetId);
|
||||
//设置wegit类型
|
||||
note.setWidgetType(widgetType);
|
||||
//返回新建的便签
|
||||
return note;
|
||||
}
|
||||
|
||||
//该方法实现了加载便签的功能
|
||||
//@ id 要加载的便签id号
|
||||
public static WorkingNote load(Context context, long id) {
|
||||
return new WorkingNote(context, id, 0);
|
||||
}
|
||||
|
||||
//该方法实现了保存便签的功能
|
||||
public synchronized boolean saveNote() {
|
||||
if (isWorthSaving()) {
|
||||
if (!existInDatabase()) {
|
||||
//当需要保存且在数据库中不存在时
|
||||
if ((mNoteId = Note.getNewNoteId(mContext, mFolderId)) == 0) {
|
||||
//分配id失败(id == 0),记入日志
|
||||
Log.e(TAG, "Create new note fail with id:" + mNoteId);
|
||||
//返回false,保存失败
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//同步便签
|
||||
mNote.syncNote(mContext, mNoteId);
|
||||
|
||||
/**
|
||||
|
@ -210,6 +244,7 @@ public class WorkingNote {
|
|||
if (mWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID
|
||||
&& mWidgetType != Notes.TYPE_WIDGET_INVALIDE
|
||||
&& mNoteSettingStatusListener != null) {
|
||||
//更新便签widget
|
||||
mNoteSettingStatusListener.onWidgetChanged();
|
||||
}
|
||||
return true;
|
||||
|
@ -218,10 +253,12 @@ public class WorkingNote {
|
|||
}
|
||||
}
|
||||
|
||||
//根据id判断是否在数据库中的方法,id>0有效,否则无效
|
||||
public boolean existInDatabase() {
|
||||
return mNoteId > 0;
|
||||
}
|
||||
|
||||
//判断是否需要保存的方法
|
||||
private boolean isWorthSaving() {
|
||||
if (mIsDeleted || (!existInDatabase() && TextUtils.isEmpty(mContent))
|
||||
|| (existInDatabase() && !mNote.isLocalModified())) {
|
||||
|
@ -237,8 +274,11 @@ public class WorkingNote {
|
|||
|
||||
//设置闹铃时间的方法
|
||||
public void setAlertDate(long date, boolean set) {
|
||||
//如果闹钟时间改变
|
||||
if (date != mAlertDate) {
|
||||
//更改提醒时间
|
||||
mAlertDate = date;
|
||||
//将更改保存
|
||||
mNote.setNoteValue(NoteColumns.ALERTED_DATE, String.valueOf(mAlertDate));
|
||||
}
|
||||
if (mNoteSettingStatusListener != null) {
|
||||
|
@ -246,9 +286,12 @@ public class WorkingNote {
|
|||
}
|
||||
}
|
||||
|
||||
//将便签标记为已删除
|
||||
//置上删除标记
|
||||
//mark - true,已删除
|
||||
//mark - false,未删除
|
||||
public void markDeleted(boolean mark) {
|
||||
mIsDeleted = mark;
|
||||
//widget有效
|
||||
if (mWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID
|
||||
&& mWidgetType != Notes.TYPE_WIDGET_INVALIDE && mNoteSettingStatusListener != null) {
|
||||
mNoteSettingStatusListener.onWidgetChanged();
|
||||
|
@ -258,10 +301,13 @@ public class WorkingNote {
|
|||
//设置背景色ID
|
||||
public void setBgColorId(int id) {
|
||||
if (id != mBgColorId) {
|
||||
//如果背景色id改变,执行下列操作
|
||||
//否则,不执行操作
|
||||
mBgColorId = id;
|
||||
if (mNoteSettingStatusListener != null) {
|
||||
mNoteSettingStatusListener.onBackgroundColorChanged();
|
||||
}
|
||||
//将更改保存到便签中
|
||||
mNote.setNoteValue(NoteColumns.BG_COLOR_ID, String.valueOf(id));
|
||||
}
|
||||
}
|
||||
|
@ -269,6 +315,8 @@ public class WorkingNote {
|
|||
//设置列表模式的方法
|
||||
public void setCheckListMode(int mode) {
|
||||
if (mMode != mode) {
|
||||
//如果模式改变,执行下列操作
|
||||
//否则,跳过
|
||||
if (mNoteSettingStatusListener != null) {
|
||||
mNoteSettingStatusListener.onCheckListModeChanged(mMode, mode);
|
||||
}
|
||||
|
@ -281,13 +329,17 @@ public class WorkingNote {
|
|||
public void setWidgetType(int type) {
|
||||
if (type != mWidgetType) {
|
||||
mWidgetType = type;
|
||||
//将更改保存到便签中
|
||||
mNote.setNoteValue(NoteColumns.WIDGET_TYPE, String.valueOf(mWidgetType));
|
||||
}
|
||||
}
|
||||
|
||||
//设置widget的id的方法
|
||||
//如果id不变,不执行操作
|
||||
public void setWidgetId(int id) {
|
||||
if (id != mWidgetId) {
|
||||
mWidgetId = id;
|
||||
//将更改保存
|
||||
mNote.setNoteValue(NoteColumns.WIDGET_ID, String.valueOf(mWidgetId));
|
||||
}
|
||||
}
|
||||
|
@ -295,6 +347,7 @@ public class WorkingNote {
|
|||
public void setWorkingText(String text) {
|
||||
if (!TextUtils.equals(mContent, text)) {
|
||||
mContent = text;
|
||||
//保存更改
|
||||
mNote.setTextData(DataColumns.CONTENT, mContent);
|
||||
}
|
||||
}
|
||||
|
@ -323,6 +376,7 @@ public class WorkingNote {
|
|||
return mModifiedDate;
|
||||
}
|
||||
|
||||
//获取背景色的资源id号
|
||||
public int getBgColorResId() {
|
||||
return NoteBgResources.getNoteBgResource(mBgColorId);
|
||||
}
|
||||
|
@ -332,6 +386,7 @@ public class WorkingNote {
|
|||
return mBgColorId;
|
||||
}
|
||||
|
||||
//获取标题背景资源id
|
||||
public int getTitleBgResId() {
|
||||
return NoteBgResources.getNoteTitleBgResource(mBgColorId);
|
||||
}
|
||||
|
@ -340,18 +395,22 @@ public class WorkingNote {
|
|||
return mMode;
|
||||
}
|
||||
|
||||
//获取便签id
|
||||
public long getNoteId() {
|
||||
return mNoteId;
|
||||
}
|
||||
|
||||
//获取文件夹id
|
||||
public long getFolderId() {
|
||||
return mFolderId;
|
||||
}
|
||||
|
||||
//获取widget的id
|
||||
public int getWidgetId() {
|
||||
return mWidgetId;
|
||||
}
|
||||
|
||||
//获取widget的类型
|
||||
public int getWidgetType() {
|
||||
return mWidgetType;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ import java.io.IOException;
|
|||
|
||||
|
||||
public class AlarmAlertActivity extends Activity implements OnClickListener, OnDismissListener {
|
||||
//便签id号
|
||||
private long mNoteId;
|
||||
private String mSnippet;
|
||||
private static final int SNIPPET_PREW_MAX_LEN = 60;
|
||||
|
|
|
@ -77,19 +77,23 @@ import java.util.regex.Pattern;
|
|||
public class NoteEditActivity extends Activity implements OnClickListener,
|
||||
NoteSettingChangedListener, OnTextViewChangeListener {
|
||||
private class HeadViewHolder {
|
||||
//
|
||||
//文本内容显示
|
||||
public TextView tvModified;
|
||||
|
||||
//图片内容显示
|
||||
public ImageView ivAlertIcon;
|
||||
|
||||
//文本内容显示,提醒时间
|
||||
public TextView tvAlertDate;
|
||||
|
||||
//设置背景色
|
||||
public ImageView ibSetBgColor;
|
||||
}
|
||||
|
||||
//ResourceParser - tools\ResourceParser.java中的类,用于解析界面元素
|
||||
private static final Map<Integer, Integer> sBgSelectorBtnsMap = new HashMap<Integer, Integer>();
|
||||
static {
|
||||
//向R文件中放入一系列颜色资源与id
|
||||
sBgSelectorBtnsMap.put(R.id.iv_bg_yellow, ResourceParser.YELLOW);
|
||||
sBgSelectorBtnsMap.put(R.id.iv_bg_red, ResourceParser.RED);
|
||||
sBgSelectorBtnsMap.put(R.id.iv_bg_blue, ResourceParser.BLUE);
|
||||
|
@ -99,6 +103,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|||
|
||||
private static final Map<Integer, Integer> sBgSelectorSelectionMap = new HashMap<Integer, Integer>();
|
||||
static {
|
||||
//向资源文件中加入一系列背景资源与id
|
||||
sBgSelectorSelectionMap.put(ResourceParser.YELLOW, R.id.iv_bg_yellow_select);
|
||||
sBgSelectorSelectionMap.put(ResourceParser.RED, R.id.iv_bg_red_select);
|
||||
sBgSelectorSelectionMap.put(ResourceParser.BLUE, R.id.iv_bg_blue_select);
|
||||
|
@ -108,6 +113,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|||
|
||||
private static final Map<Integer, Integer> sFontSizeBtnsMap = new HashMap<Integer, Integer>();
|
||||
static {
|
||||
//向R文件中加入字体大小id与内容
|
||||
sFontSizeBtnsMap.put(R.id.ll_font_large, ResourceParser.TEXT_LARGE);
|
||||
sFontSizeBtnsMap.put(R.id.ll_font_small, ResourceParser.TEXT_SMALL);
|
||||
sFontSizeBtnsMap.put(R.id.ll_font_normal, ResourceParser.TEXT_MEDIUM);
|
||||
|
@ -122,16 +128,21 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|||
sFontSelectorSelectionMap.put(ResourceParser.TEXT_SUPER, R.id.iv_super_select);
|
||||
}
|
||||
|
||||
//用于日志记录的标识
|
||||
private static final String TAG = "NoteEditActivity";
|
||||
|
||||
private HeadViewHolder mNoteHeaderHolder;
|
||||
|
||||
//定义标题界面
|
||||
private View mHeadViewPanel;
|
||||
|
||||
//定义背景色选择界面
|
||||
private View mNoteBgColorSelector;
|
||||
|
||||
//定义字体大小选择页面
|
||||
private View mFontSizeSelector;
|
||||
|
||||
//定义便签编辑页面
|
||||
private EditText mNoteEditor;
|
||||
|
||||
private View mNoteEditorPanel;
|
||||
|
@ -139,6 +150,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|||
private WorkingNote mWorkingNote;
|
||||
|
||||
private SharedPreferences mSharedPrefs;
|
||||
//记录字体大小id
|
||||
private int mFontSizeId;
|
||||
|
||||
//记录默认字体大小
|
||||
|
@ -176,17 +188,21 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|||
@Override
|
||||
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
//activity被意外杀死,savedInstanceState保存断点状态
|
||||
if (savedInstanceState != null && savedInstanceState.containsKey(Intent.EXTRA_UID)) {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.putExtra(Intent.EXTRA_UID, savedInstanceState.getLong(Intent.EXTRA_UID));
|
||||
if (!initActivityState(intent)) {
|
||||
//断点重启失败,结束activity
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
//将断点重启成功信息记入日志
|
||||
Log.d(TAG, "Restoring from killed activity");
|
||||
}
|
||||
}
|
||||
|
||||
//该方法用于初始化activity的状态,重启activity
|
||||
private boolean initActivityState(Intent intent) {
|
||||
/**
|
||||
* If the user specified the {@link Intent#ACTION_VIEW} but not provided with id,
|
||||
|
@ -198,7 +214,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|||
mUserQuery = "";
|
||||
|
||||
/**
|
||||
* Starting from the searched result
|
||||
* 从搜索结果启动
|
||||
*/
|
||||
if (intent.hasExtra(SearchManager.EXTRA_DATA_KEY)) {
|
||||
noteId = Long.parseLong(intent.getStringExtra(SearchManager.EXTRA_DATA_KEY));
|
||||
|
|
Loading…
Reference in New Issue