解决java//ui//NoteEditActivity中ppublic boolean onPrepareOptionsMenu(Menu menu)中存在包含多个返回相同值的返回语句导致程序可能出错的问题+部分代码阅读注解

Signed-off-by: qianji <1535486312@qq.com>
a_branch
qianji 3 years ago
parent 373cb5e4ed
commit b24c51aeea

@ -0,0 +1,25 @@
}
java:S11927"[Define a constant instead of duplicating this literal " TEXT NOT NULL DEFAULT ''," 5 times.(ƒþÞ¿ùÿÿÿÿ8€Åë²ý0
j
java:S1192["HDefine a constant instead of duplicating this literal " BEGIN " 4 times.(ÕêïŠþÿÿÿÿ8€Åë²ý0
h
java:S1192j"FDefine a constant instead of duplicating this literal "=old." 6 times.(”»ÎÔüÿÿÿÿ8€Åë²ý0
j
java:S1192Ž"GDefine a constant instead of duplicating this literal " BEGIN" 6 times.(ÕêïŠþÿÿÿÿ8€Åë²ý0
{
java:S11920"^Define a constant instead of duplicating this literal " INTEGER NOT NULL DEFAULT 0," 11 times.(çÀœª8€Åë²ý0
f
java:S1192^"IDefine a constant instead of duplicating this literal " WHERE " 8 times.(Øëž°8<>Åë²ý0
c
java:S1192^"FDefine a constant instead of duplicating this literal "=new." 6 times.(Øëž°8<>Åë²ý0
n
java:S1192"RDefine a constant instead of duplicating this literal " AFTER DELETE ON " 3 times.(“áâB8<42>Åë²ý0
j
java:S1192]"HDefine a constant instead of duplicating this literal " SET " 8 times.(Õ÷Ë“üÿÿÿÿ8<>Åë²ý0
g
java:S1192\"JDefine a constant instead of duplicating this literal " UPDATE " 8 times.(ìó¥Ä8<>Åë²ý0

java:S11923"yDefine a constant instead of duplicating this literal " INTEGER NOT NULL DEFAULT (strftime('%s','now') * 1000)," 4 times.(˜›£·8<>Åë²ý0
`
java:S1214#"CMove constants defined in this interfaces to another class or enum.(áÅÔö8<>Åë²ý0

@ -0,0 +1,29 @@
n
java:S1301"KReplace this "switch" statement by "if" statements to increase readability.(öÛ«°þÿÿÿÿ8ØÆë²ý0
_
java:S18747"=Remove this use of "FLAG_SHOW_WHEN_LOCKED"; it is deprecated.(÷±µÁúÿÿÿÿ8þÆë²ý0
X
java:S1874;";Remove this use of "FLAG_TURN_SCREEN_ON"; it is deprecated.(ƒìýè8þÆë²ý0
a
java:S1874="?Remove this use of "FLAG_LAYOUT_INSET_DECOR"; it is deprecated.(‹”‡Ñúÿÿÿÿ8ÿÆë²ý0
O
java:S1874X"2Remove this use of "isScreenOn"; it is deprecated.(¤® ²8Çë²ý0
V
java:S1874b":Remove this use of "setAudioStreamType"; it is deprecated.(¡Ìé08ƒÇë²ý0
\
java:S1874d":Remove this use of "setAudioStreamType"; it is deprecated.(†Å¨ªùÿÿÿÿ8ƒÇë²ý0
g
java:S2147n"ECombine this catch with the one at line 107, which has the same body.(ÿëÛßúÿÿÿÿ8„Çë²ý0
b
java:S2147q"ECombine this catch with the one at line 110, which has the same body.(‚ùïÄ8„Çë²ý0
b
java:S2147t"ECombine this catch with the one at line 113, which has the same body.(ï­£Ä8„Çë²ý0
T
java:S1135l"2Complete the task associated to this TODO comment.(ÕÌ<C395>®þÿÿÿÿ8†Çë²ý0
T
java:S1135o"2Complete the task associated to this TODO comment.(ÕÌ<C395>®þÿÿÿÿ8†Çë²ý0
T
java:S1135r"2Complete the task associated to this TODO comment.(ÕÌ<C395>®þÿÿÿÿ8‡Çë²ý0
T
java:S1135u"2Complete the task associated to this TODO comment.(ÕÌ<C395>®þÿÿÿÿ8‡Çë²ý0

@ -1,69 +1,67 @@
t
java:S2293W"YReplace the type specification in this constructor call with the diamond operator ("<>").(ÑÓ<C391>¥üÿÿÿÿ
t
java:S2293`"YReplace the type specification in this constructor call with the diamond operator ("<>").(®ú÷õþÿÿÿÿ
t
java:S2293i"YReplace the type specification in this constructor call with the diamond operator ("<>").(êÝýÂþÿÿÿÿ
o
java:S2293q"YReplace the type specification in this constructor call with the diamond operator ("<>").(À—’¢
p
java:S2293Ï"YReplace the type specification in this constructor call with the diamond operator ("<>").(艥ð
?
java:S1604ˆ"(Make this anonymous inner class a lambda(ά¯”
{
java:S2293W"YReplace the type specification in this constructor call with the diamond operator ("<>").(ÑÓ<C391>¥üÿÿÿÿ8øúôÀý0
{
java:S2293`"YReplace the type specification in this constructor call with the diamond operator ("<>").(®ú÷õþÿÿÿÿ8øúôÀý0
{
java:S2293i"YReplace the type specification in this constructor call with the diamond operator ("<>").(êÝýÂþÿÿÿÿ8øúôÀý0
v
java:S2293q"YReplace the type specification in this constructor call with the diamond operator ("<>").(À—’¢8øúôÀý0
w
java:S2293Ù"YReplace the type specification in this constructor call with the diamond operator ("<>").(艥ð8øúôÀý0
F
java:S1604"(Make this anonymous inner class a lambda(ά¯”8øúôÀý0
F
java:S1604¸"(Make this anonymous inner class a lambda(¨›Ì÷8øúôÀý0
F
java:S1604ç"(Make this anonymous inner class a lambda(××ß’8þúôÀý0
x
java:S1104N"VMake tvModified a static final constant or non-public and provide accessors if needed.(ƒëÔ£ÿÿÿÿÿ8þúôÀý0
y
java:S1104P"WMake ivAlertIcon a static final constant or non-public and provide accessors if needed.(ªà¶±ûÿÿÿÿ8þúôÀý0
y
java:S1104R"WMake tvAlertDate a static final constant or non-public and provide accessors if needed.(“²<E2809C>Öúÿÿÿÿ8þúôÀý0
z
java:S1104T"XMake ibSetBgColor a static final constant or non-public and provide accessors if needed.(ýãä¬üÿÿÿÿ8þúôÀý0
u
java:S1450"WRemove the "mPattern" field and declare it as a local variable in the relevant methods.(©´ÖÛ8ƒüôÀý0
u
java:S3776"RRefactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed.(ݨÁ±øÿÿÿÿ8“üôÀý0
^
java:S1874Ø"@Remove this use of "SOFT_INPUT_ADJUST_RESIZE"; it is deprecated.(ѯ”<C2AF>8“üôÀý0
c
java:S1874þ"@Remove this use of "SOFT_INPUT_ADJUST_RESIZE"; it is deprecated.(Ò£ú¿ÿÿÿÿÿ8™üôÀý0
V
java:S1874<18>"9Remove this use of "setTextAppearance"; it is deprecated.(½õË(8™üôÀý0
R
java:S2864˜"4Iterate over the "entrySet" instead of the "keySet".(­Ô‡ï8™üôÀý0
U
java:S1135¤"2Complete the task associated to this TODO comment.(Ùü§“ýÿÿÿÿ8™üôÀý0
?
java:S1604®"(Make this anonymous inner class a lambda(¨›Ì÷
java:S1116¸"Remove this empty statement.(ôŸŽìúÿÿÿÿ8žüôÀý0
_
java:S1126å"AReplace this if-then-else statement by a single return statement.(®ÎÚÉ8žüôÀý0
?
java:S1604Ý"(Make this anonymous inner class a lambda(××ß’
q
java:S1104N"VMake tvModified a static final constant or non-public and provide accessors if needed.(ƒëÔ£ÿÿÿÿÿ
r
java:S1104P"WMake ivAlertIcon a static final constant or non-public and provide accessors if needed.(ªà¶±ûÿÿÿÿ
r
java:S1104R"WMake tvAlertDate a static final constant or non-public and provide accessors if needed.(“²<E2809C>Öúÿÿÿÿ
s
java:S1104T"XMake ibSetBgColor a static final constant or non-public and provide accessors if needed.(ýãä¬üÿÿÿÿ
O
java:S3516ä"9Refactor this method to not always return the same value.(™Æl
n
java:S1450"WRemove the "mPattern" field and declare it as a local variable in the relevant methods.(©´ÖÛ
n
java:S3776"RRefactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed.(ݨÁ±øÿÿÿÿ
java:S1116"Remove this empty statement.(ôŸŽìúÿÿÿÿ8¤üôÀý0
W
java:S1874Ø"@Remove this use of "SOFT_INPUT_ADJUST_RESIZE"; it is deprecated.(ѯ”<C2AF>
java:S1874ƒ"9Remove this use of "PreferenceManager"; it is deprecated.(ª¦úÅ8¤üôÀý0
a
java:S1874ƒ"CRemove this use of "getDefaultSharedPreferences"; it is deprecated.(ª¦úÅ8¤üôÀý0
\
java:S1874þ"@Remove this use of "SOFT_INPUT_ADJUST_RESIZE"; it is deprecated.(Ò£ú¿ÿÿÿÿÿ
O
java:S1874<18>"9Remove this use of "setTextAppearance"; it is deprecated.(½õË(
K
java:S2864˜"4Iterate over the "entrySet" instead of the "keySet".(­Ô‡ï
N
java:S1135¤"2Complete the task associated to this TODO comment.(Ùü§“ýÿÿÿÿ
8
java:S1116¸"Remove this empty statement.(ôŸŽìúÿÿÿÿ
java:S1874À"9Remove this use of "setTextAppearance"; it is deprecated.(ÑëÊäüÿÿÿÿ8¥üôÀý0
m
java:S1874È"JDon't override a deprecated method or explicitly mark it as "@Deprecated".(œƒƒ©ùÿÿÿÿ8¥üôÀý0
X
java:S1126å"AReplace this if-then-else statement by a single return statement.(®ÎÚÉ
8
java:S1116"Remove this empty statement.(ôŸŽìúÿÿÿÿ
P
java:S1874ƒ"9Remove this use of "PreferenceManager"; it is deprecated.(ª¦úÅ
Z
java:S1874ƒ"CRemove this use of "getDefaultSharedPreferences"; it is deprecated.(ª¦úÅ
U
java:S1874À"9Remove this use of "setTextAppearance"; it is deprecated.(ÑëÊäüÿÿÿÿ
f
java:S1874È"JDon't override a deprecated method or explicitly mark it as "@Deprecated".(œƒƒ©ùÿÿÿÿ
Q
java:S1874Î"5Remove this use of "onBackPressed"; it is deprecated.(<28>Ñàÿÿÿÿÿ
G
java:S1874Ï"0Remove this use of "getColor"; it is deprecated.(è¤ÔÃ
d
java:S3252Ñ"MUse static access with "android.text.Spanned" for "SPAN_INCLUSIVE_EXCLUSIVE".(ŸÍÃó
U
java:S1874Û"9Remove this use of "setTextAppearance"; it is deprecated.(Ùú˜Êøÿÿÿÿ
T
java:S1874Ç"=Remove this use of "EXTRA_SHORTCUT_INTENT"; it is deprecated.(·Ã°Ÿ
R
java:S1874È";Remove this use of "EXTRA_SHORTCUT_NAME"; it is deprecated.(ÒÀ‘ç
java:S1874Î"5Remove this use of "onBackPressed"; it is deprecated.(<28>Ñàÿÿÿÿÿ8¥üôÀý0
N
java:S1874Ù"0Remove this use of "getColor"; it is deprecated.(è¤ÔÃ8ÀüôÀý0
k
java:S3252Û"MUse static access with "android.text.Spanned" for "SPAN_INCLUSIVE_EXCLUSIVE".(ŸÍÃó8ÀüôÀý0
\
java:S1874å"9Remove this use of "setTextAppearance"; it is deprecated.(Ùú˜Êøÿÿÿÿ8ÃüôÀý0
[
java:S1874Ê"DRemove this use of "EXTRA_SHORTCUT_ICON_RESOURCE"; it is deprecated.(§éǾ
java:S1874Ñ"=Remove this use of "EXTRA_SHORTCUT_INTENT"; it is deprecated.(·Ã°Ÿ8ËüôÀý0
Y
java:S1874Ò";Remove this use of "EXTRA_SHORTCUT_NAME"; it is deprecated.(ÒÀ‘ç8ËüôÀý0
b
java:S1874Ô"DRemove this use of "EXTRA_SHORTCUT_ICON_RESOURCE"; it is deprecated.(§éǾ8ËüôÀý0

@ -0,0 +1,13 @@
p
java:S1192Ž"MDefine a constant instead of duplicating this literal "Unknown URI " 4 times.(¶ª¦þüÿÿÿÿ8¹Åë²ý0
T
java:S1153ž"1Directly append the argument of String.valueOf().(œËߦýÿÿÿÿ8»Åë²ý0

java:S3008L"eRename this field "NOTES_SNIPPET_SEARCH_QUERY" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Èò<C388>ƒùÿÿÿÿ8ðÅë²ý0
f
java:S1659"CDeclare "noteId" and all following declarations on a separate line.(Ÿàؘøÿÿÿÿ8úÅë²ý0
[
java:S2130É"8Use "Long.parseLong" for this string-to-long conversion.(•ãÿ¬ÿÿÿÿÿ8ýÅë²ý0
U
java:S1135­"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ8²Æë²ý0

@ -0,0 +1,15 @@
r java:S116w"VRename this field "TEXT_FORMAT" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Ñ›–¼8±ü©µý0
p
java:S3776¨"RRefactor this method to reduce its Cognitive Complexity from 27 to the 15 allowed.(œÃÁí8´ü©µý0
o
java:S3776Ý"RRefactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed.(ì´ê8¸ü©µý0
b
java:S2147°"ECombine this catch with the one at line 301, which has the same body.(‰üú8¼ü©µý0
c
java:S2147Ñ"ECombine this catch with the one at line 335, which has the same body.(ï­£Ä8¾ü©µý0
d java:S899Ì"BDo something with the "boolean" value returned by "createNewFile".(ôÃáæüÿÿÿÿ8¿ü©µý0
F
java:S3398»"#Move this method into "TextExport".(¨ä¿ÿýÿÿÿÿ8¿ü©µý0
@
java:S3398H"#Move this method into "TextExport".(…´<C2B4>8¿ü©µý0

@ -0,0 +1,98 @@
p
java:S2293ƒ"YReplace the type specification in this constructor call with the diamond operator ("<>").(艥ð
>
java:S1604"(Make this anonymous inner class a lambda(—̺V
?
java:S1604Ê"(Make this anonymous inner class a lambda(ά¯”
?
java:S1604À"(Make this anonymous inner class a lambda(¿Ü´ã
D
java:S1604Ù"(Make this anonymous inner class a lambda(ˆÐï<C390>øÿÿÿÿ
?
java:S1604á"(Make this anonymous inner class a lambda(øÄì‡
?
java:S1604Æ"(Make this anonymous inner class a lambda(Û±¼ 
?
java:S1604é"(Make this anonymous inner class a lambda(ά¯”
g
java:S1301±"KReplace this "switch" statement by "if" statements to increase readability.(ד¾ñùÿÿÿÿ
Z
java:S2583§"CChange this condition so that it does not always evaluate to "true"(¢õ§˜
7
java:S1116`"Remove this empty statement.(ôŸŽìúÿÿÿÿ
a
java:S1124"EReorder the modifiers to comply with the Java Language Specification.(¹úæµûÿÿÿÿ
[
java:S1124ˆ"EReorder the modifiers to comply with the Java Language Specification.(ìѾk
n
java:S3776 "RRefactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed.(áé–Þÿÿÿÿÿ
2
java:S3626±"Remove this redundant jump.(ûÁÝ…
2
java:S3626µ"Remove this redundant jump.(ûÁÝ…
2
java:S3626É"Remove this redundant jump.(ûÁÝ…
P
java:S1874¡"9Remove this use of "PreferenceManager"; it is deprecated.(­©Ð
Z
java:S1874¡"CRemove this use of "getDefaultSharedPreferences"; it is deprecated.(­©Ð
N
java:S1135»"2Complete the task associated to this TODO comment.(ÕÌ<C395>®þÿÿÿÿ
F
java:S2093¥"*Change this "try" to a try-with-resources.(¡»¢üùÿÿÿÿ
o
java:S1450í"XRemove the "mMoveMenu" field and declare it as a local variable in the relevant methods.(ž¢—ò
n
java:S3252ê"RUse static access with "android.widget.AbsListView" for "MultiChoiceModeListener".(¦Ûî„úÿÿÿÿ
N
java:S1135¢"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
N
java:S1135§"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
U
java:S1874â"9Remove this use of "getDefaultDisplay"; it is deprecated.(ĸ¬Ìýÿÿÿÿ
M
java:S1874ã"1Remove this use of "getHeight"; it is deprecated.(·¡ªÃýÿÿÿÿ
8
java:S1116"Remove this empty statement.(ôŸŽìúÿÿÿÿ
i
java:S3776Ø"RRefactor this method to reduce its Cognitive Complexity from 20 to the 15 allowed.(ãìîí
C
java:S1874Ù".Remove this use of "<init>"; it is deprecated.(ýî?
? java:S108ß")Either remove or fill this block of code.(žûÊ¥
a
java:S1874ï"JDon't override a deprecated method or explicitly mark it as "@Deprecated".(§Í¿Â
K
java:S1874ú"/Remove this use of "execute"; it is deprecated.( å«<C3A5>ûÿÿÿÿ
S
java:S1874½"7Remove this use of "toggleSoftInput"; it is deprecated.(© …áúÿÿÿÿ
O
java:S1874½"3Remove this use of "SHOW_FORCED"; it is deprecated.(© …áúÿÿÿÿ
h
java:S3776Æ"RRefactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed.(ÅôÉ#
N
java:S1135ˆ"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
^
java:S1126<18>"BReplace this if-then-else statement by a single method invocation.(玒¦ýÿÿÿÿ
N
java:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
f
java:S1874œ"JDon't override a deprecated method or explicitly mark it as "@Deprecated".(œƒƒ©ùÿÿÿÿ
Q
java:S1874¬"5Remove this use of "onBackPressed"; it is deprecated.(<28>Ñàÿÿÿÿÿ
J
java:S1874½".Remove this use of "<init>"; it is deprecated.(ЧðÛýÿÿÿÿ
f
java:S1874Å"JDon't override a deprecated method or explicitly mark it as "@Deprecated".(÷ችûÿÿÿÿ
K
java:S1874â"/Remove this use of "execute"; it is deprecated.( å«<C3A5>ûÿÿÿÿ
h
java:S3776ñ"RRefactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed.(ôŒùb
K
java:S3398¼"/Move this method into "BackgroundQueryHandler".(—÷õŽüÿÿÿÿ
<
java:S3398Ø"%Move this method into "ModeCallback".(ãìîí
A
java:S3398˜"%Move this method into "ModeCallback".(“ðÉçýÿÿÿÿ
G
java:S3398˜"0Move this method into "OnListItemClickListener".(‘ðð¡

@ -87,12 +87,8 @@ t
Dapp/src/main/java/net/micode/notes/widget/NoteWidgetProvider_4x.java,2\b\2b687ab930681e3885683578d43df600a0a20982
[
+app/src/main/res/layout/settings_header.xml,0\1\0141ed096ee7cdbb52dc6a8b0e8eae49847eb64a
i
9app/src/main/java/net/micode/notes/model/WorkingNote.java,8\7\876016634c6642b35109680ccac740dc8271b236
\
,app/src/main/res/layout/folder_list_item.xml,a\c\ac5e313f29cb4f0fad090fd0ffb56da5b70cb36a
b
2app/src/main/java/net/micode/notes/model/Note.java,d\d\dd970bd8ce083850fca1d4d159647ccd110e57cb
U
%app/src/main/res/layout/note_edit.xml,9\7\97872a23506db5ffaa04e04bd96b003493352c30
~
@ -135,12 +131,8 @@ f
6app/src/main/java/net/micode/notes/tool/DataUtils.java,3\2\32360bf24febc78f20db52498c7576b3d8650d56
k
;app/src/main/java/net/micode/notes/tool/ResourceParser.java,c\6\c65f5dc8218ef1da6f6bfb5d1b14aea855a54d7f
d
4app/src/main/java/net/micode/notes/data/Contact.java,9\a\9a3a19793537958b8b1b03a81985999e22705a2f
m
=app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java,c\4\c42ad3cd6e664963fa1849c760a57d417d500ee7
b
2app/src/main/java/net/micode/notes/data/Notes.java,a\7\a7641cfac724321d508c2a284223a711011a93f5
h
8app/src/main/java/net/micode/notes/ui/AlarmReceiver.java,5\8\5836a695995df8fadacfa6409fe8d21d88946842
i
@ -151,11 +143,29 @@ h
8app/src/main/java/net/micode/notes/ui/NotesListItem.java,5\d\5dfe6902d8ec740690f88d644e74362c3be08fad
k
;app/src/main/java/net/micode/notes/ui/NotesListAdapter.java,2\8\283f16cc23da56ca65616082bc810304d3511d0a
k
;app/src/main/java/net/micode/notes/ui/NoteEditActivity.java,5\7\577f30d26378ec8a2bd2e4a43f3c79b3f04c402c
g
7app/src/main/java/net/micode/notes/ui/DropdownMenu.java,d\1\d1cc822fa9d783a8d4563bf6e139b7ae10de2fb1
o
?app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java,2\b\2bfc771e07e87c37d3a76a2c815bc8fb30649798
m
=app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java,3\e\3e688be40dc69cfd1062f41d0fc27fe261a26710
l
<app/src/main/java/net/micode/notes/ui/NotesListActivity.java,a\d\ad72331a1bed265bb9c0fe838faa74dbf69fce32
p
@app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java,1\e\1eb2363b523dbcae43d3c6e4790c64436af61b13
j
:app/src/main/java/net/micode/notes/data/NotesProvider.java,6\a\6a65e747031f27aef20597b4181148a9fbf963d5
h
8app/src/main/java/net/micode/notes/tool/BackupUtils.java,a\4\a446c87b1013132f8adaf83656b582028e8809af
d
4app/src/main/java/net/micode/notes/data/Contact.java,9\a\9a3a19793537958b8b1b03a81985999e22705a2f
g
7app/src/main/java/net/micode/notes/ui/NoteEditText.java,5\0\503adcf2a0be1ecdb94a15efba4433b6589877b9
7app/src/main/java/net/micode/notes/ui/NoteEditText.java,5\0\503adcf2a0be1ecdb94a15efba4433b6589877b9
b
2app/src/main/java/net/micode/notes/model/Note.java,d\d\dd970bd8ce083850fca1d4d159647ccd110e57cb
b
2app/src/main/java/net/micode/notes/data/Notes.java,a\7\a7641cfac724321d508c2a284223a711011a93f5
i
9app/src/main/java/net/micode/notes/model/WorkingNote.java,8\7\876016634c6642b35109680ccac740dc8271b236
k
;app/src/main/java/net/micode/notes/ui/NoteEditActivity.java,5\7\577f30d26378ec8a2bd2e4a43f3c79b3f04c402c

@ -87,12 +87,8 @@ t
Dapp/src/main/java/net/micode/notes/widget/NoteWidgetProvider_4x.java,2\b\2b687ab930681e3885683578d43df600a0a20982
[
+app/src/main/res/layout/settings_header.xml,0\1\0141ed096ee7cdbb52dc6a8b0e8eae49847eb64a
i
9app/src/main/java/net/micode/notes/model/WorkingNote.java,8\7\876016634c6642b35109680ccac740dc8271b236
\
,app/src/main/res/layout/folder_list_item.xml,a\c\ac5e313f29cb4f0fad090fd0ffb56da5b70cb36a
b
2app/src/main/java/net/micode/notes/model/Note.java,d\d\dd970bd8ce083850fca1d4d159647ccd110e57cb
U
%app/src/main/res/layout/note_edit.xml,9\7\97872a23506db5ffaa04e04bd96b003493352c30
~
@ -135,12 +131,8 @@ f
6app/src/main/java/net/micode/notes/tool/DataUtils.java,3\2\32360bf24febc78f20db52498c7576b3d8650d56
k
;app/src/main/java/net/micode/notes/tool/ResourceParser.java,c\6\c65f5dc8218ef1da6f6bfb5d1b14aea855a54d7f
d
4app/src/main/java/net/micode/notes/data/Contact.java,9\a\9a3a19793537958b8b1b03a81985999e22705a2f
m
=app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java,c\4\c42ad3cd6e664963fa1849c760a57d417d500ee7
b
2app/src/main/java/net/micode/notes/data/Notes.java,a\7\a7641cfac724321d508c2a284223a711011a93f5
h
8app/src/main/java/net/micode/notes/ui/AlarmReceiver.java,5\8\5836a695995df8fadacfa6409fe8d21d88946842
i
@ -151,11 +143,29 @@ h
8app/src/main/java/net/micode/notes/ui/NotesListItem.java,5\d\5dfe6902d8ec740690f88d644e74362c3be08fad
k
;app/src/main/java/net/micode/notes/ui/NotesListAdapter.java,2\8\283f16cc23da56ca65616082bc810304d3511d0a
k
;app/src/main/java/net/micode/notes/ui/NoteEditActivity.java,5\7\577f30d26378ec8a2bd2e4a43f3c79b3f04c402c
g
7app/src/main/java/net/micode/notes/ui/DropdownMenu.java,d\1\d1cc822fa9d783a8d4563bf6e139b7ae10de2fb1
o
?app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java,2\b\2bfc771e07e87c37d3a76a2c815bc8fb30649798
m
=app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java,3\e\3e688be40dc69cfd1062f41d0fc27fe261a26710
l
<app/src/main/java/net/micode/notes/ui/NotesListActivity.java,a\d\ad72331a1bed265bb9c0fe838faa74dbf69fce32
h
8app/src/main/java/net/micode/notes/tool/BackupUtils.java,a\4\a446c87b1013132f8adaf83656b582028e8809af
d
4app/src/main/java/net/micode/notes/data/Contact.java,9\a\9a3a19793537958b8b1b03a81985999e22705a2f
p
@app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java,1\e\1eb2363b523dbcae43d3c6e4790c64436af61b13
j
:app/src/main/java/net/micode/notes/data/NotesProvider.java,6\a\6a65e747031f27aef20597b4181148a9fbf963d5
i
9app/src/main/java/net/micode/notes/model/WorkingNote.java,8\7\876016634c6642b35109680ccac740dc8271b236
g
7app/src/main/java/net/micode/notes/ui/NoteEditText.java,5\0\503adcf2a0be1ecdb94a15efba4433b6589877b9
7app/src/main/java/net/micode/notes/ui/NoteEditText.java,5\0\503adcf2a0be1ecdb94a15efba4433b6589877b9
b
2app/src/main/java/net/micode/notes/model/Note.java,d\d\dd970bd8ce083850fca1d4d159647ccd110e57cb
b
2app/src/main/java/net/micode/notes/data/Notes.java,a\7\a7641cfac724321d508c2a284223a711011a93f5
k
;app/src/main/java/net/micode/notes/ui/NoteEditActivity.java,5\7\577f30d26378ec8a2bd2e4a43f3c79b3f04c402c

@ -1,4 +1,4 @@
#Mon May 01 17:38:06 CST 2023
#Mon May 01 23:21:50 CST 2023
base.0=E\:\\Notes-master1\\app\\build\\intermediates\\dex\\debug\\mergeDexDebug\\classes.dex
renamed.0=classes.dex
path.0=classes.dex

@ -1,20 +0,0 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "net.micode.notes",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "0.1",
"outputFile": "app-debug.apk"
}
],
"elementType": "File"
}

@ -463,6 +463,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
private boolean clearSettingState() {
//判断控件可见或者隐藏,getVisibility()返回值为0,VISIBLE 可见返回值为4,INVISIBLE 不可见但是占用布局空间,返回值为8,GONE 不可见也不占用布局空间
//如果可见就隐藏
if (mNoteBgColorSelector.getVisibility() == View.VISIBLE) {
mNoteBgColorSelector.setVisibility(View.GONE);
return true;
@ -482,25 +484,33 @@ public class NoteEditActivity extends Activity implements OnClickListener,
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
if (isFinishing()) {
return true;
}
clearSettingState();
menu.clear();
if (mWorkingNote.getFolderId() == Notes.ID_CALL_RECORD_FOLDER) {
getMenuInflater().inflate(R.menu.call_note_edit, menu);
} else {
getMenuInflater().inflate(R.menu.note_edit, menu);
}
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
menu.findItem(R.id.menu_list_mode).setTitle(R.string.menu_normal_mode);
} else {
menu.findItem(R.id.menu_list_mode).setTitle(R.string.menu_list_mode);
}
if (mWorkingNote.hasClockAlert()) {
menu.findItem(R.id.menu_alert).setVisible(false);
} else {
menu.findItem(R.id.menu_delete_remind).setVisible(false);
//Activity是否活跃
//活跃直接退出,不活跃就隐藏控件
if (!isFinishing()) {
//隐藏控件
clearSettingState();
//菜单清除
menu.clear();
//MenuInflater是用来实例化Menu目录下的Menu布局文件的,是Android中使用菜单的代码通过getMenuInflater()方法将一个XML文件中的菜单布局加载进来
//第一个参数表示要加载菜单布局的ID,第二个参数表示要将菜单布局添加到哪个菜单项中
if (mWorkingNote.getFolderId() == Notes.ID_CALL_RECORD_FOLDER) {
getMenuInflater().inflate(R.menu.call_note_edit, menu);
} else {
getMenuInflater().inflate(R.menu.note_edit, menu);
}
//findItem获取Menu实例,setTitle设置窗口菜单标题
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
menu.findItem(R.id.menu_list_mode).setTitle(R.string.menu_normal_mode);
} else {
menu.findItem(R.id.menu_list_mode).setTitle(R.string.menu_list_mode);
}
//setVisible(boolean)方法是用来显示/隐藏GUI组件的。
//需要显示则使用true需要隐藏则使用false。
if (mWorkingNote.hasClockAlert()) {
menu.findItem(R.id.menu_alert).setVisible(false);
} else {
menu.findItem(R.id.menu_delete_remind).setVisible(false);
}
}
return true;
}

Loading…
Cancel
Save