diff --git a/src/MyApplication/.idea/sonarlint/issuestore/0/3/037b293928bff3f763d72038512124d16aebd627 b/src/MyApplication/.idea/sonarlint/issuestore/0/3/037b293928bff3f763d72038512124d16aebd627
index 931004c..d72d28b 100644
--- a/src/MyApplication/.idea/sonarlint/issuestore/0/3/037b293928bff3f763d72038512124d16aebd627
+++ b/src/MyApplication/.idea/sonarlint/issuestore/0/3/037b293928bff3f763d72038512124d16aebd627
@@ -1,9 +1,11 @@
 
+rsquid:S1450"]Remove the "mDefaultBgPath" field and declare it as a local variable in the relevant methods.(­çêè
 Lsquid:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
 Lsquid:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
 csquid:CallToDeprecatedMethod"=Remove this use of "setBackgroundDrawable"; it is deprecated.(Ìý´Ÿ
+Fsquid:S1905",Remove this unnecessary cast to "ImageView".(„üîÄÿÿÿÿÿ
 Lsquid:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
-Lsquid:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
->squid:S1659"*Declare "backgroundIv" on a separate line.(·«ï
 bsquid:S1226"HIntroduce a new variable instead of reusing the parameter "convertView".(îªÙ¨ùÿÿÿÿ
-rsquid:S1450"]Remove the "mDefaultBgPath" field and declare it as a local variable in the relevant methods.(­çêè
\ No newline at end of file
+Asquid:S1905",Remove this unnecessary cast to "ImageView".(éßÜà
+Lsquid:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
+>squid:S1659"*Declare "backgroundIv" on a separate line.(·«ï
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/2/4/2432e00ff27b3c4e488bc12d8149cc4f0583cb71 b/src/MyApplication/.idea/sonarlint/issuestore/2/4/2432e00ff27b3c4e488bc12d8149cc4f0583cb71
new file mode 100644
index 0000000..8d457b4
--- /dev/null
+++ b/src/MyApplication/.idea/sonarlint/issuestore/2/4/2432e00ff27b3c4e488bc12d8149cc4f0583cb71
@@ -0,0 +1,2 @@
+
+Esquid:S1905"+Remove this unnecessary cast to "TextView".(©ßåçøÿÿÿÿ
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/6/0/6017e946e5380fbd8e8ec44cf82432536cb0c89d b/src/MyApplication/.idea/sonarlint/issuestore/6/0/6017e946e5380fbd8e8ec44cf82432536cb0c89d
new file mode 100644
index 0000000..4126771
--- /dev/null
+++ b/src/MyApplication/.idea/sonarlint/issuestore/6/0/6017e946e5380fbd8e8ec44cf82432536cb0c89d
@@ -0,0 +1,20 @@
+
+esquid:S1301"KReplace this "switch" statement by "if" statements to increase readability.(öÛ«°þÿÿÿÿ
+=squid:S1148"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ
+_squid:CallToDeprecatedMethod":Remove this use of "setAudioStreamType"; it is deprecated.(¡Ìé0
+Lsquid:S1135"2Complete the task associated to this TODO comment.(ÕÌ�®þÿÿÿÿ
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(¡Õ±š
+Zsquid:S2147"ECombine this catch with the one at line 106, which has the same body.(ï­£Ä
+=squid:S1148"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ
+Lsquid:S1135"2Complete the task associated to this TODO comment.(ÕÌ�®þÿÿÿÿ
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(¹ß„º
+Xsquid:CallToDeprecatedMethod"2Remove this use of "isScreenOn"; it is deprecated.(¤® ²
+esquid:CallToDeprecatedMethod":Remove this use of "setAudioStreamType"; it is deprecated.(†Å¨ªùÿÿÿÿ
+Lsquid:S1135"2Complete the task associated to this TODO comment.(ÕÌ�®þÿÿÿÿ
+Zsquid:S2147"ECombine this catch with the one at line 106, which has the same body.(‚ùïÄ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(æåÞ˜üÿÿÿÿ
+=squid:S1148"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ
+=squid:S1148"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ
+_squid:S2147"ECombine this catch with the one at line 106, which has the same body.(ÿëÛßúÿÿÿÿ
+Lsquid:S1135"2Complete the task associated to this TODO comment.(ÕÌ�®þÿÿÿÿ
+=squid:S1148"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/6/5/65764ff37783669e71501692a607a3cea49c4bdc b/src/MyApplication/.idea/sonarlint/issuestore/6/5/65764ff37783669e71501692a607a3cea49c4bdc
index 89b0f9c..09a64ea 100644
--- a/src/MyApplication/.idea/sonarlint/issuestore/6/5/65764ff37783669e71501692a607a3cea49c4bdc
+++ b/src/MyApplication/.idea/sonarlint/issuestore/6/5/65764ff37783669e71501692a607a3cea49c4bdc
@@ -2,9 +2,9 @@
 gsquid:S00117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Š÷˜Í
 Vsquid:S2184"ACast one of the operands of this addition operation to a "float".(ÆÞ–’
 Ysquid:S2184"DCast one of the operands of this subtraction operation to a "float".(ðä˜Š
-Vsquid:S2184"ACast one of the operands of this addition operation to a "float".(ƒ‰Á¨
-Tsquid:S1118":Add a private constructor to hide the implicit public one.(Ì²�íùÿÿÿÿ
-›squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(â¡ú—ÿÿÿÿÿ
 =squid:S1172"(Remove this unused method parameter "X".(Š÷˜Í
-^squid:S2184"DCast one of the operands of this subtraction operation to a "float".(¨ùã¸ùÿÿÿÿ
-›squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(•€ÕÎùÿÿÿÿ
\ No newline at end of file
+Tsquid:S1118":Add a private constructor to hide the implicit public one.(Ì²�íùÿÿÿÿ
+›squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(•€ÕÎùÿÿÿÿ
+›squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(â¡ú—ÿÿÿÿÿ
+Vsquid:S2184"ACast one of the operands of this addition operation to a "float".(ƒ‰Á¨
+^squid:S2184"DCast one of the operands of this subtraction operation to a "float".(¨ùã¸ùÿÿÿÿ
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/9/5/954e8115c9434902b13d9840c149e0ff3fe59df2 b/src/MyApplication/.idea/sonarlint/issuestore/9/5/954e8115c9434902b13d9840c149e0ff3fe59df2
index 3ebfc42..38dc9a4 100644
--- a/src/MyApplication/.idea/sonarlint/issuestore/9/5/954e8115c9434902b13d9840c149e0ff3fe59df2
+++ b/src/MyApplication/.idea/sonarlint/issuestore/9/5/954e8115c9434902b13d9840c149e0ff3fe59df2
@@ -1,7 +1,7 @@
 
-[squid:CallToDeprecatedMethod"0Remove this use of "fromHtml"; it is deprecated.(Ë–ü÷ùÿÿÿÿ
-ysquid:S1488"_Immediately return this expression instead of assigning it to the temporary variable "builder".(’âÃƒùÿÿÿÿ
-Osquid:S1118":Add a private constructor to hide the implicit public one.(¨üÕ¢
 asquid:CallToDeprecatedMethod"6Remove this use of "ProgressDialog"; it is deprecated.(ïÛôÜýÿÿÿÿ
+ysquid:S1488"_Immediately return this expression instead of assigning it to the temporary variable "builder".(’âÃƒùÿÿÿÿ
+[squid:CallToDeprecatedMethod"0Remove this use of "fromHtml"; it is deprecated.(Ë–ü÷ùÿÿÿÿ
 \squid:CallToDeprecatedMethod"6Remove this use of "ProgressDialog"; it is deprecated.(¸Ø§Î
-\squid:CallToDeprecatedMethod"6Remove this use of "ProgressDialog"; it is deprecated.(¸Ø§Î
\ No newline at end of file
+\squid:CallToDeprecatedMethod"6Remove this use of "ProgressDialog"; it is deprecated.(¸Ø§Î
+Osquid:S1118":Add a private constructor to hide the implicit public one.(¨üÕ¢
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/9/f/9f49ae81d31735cbb5ea0dec8c22fb85771170ad b/src/MyApplication/.idea/sonarlint/issuestore/9/f/9f49ae81d31735cbb5ea0dec8c22fb85771170ad
new file mode 100644
index 0000000..fbfaa0b
--- /dev/null
+++ b/src/MyApplication/.idea/sonarlint/issuestore/9/f/9f49ae81d31735cbb5ea0dec8c22fb85771170ad
@@ -0,0 +1,4 @@
+
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ÕÝ¥õúÿÿÿÿ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ÕÝ¥õúÿÿÿÿ
+asquid:S1192"GDefine a constant instead of duplicating this literal "isTran" 3 times.(ý‘™ þÿÿÿÿ
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/a/c/ac6e0c942798c8a768fab2e3ab7e6a6b69b346f1 b/src/MyApplication/.idea/sonarlint/issuestore/a/c/ac6e0c942798c8a768fab2e3ab7e6a6b69b346f1
new file mode 100644
index 0000000..e69de29
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/c/5/c5ce6afdb0606af7b3aad034a3799dc44d4d4c5c b/src/MyApplication/.idea/sonarlint/issuestore/c/5/c5ce6afdb0606af7b3aad034a3799dc44d4d4c5c
index 4095dfb..78ce92f 100644
--- a/src/MyApplication/.idea/sonarlint/issuestore/c/5/c5ce6afdb0606af7b3aad034a3799dc44d4d4c5c
+++ b/src/MyApplication/.idea/sonarlint/issuestore/c/5/c5ce6afdb0606af7b3aad034a3799dc44d4d4c5c
@@ -1,32 +1,34 @@
 
 =squid:S1481")Remove this unused "list" local variable.(Ì¿Íh
-`squid:UselessImportCheck">Remove this unused import 'cn.bmob.v3.listener.LogInListener'.(ØÖü³
-msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(ÕÓí³þÿÿÿÿ
-hsquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(ÐÀÏ‡
-fsquid:UselessImportCheck"?Remove this unused import 'cn.bmob.v3.exception.BmobException'.(Æš…Åùÿÿÿÿ
-Lsquid:S1854"8Remove this useless assignment to local variable "list".(Ì¿Íh
-msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(·üÏÏúÿÿÿÿ
-msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(©²ŒÌÿÿÿÿÿ
-`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ú°à¬
-`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ÒäÕ§
-–squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.( µâ²
-esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ßÕù•ýÿÿÿÿ
-msquid:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(Ì¿Íh
-msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(ÆŸßêùÿÿÿÿ
 lsquid:S00117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ì‡¯Úþÿÿÿÿ
-esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(°þíÈÿÿÿÿÿ
-hsquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(¹¶Á»
-nsquid:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(ÚÒîÊ
-`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(�ÄŠæ
-esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ã‘¨�úÿÿÿÿ
-esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(™ØÓ¯ûÿÿÿÿ
-`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(òü€–
-esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ò£èÄûÿÿÿÿ
-~squid:UselessImportCheck"\Remove this unused import 'com.nostra13.universalimageloader.core.ImageLoaderConfiguration'.(ì¢£±
-[squid:UnusedPrivateMethod"3Remove this unused private "updateUserHead" method.(¤È‚Ìýÿÿÿÿ
-–squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(¹ó¯™
-–squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(“¨ëø
-`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ôˆ«¿
 msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(ì‡¯Úþÿÿÿÿ
-isquid:UselessImportCheck"GRemove this unused import 'com.htq.baidu.coolnote.app.BaseApplication'.(°¤ù‰
+Lsquid:S1854"8Remove this useless assignment to local variable "list".(Ì¿Íh
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(�ÄŠæ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ßÕù•ýÿÿÿÿ
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ú°à¬
+–squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(¹ó¯™
+‘squid:S1845"|Rename method "Login" to prevent any misunderstanding/clash with method "login" defined in superclass "cn.bmob.v3.BmobUser".(¹ó¯™
+hsquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(ÐÀÏ‡
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(òü€–
+msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(·üÏÏúÿÿÿÿ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(°þíÈÿÿÿÿÿ
+[squid:UnusedPrivateMethod"3Remove this unused private "updateUserHead" method.(¤È‚Ìýÿÿÿÿ
+hsquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(¹¶Á»
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ôˆ«¿
+–squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.( µâ²
+msquid:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(Ì¿Íh
+`squid:UselessImportCheck">Remove this unused import 'cn.bmob.v3.listener.LogInListener'.(ØÖü³
+fsquid:UselessImportCheck"?Remove this unused import 'cn.bmob.v3.exception.BmobException'.(Æš…Åùÿÿÿÿ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(™ØÓ¯ûÿÿÿÿ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ò£èÄûÿÿÿÿ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ã‘¨�úÿÿÿÿ
+dsquid:S00100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¹ó¯™
+~squid:UselessImportCheck"\Remove this unused import 'com.nostra13.universalimageloader.core.ImageLoaderConfiguration'.(ì¢£±
+nsquid:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(ÚÒîÊ
+squid:UselessImportCheck"XRemove this unused import 'com.example.administrator.myapplication.app.BaseApplication'.(‘”ÛÓúÿÿÿÿ
+msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(©²ŒÌÿÿÿÿÿ
+–squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(“¨ëø
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ÒäÕ§
+msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(ÆŸßêùÿÿÿÿ
+msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(ÕÓí³þÿÿÿÿ
 `squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ú°à¬
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/d/2/d2c92a556e47fd0e9a3fa038dbf835129e2f5090 b/src/MyApplication/.idea/sonarlint/issuestore/d/2/d2c92a556e47fd0e9a3fa038dbf835129e2f5090
index 52c6858..25f48ae 100644
--- a/src/MyApplication/.idea/sonarlint/issuestore/d/2/d2c92a556e47fd0e9a3fa038dbf835129e2f5090
+++ b/src/MyApplication/.idea/sonarlint/issuestore/d/2/d2c92a556e47fd0e9a3fa038dbf835129e2f5090
@@ -1,7 +1,7 @@
 
-Vsquid:S2184"ACast one of the operands of this division operation to a "float".(Äµöö
-Vsquid:S2184"ACast one of the operands of this division operation to a "float".(Äµöö
-Vsquid:S2184"ACast one of the operands of this division operation to a "float".(ñÌ–à
-Vsquid:S2184"ACast one of the operands of this division operation to a "float".(ñÌ–à
 Vsquid:S2184"ACast one of the operands of this addition operation to a "float".(†¬’²
+Vsquid:S2184"ACast one of the operands of this division operation to a "float".(ñÌ–à
+Vsquid:S2184"ACast one of the operands of this division operation to a "float".(ñÌ–à
+Vsquid:S2184"ACast one of the operands of this division operation to a "float".(Äµöö
+Vsquid:S2184"ACast one of the operands of this division operation to a "float".(Äµöö
 Vsquid:S2184"ACast one of the operands of this addition operation to a "float".(†¬’²
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/d/5/d5b72c9513d313bcf937771f4e19798894789154 b/src/MyApplication/.idea/sonarlint/issuestore/d/5/d5b72c9513d313bcf937771f4e19798894789154
new file mode 100644
index 0000000..d9055ef
--- /dev/null
+++ b/src/MyApplication/.idea/sonarlint/issuestore/d/5/d5b72c9513d313bcf937771f4e19798894789154
@@ -0,0 +1,12 @@
+
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ì¢ÃŒ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ç¶¸�þÿÿÿÿ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(‚—Å›üÿÿÿÿ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ïÁ´Ìüÿÿÿÿ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ÀÌ€»úÿÿÿÿ
+Lsquid:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
+Lsquid:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
+asquid:CallToDeprecatedMethod"6Remove this use of "ProgressDialog"; it is deprecated.(¬ÿºîÿÿÿÿÿ
+asquid:CallToDeprecatedMethod"6Remove this use of "ProgressDialog"; it is deprecated.(¬ÿºîÿÿÿÿÿ
+gsquid:S00117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ŸÏ™˜
+dsquid:MaximumInheritanceDepth"=This class has 10 parents which is greater than 5 authorized.(Ê¨¹�
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/d/9/d9f0b00bd9259256a0cc6a48eb4c59665266c4ea b/src/MyApplication/.idea/sonarlint/issuestore/d/9/d9f0b00bd9259256a0cc6a48eb4c59665266c4ea
index 46ab0ba..5007f70 100644
--- a/src/MyApplication/.idea/sonarlint/issuestore/d/9/d9f0b00bd9259256a0cc6a48eb4c59665266c4ea
+++ b/src/MyApplication/.idea/sonarlint/issuestore/d/9/d9f0b00bd9259256a0cc6a48eb4c59665266c4ea
@@ -1,13 +1,12 @@
 
-Isquid:S1066"/Merge this if statement with the enclosing one.(¿±Ïßüÿÿÿÿ
-<squid:S1214""Move constants to a class or enum.(×™´ªùÿÿÿÿ
-Lsquid:S1135"2Complete the task associated to this TODO comment.(ÉÓÈìýÿÿÿÿ
-Gsquid:S1135"2Complete the task associated to this TODO comment.(ž¼í 
-Gsquid:S1135"2Complete the task associated to this TODO comment.(ž¼í 
-Gsquid:S1135"2Complete the task associated to this TODO comment.(Ö¾ã¯
-Gsquid:S1135"2Complete the task associated to this TODO comment.(Àó‚´
-gsquid:S3776"RRefactor this method to reduce its Cognitive Complexity from 20 to the 15 allowed.(Æ¿ú„
-[squid:S2142"FEither re-interrupt this method or rethrow the "InterruptedException".(ä ¹€
-›squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(ô¬ý¶ùÿÿÿÿ
-Osquid:S2386"5Move "PROJECTION" to a class and lower its visibility(‡ÎÌÑùÿÿÿÿ
-dsquid:MaximumInheritanceDepth"=This class has 10 parents which is greater than 5 authorized.(ôã©Ö
\ No newline at end of file
+S"squid:SwitchLastCaseIsDefaultCheck""Add a default case to this switch.(×“¾ñùÿÿÿÿ
+esquid:S1301"KReplace this "switch" statement by "if" statements to increase readability.(×“¾ñùÿÿÿÿ
+esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ïðóºÿÿÿÿÿ
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ìÓ›ù
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ôˆ«¿
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(�„…¬
+^squid:CallToDeprecatedMethod"3Remove this use of "getDrawable"; it is deprecated.(í–‹¦ýÿÿÿÿ
+^squid:CallToDeprecatedMethod"3Remove this use of "getDrawable"; it is deprecated.(Îôéªûÿÿÿÿ
+asquid:CallToDeprecatedMethod"6Remove this use of "ProgressDialog"; it is deprecated.(‡…¾Íþÿÿÿÿ
+asquid:CallToDeprecatedMethod"6Remove this use of "ProgressDialog"; it is deprecated.(‡…¾Íþÿÿÿÿ
+isquid:MaximumInheritanceDepth"=This class has 10 parents which is greater than 5 authorized.(•«ú§üÿÿÿÿ
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/f/4/f4db46de912ee15bd8dff2e67791e614cfdc8ae8 b/src/MyApplication/.idea/sonarlint/issuestore/f/4/f4db46de912ee15bd8dff2e67791e614cfdc8ae8
index 3074493..53073b7 100644
--- a/src/MyApplication/.idea/sonarlint/issuestore/f/4/f4db46de912ee15bd8dff2e67791e614cfdc8ae8
+++ b/src/MyApplication/.idea/sonarlint/issuestore/f/4/f4db46de912ee15bd8dff2e67791e614cfdc8ae8
@@ -1,2 +1,6 @@
 
-isquid:MaximumInheritanceDepth"=This class has 10 parents which is greater than 5 authorized.(°ïÇåüÿÿÿÿ
\ No newline at end of file
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(å¸œ†
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ôˆ«¿
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(¢¾ôŽ
+isquid:MaximumInheritanceDepth"=This class has 10 parents which is greater than 5 authorized.(°ïÇåüÿÿÿÿ
+`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(�„…¬
\ No newline at end of file
diff --git a/src/MyApplication/.idea/sonarlint/issuestore/index.pb b/src/MyApplication/.idea/sonarlint/issuestore/index.pb
index 0afc5ea..82839be 100644
--- a/src/MyApplication/.idea/sonarlint/issuestore/index.pb
+++ b/src/MyApplication/.idea/sonarlint/issuestore/index.pb
@@ -1,77 +1,27 @@
 
 <
 build.gradle,f\0\f07866736216be0ee2aba49e392191aeae700a35
-€
-Papp\src\main\java\com\example\administrator\myapplication\db\DatabaseHelper.java,a\a\aa2f43374bddf98bfc4aea5a398fe877e5337db3
-~
-Napp\src\main\java\com\example\administrator\myapplication\db\NoteDatabase.java,b\3\b395e8da890bfdf6daeefc467704d4b30eac2ea4
-‡
-Wapp\src\main\java\com\example\administrator\myapplication\adapter\BgPicGridAdapter.java,0\3\037b293928bff3f763d72038512124d16aebd627
-|
-Lapp\src\main\java\com\example\administrator\myapplication\entity\Entity.java,8\5\859e5ebe76cd38bc36ca8379efb50fa9654aada0
-|
-Lapp\src\main\java\com\example\administrator\myapplication\ui\EditImages.java,9\e\9ea0176c0b7c2596ee3a138d5aafcdb83764d0f4
-{
-Kapp\src\main\java\com\example\administrator\myapplication\ui\EditNotes.java,9\2\92cf1c7de3acc98eba6f939165f0bb2683705fcf
-
-Oapp\src\main\java\com\example\administrator\myapplication\ui\ImagesDisplay.java,a\6\a6e0067cc06ea7f07e5e3c87e060a04c54f022e7
-‚
-Rapp\src\main\java\com\example\administrator\myapplication\entity\NotebookData.java,4\8\487d5149cb35c7a7667af03d218f63298d21b1f0
-�
-Qapp\src\main\java\com\example\administrator\myapplication\entity\BgPicEntity.java,1\7\17acf378acdba9698dfb6d704084bcd18706d372
-ˆ
-Xapp\src\main\java\com\example\administrator\myapplication\entity\OnResponseListener.java,f\8\f8d5ad2e69267983911206328e3836505144d8db
-~
-Napp\src\main\java\com\example\administrator\myapplication\entity\Response.java,5\b\5b0e24b16ee3b9a006718e6880c3eb1eeff4d105
-�
-Qapp\src\main\java\com\example\administrator\myapplication\entity\UpdataEvent.java,d\c\dceb451ef5f82cbe33558978d2a79abc27fb6fe0
-z
-Japp\src\main\java\com\example\administrator\myapplication\entity\User.java,c\5\c5ce6afdb0606af7b3aad034a3799dc44d4d4c5c
-�
-]app\src\main\java\com\example\administrator\myapplication\ui\AppCompatPreferenceActivity.java,7\f\7fc1f946c8e0fc0221c21f1cb84787e5b2965d9a
-�
-Qapp\src\main\java\com\example\administrator\myapplication\utils\AccountUtils.java,6\2\623bf4dae8f8d83b8faa2b618d5550b1a37e5683
-‚
-Rapp\src\main\java\com\example\administrator\myapplication\utils\BmobConstants.java,3\4\342c9edfd27db16bba3e3455e68c749d04c55cbd
-~
-Napp\src\main\java\com\example\administrator\myapplication\utils\Constants.java,3\6\36c3f609a5d93035486e7c295cd723418b0f089e
-€
-Papp\src\main\java\com\example\administrator\myapplication\utils\CommonUtils.java,3\7\37269061f6dc97247d4050e30277a569050f1b3d
-‚
-Rapp\src\main\java\com\example\administrator\myapplication\utils\HTQAnimations.java,6\5\65764ff37783669e71501692a607a3cea49c4bdc
-|
-Lapp\src\main\java\com\example\administrator\myapplication\utils\MD5Util.java,0\0\00ede12c640622790c9816ae6766f38a949ed3bd
-€
-Papp\src\main\java\com\example\administrator\myapplication\utils\StringUtils.java,a\0\a02bf92a1675ea96231995a8137b01dd95f322ae
-|
-Lapp\src\main\java\com\example\administrator\myapplication\utils\SPUtils.java,5\7\57c831202760b4842bfc3ee5ac2511ebb0122f9e
-€
-Papp\src\main\java\com\example\administrator\myapplication\utils\SystemUtils.java,6\7\67ee5a70c0947c6377cf1e29856f6a79659f84e7
 
 Oapp\src\main\java\com\example\administrator\myapplication\utils\DialogHelp.java,9\5\954e8115c9434902b13d9840c149e0ff3fe59df2
-ƒ
-Sapp\src\main\java\com\example\administrator\myapplication\utils\ResourceParser.java,0\e\0eb5e393710f19bb3d38d5884bfea90461e2f527
-~
-Napp\src\main\java\com\example\administrator\myapplication\utils\PhotoUtil.java,9\f\9fbe46e342a1ff27349384d89b44b286ccf531a3
-�
-Qapp\src\main\java\com\example\administrator\myapplication\utils\TimeZoneUtil.java,f\d\fd0acbc65b4f2ecc0ae0379155f8cab404805cfb
-‘
-aapp\src\main\java\com\example\administrator\myapplication\widget\patternlock\LockPatternView.java,d\5\d55eada2cdd2dd102362d485231d9b377995b0b0
-‡
-Wapp\src\main\java\com\example\administrator\myapplication\widget\patternlock\Point.java,5\5\55a10cdfd1735580de467639a7fadbfa2db674ba
-…
-Uapp\src\main\java\com\example\administrator\myapplication\widget\HTQDragGridView.java,8\e\8e104bc4be91ecea7d96ed093e7eefd2be1a136c
+‚
+Rapp\src\main\java\com\example\administrator\myapplication\utils\HTQAnimations.java,6\5\65764ff37783669e71501692a607a3cea49c4bdc
+z
+Japp\src\main\java\com\example\administrator\myapplication\entity\User.java,c\5\c5ce6afdb0606af7b3aad034a3799dc44d4d4c5c
 …
 Uapp\src\main\java\com\example\administrator\myapplication\widget\CircleImageView.java,d\2\d2c92a556e47fd0e9a3fa038dbf835129e2f5090
-…
-Uapp\src\main\java\com\example\administrator\myapplication\utils\ImageLoadOptions.java,6\5\655e5da5fa53bd4a676fde93415f3962c6841a5c
-†
-Vapp\src\main\java\com\example\administrator\myapplication\adapter\NotebookAdapter.java,b\f\bf99366384db0ccf7ec0367c3aa4412c93f2a9bb
-�
-_app\src\main\java\com\example\administrator\myapplication\widget\patternlock\RotateDegrees.java,5\4\5407486fb05ebaf77ee187807ac7fbb8cb42de8a
-ˆ
-Xapp\src\main\java\com\example\administrator\myapplication\widget\NoteItemCircleView.java,e\7\e71af57077389976b85ce04fe9c4f9e8bc78f9d2
+„
+Tapp\src\main\java\com\example\administrator\myapplication\ui\AlarmAlertActivity.java,6\0\6017e946e5380fbd8e8ec44cf82432536cb0c89d
+P
+ app\src\main\AndroidManifest.xml,a\c\ac6e0c942798c8a768fab2e3ab7e6a6b69b346f1
+�
+Qapp\src\main\java\com\example\administrator\myapplication\ui\WelcomeActivity.java,f\4\f4db46de912ee15bd8dff2e67791e614cfdc8ae8
 ‚
-Rapp\src\main\java\com\example\administrator\myapplication\widget\ToggleButton.java,a\2\a2cac54ed6169d41dc3d4fe37b5f3594fabd1e9d
-@
-app\build.gradle,8\3\83d37b2761f0342c28dad5cd3a4bdc7a7b7d55d6
\ No newline at end of file
+Rapp\src\main\java\com\example\administrator\myapplication\ui\AboutAppFragment.java,2\4\2432e00ff27b3c4e488bc12d8149cc4f0583cb71
+‡
+Wapp\src\main\java\com\example\administrator\myapplication\adapter\BgPicGridAdapter.java,0\3\037b293928bff3f763d72038512124d16aebd627
+�
+Qapp\src\main\java\com\example\administrator\myapplication\ui\SettingFragment.java,9\f\9f49ae81d31735cbb5ea0dec8c22fb85771170ad
+
+Oapp\src\main\java\com\example\administrator\myapplication\ui\LoginActivity.java,d\9\d9f0b00bd9259256a0cc6a48eb4c59665266c4ea
+‚
+Rapp\src\main\java\com\example\administrator\myapplication\ui\RegisterActivity.java,d\5\d5b72c9513d313bcf937771f4e19798894789154
\ No newline at end of file
diff --git a/src/MyApplication/app/build.gradle b/src/MyApplication/app/build.gradle
index 22b177f..f159928 100644
--- a/src/MyApplication/app/build.gradle
+++ b/src/MyApplication/app/build.gradle
@@ -35,6 +35,8 @@ android {
         // é˜²æ­¢åœ¨å�‘å¸ƒçš„æ—¶å€™å‡ºçŽ°å› MissingTranslationå¯¼è‡´Build Failed!
         disable 'MissingTranslation'
     }
+    aaptOptions.cruncherEnabled = false
+    aaptOptions.useNewCruncher = false
 }
 
 dependencies {
@@ -45,7 +47,6 @@ dependencies {
     compile 'com.android.support:appcompat-v7:26.+'
     compile 'com.android.support.constraint:constraint-layout:1.0.2'
     compile 'com.jakewharton:butterknife:8.2.1'
-    apt 'com.jakewharton:butterknife-compiler:8.2.1'
     compile 'com.android.support:design:26.+'
     compile 'com.android.support:support-v4:26.+'
     compile 'com.android.support:support-vector-drawable:26.+'
@@ -56,4 +57,5 @@ dependencies {
     compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.2'
     compile 'com.github.clans:fab:1.6.1'
     testCompile 'junit:junit:4.12'
+    apt 'com.jakewharton:butterknife-compiler:8.2.1'
 }
diff --git a/src/MyApplication/app/src/main/AndroidManifest.xml b/src/MyApplication/app/src/main/AndroidManifest.xml
index a1234ac..1c3ea67 100644
--- a/src/MyApplication/app/src/main/AndroidManifest.xml
+++ b/src/MyApplication/app/src/main/AndroidManifest.xml
@@ -1,43 +1,90 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.administrator.myapplication">
+          package="com.example.administrator.myapplication"
+          android:versionCode="1"
+          android:versionName="2.1.0">
 
-    <!-- To auto-complete the email text field in the login form with the user's emails -->
-    <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
-    <uses-permission android:name="android.permission.READ_PROFILE"/>
-    <uses-permission android:name="android.permission.READ_CONTACTS"/>
+    <uses-permission android:name="android.permission.VIBRATE" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <!--èŽ·å�–GSMï¼ˆ2gï¼‰ã€�WCDMAï¼ˆè�”é€š3gï¼‰ç­‰ç½‘ç»œçŠ¶æ€�çš„ä¿¡æ�¯  -->
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <!--èŽ·å�–wifiç½‘ç»œçŠ¶æ€�çš„ä¿¡æ�¯ -->
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+    <!--å…�è®¸è¯»å�–æ‰‹æœºçŠ¶æ€� ç”¨äºŽåˆ›å»ºBmobInstallation-->
+    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+    <uses-permission android:name="android.permission.WAKE_LOCK"/>
+    <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
 
+    <!--èŽ·å�–sdå�¡å†™çš„æ�ƒé™�ï¼Œç”¨äºŽæ–‡ä»¶ä¸Šä¼ å’Œä¸‹è½½-->
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <!-- UILæ¡†æž¶æ‰€éœ€çš„æ�ƒé™� -->
+    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
+    <uses-permission android:name="android.permission.READ_LOGS" />
+
+    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
+    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
     <application
         android:allowBackup="true"
-        android:icon="@mipmap/ic_launcher"
+        android:icon="@mipmap/app_icon"
         android:label="@string/app_name"
-        android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
-        android:theme="@style/Theme.AppCompat.Light.NoActionBar">
+        android:theme="@style/AppTheme">
         <activity
-            android:name=".ui.LoginActivity"
-            android:label="@string/title_activity_login">
-            4
+            android:name="com.example.administrator.myapplication.ui.WelcomeActivity"
+            android:theme="@style/AppTheme.NoActionBar">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN"/>
+                <action android:name="android.intent.action.MAIN" />
 
-                <category android:name="android.intent.category.LAUNCHER"/>
+                <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
+        </activity><!-- ATTENTION: This was auto-generated to add Google Play services to your project for
+     App Indexing.  See https://g.co/AppIndexing/AndroidStudio for more information. -->
+        <meta-data
+            android:name="com.google.android.gms.version"
+            android:value="@integer/google_play_services_version" />
+        <activity
+            android:name="com.example.administrator.myapplication.ui.NoteEditActivity">
+            <intent-filter>
+                <action android:name="android.intent.action.VIEW" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <data android:mimeType="vnd.android.cursor.item/text_note" />
+                <data android:mimeType="vnd.android.cursor.item/call_note" />
+            </intent-filter>
+
         </activity>
-        <activity android:name=".ui.SignActivity"/>
-        <activity android:name=".ui.ListActivity"/>
-        <activity android:name=".ui.SearchActivity">
+        <activity
+            android:name="com.example.administrator.myapplication.ui.SetLockActivity"></activity>
+        <activity
+            android:name="com.example.administrator.myapplication.ui.MainActivity"
+            android:theme="@style/AppTheme.NoActionBar"
+            android:label="@string/app_name"></activity>
+        <activity
+            android:name="com.example.administrator.myapplication.ui.UnLockActivity"
+            android:theme="@style/AppTheme.NoActionBar">
         </activity>
-        <activity android:name=".ui.EditImages">
+
+        <activity
+            android:name="com.example.administrator.myapplication.ui.LoginActivity"
+            android:theme="@style/AppTheme.NoActionBar">
         </activity>
-        <activity android:name=".ui.ScanImages">
+        <activity
+            android:name="com.example.administrator.myapplication.ui.UserInfoActivity"
+            android:theme="@style/AppTheme.NoActionBar">
         </activity>
-        <activity android:name=".ui.ImagesDisplay">
+        <activity
+            android:name="com.example.administrator.myapplication.ui.RegisterActivity"
+            android:theme="@style/AppTheme.NoActionBar">
         </activity>
-        <activity android:name=".ui.EditNotes">
-        </activity>
-        <activity android:name=".ui.WelcomeActivity">
+        <activity
+            android:name="com.example.administrator.myapplication.ui.AlarmAlertActivity"
+            android:theme="@style/AppTheme.NoActionBar">
         </activity>
+
+        <receiver
+            android:name="com.example.administrator.myapplication.ui.NoteEditFragment$AlarmReceiver"
+            android:process=":remote" >
+        </receiver>
     </application>
 
-</manifest>
\ No newline at end of file
+</manifest>
+    <!--   android:theme="@style/AppTheme.NoActionBar"-->
\ No newline at end of file
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/db/NoteDatabase.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/db/NoteDatabase.java
index c872e61..637fab3 100644
--- a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/db/NoteDatabase.java
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/db/NoteDatabase.java
@@ -5,9 +5,9 @@ import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
 
 
-import com.htq.baidu.coolnote.entity.NotebookData;
-import com.htq.baidu.coolnote.utils.AccountUtils;
-import com.htq.baidu.coolnote.utils.StringUtils;
+import com.example.administrator.myapplication.entity.NotebookData;
+import com.example.administrator.myapplication.utils.AccountUtils;
+import com.example.administrator.myapplication.utils.StringUtils;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/entity/User.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/entity/User.java
index 55577c2..3e33c79 100644
--- a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/entity/User.java
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/entity/User.java
@@ -7,12 +7,12 @@ import android.util.Log;
 import android.widget.ImageView;
 import android.widget.Toast;
 
-import com.htq.baidu.coolnote.R;
-import com.htq.baidu.coolnote.app.BaseApplication;
-import com.htq.baidu.coolnote.utils.AccountUtils;
-import com.htq.baidu.coolnote.utils.BmobConstants;
-import com.htq.baidu.coolnote.utils.ImageLoadOptions;
-import com.htq.baidu.coolnote.utils.SPUtils;
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.app.BaseApplication;
+import com.example.administrator.myapplication.utils.AccountUtils;
+import com.example.administrator.myapplication.utils.BmobConstants;
+import com.example.administrator.myapplication.utils.ImageLoadOptions;
+import com.example.administrator.myapplication.utils.SPUtils;
 import com.nostra13.universalimageloader.core.ImageLoader;
 import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
 
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/AboutAppFragment.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/AboutAppFragment.java
new file mode 100644
index 0000000..a4b3951
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/AboutAppFragment.java
@@ -0,0 +1,33 @@
+package com.example.administrator.myapplication.ui;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.text.util.Linkify;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.example.administrator.myapplication.R;
+
+/**
+ * Created by htq on 2016/8/11.
+ */
+public class AboutAppFragment extends Fragment {
+    private View baseView;
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        baseView=inflater.inflate(R.layout.about_me_fragment, null);
+        initView();
+        return baseView;
+
+    }
+    private void initView()
+    {
+        TextView aboutMeTv=(TextView) baseView.findViewById(R.id.about_me_tv);
+        Linkify.addLinks(aboutMeTv, Linkify.ALL);
+    }
+
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/AlarmAlertActivity.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/AlarmAlertActivity.java
new file mode 100644
index 0000000..56e9be9
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/AlarmAlertActivity.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.administrator.myapplication.ui;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.content.DialogInterface.OnDismissListener;
+import android.content.Intent;
+import android.media.AudioManager;
+import android.media.MediaPlayer;
+import android.media.RingtoneManager;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.PowerManager;
+import android.provider.Settings;
+import android.view.Window;
+import android.view.WindowManager;
+
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.utils.Constants;
+
+import java.io.IOException;
+
+
+public class AlarmAlertActivity extends Activity implements OnClickListener, OnDismissListener {
+    private long mNoteId;
+    private String mSnippet;
+    private static final int SNIPPET_PREW_MAX_LEN = 60;
+    MediaPlayer mPlayer;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        requestWindowFeature(Window.FEATURE_NO_TITLE);
+
+        final Window win = getWindow();
+        win.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
+
+        if (!isScreenOn()) {
+            win.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
+                    | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
+                    | WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
+                    | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
+        }
+
+        Intent intent = getIntent();
+
+        try {
+           // mNoteId = Long.valueOf(intent.getData().getPathSegments().get(1));
+            mSnippet = intent.getStringExtra(Constants.ALART_CONTENT);//DataUtils.getSnippetById(this.getContentResolver(), mNoteId);
+            mSnippet = mSnippet.length() > SNIPPET_PREW_MAX_LEN ?( mSnippet.substring(0,
+                    SNIPPET_PREW_MAX_LEN) + "...")
+                    : mSnippet;
+        } catch (IllegalArgumentException e) {
+            e.printStackTrace();
+            return;
+        }
+
+        mPlayer = new MediaPlayer();
+       // if (DataUtils.visibleInNoteDatabase(getContentResolver(), mNoteId, Notes.TYPE_NOTE)) {
+            showActionDialog();
+            playAlarmSound();
+//        } else {
+//            finish();
+//        }
+    }
+
+    private boolean isScreenOn() {
+        PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
+        return pm.isScreenOn();
+    }
+
+    private void playAlarmSound() {
+        Uri url = RingtoneManager.getActualDefaultRingtoneUri(this, RingtoneManager.TYPE_ALARM);
+
+        int silentModeStreams = Settings.System.getInt(getContentResolver(),
+                Settings.System.MODE_RINGER_STREAMS_AFFECTED, 0);
+
+        if ((silentModeStreams & (1 << AudioManager.STREAM_ALARM)) != 0) {
+            mPlayer.setAudioStreamType(silentModeStreams);
+        } else {
+            mPlayer.setAudioStreamType(AudioManager.STREAM_ALARM);
+        }
+        try {
+            mPlayer.setDataSource(this, url);
+            mPlayer.prepare();
+            mPlayer.setLooping(true);
+            mPlayer.start();
+        } catch (IllegalArgumentException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (SecurityException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (IllegalStateException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+    private void showActionDialog() {
+        AlertDialog.Builder dialog = new AlertDialog.Builder(this);
+        dialog.setTitle(R.string.app_name);
+        dialog.setMessage(mSnippet);
+        dialog.setPositiveButton(R.string.notealert_cancle, this);
+        if (isScreenOn()) {
+            dialog.setNegativeButton(R.string.notealert_look, this);
+        }
+        dialog.show().setOnDismissListener(this);
+    }
+
+    public void onClick(DialogInterface dialog, int which) {
+        switch (which) {
+            case DialogInterface.BUTTON_NEGATIVE:
+                Intent intent = new Intent(this, NoteEditActivity.class);
+                intent.setAction(Intent.ACTION_VIEW);
+                intent.putExtra(Intent.EXTRA_UID, mNoteId);
+                startActivity(intent);
+                break;
+            default:
+                break;
+        }
+    }
+
+    public void onDismiss(DialogInterface dialog) {
+        stopAlarmSound();
+        finish();
+    }
+
+    private void stopAlarmSound() {
+        if (mPlayer != null) {
+            mPlayer.stop();
+            mPlayer.release();
+            mPlayer = null;
+        }
+    }
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/ChangeBgFragment.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/ChangeBgFragment.java
new file mode 100644
index 0000000..97b54ce
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/ChangeBgFragment.java
@@ -0,0 +1,91 @@
+package com.example.administrator.myapplication.ui;
+
+import android.content.res.AssetManager;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.drawable.BitmapDrawable;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.GridView;
+
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.adapter.BgPicGridAdapter;
+import com.example.administrator.myapplication.entity.BgPicEntity;
+import com.example.administrator.myapplication.utils.SystemUtils;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by htq on 2016/8/11.
+ */
+public class ChangeBgFragment extends Fragment {
+
+    private List<BgPicEntity> mBgPicList;
+    private View baseView;
+    private GridView mGridView;
+    private BgPicGridAdapter mBgPicAdapter;
+    private SystemUtils systemUtils;
+    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        baseView = inflater.inflate(R.layout.fragment_change_background, null);
+        initBackgroundPic();
+        initView();
+        return baseView;
+    }
+        private void initView()
+        {
+
+            mGridView = (GridView) baseView.findViewById(R.id.change_background_grid);
+            mBgPicAdapter = new BgPicGridAdapter(getActivity(),mBgPicList);
+            mGridView.setOnItemClickListener(gridItemClickListener);
+            mGridView.setAdapter(mBgPicAdapter);
+
+        }
+        private void initBackgroundPic()
+        {
+            AssetManager am = getActivity().getAssets();
+            try {
+                String[] drawableList = am.list("bkgs");
+                mBgPicList = new ArrayList<BgPicEntity>();
+                for (String path : drawableList) {
+                    BgPicEntity bg = new BgPicEntity();
+                    InputStream is = am.open("bkgs/" + path);
+                    Bitmap bitmap = BitmapFactory.decodeStream(is);
+                    bg.path = path;
+                    bg.bitmap = bitmap;
+                    mBgPicList.add(bg);
+                    is.close();
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+
+        }
+
+        AdapterView.OnItemClickListener gridItemClickListener=new AdapterView.OnItemClickListener() {
+
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                // TODO Auto-generated method stub
+                String path = ((BgPicEntity) mBgPicAdapter.getItem(position)).path;
+
+                systemUtils = new SystemUtils(getActivity());
+                systemUtils.saveBgPicPath(path);
+                Bitmap bitmap = systemUtils.getBitmapByPath(getActivity(), path);
+                if (bitmap != null) {
+                    ((MainActivity) getActivity()).drawer.setBackgroundDrawable(new BitmapDrawable(getResources(), bitmap));
+                     mBgPicAdapter.notifyDataSetChanged();
+
+                }
+            }
+        };
+
+
+    }
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/DateTimePicker.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/DateTimePicker.java
new file mode 100644
index 0000000..285bb27
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/DateTimePicker.java
@@ -0,0 +1,472 @@
+package com.example.administrator.myapplication.ui;
+
+import android.content.Context;
+import android.text.format.DateFormat;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.NumberPicker;
+
+import com.example.administrator.myapplication.R;
+
+import java.text.DateFormatSymbols;
+import java.util.Calendar;
+
+/**
+ * Created by htq on 2016/9/13.
+ */
+public class DateTimePicker extends FrameLayout {
+
+    private static final boolean DEFAULT_ENABLE_STATE = true;
+
+    private static final int HOURS_IN_HALF_DAY = 12;
+    private static final int HOURS_IN_ALL_DAY = 24;
+    private static final int DAYS_IN_ALL_WEEK = 7;
+    private static final int DATE_SPINNER_MIN_VAL = 0;
+    private static final int DATE_SPINNER_MAX_VAL = DAYS_IN_ALL_WEEK - 1;
+    private static final int HOUR_SPINNER_MIN_VAL_24_HOUR_VIEW = 0;
+    private static final int HOUR_SPINNER_MAX_VAL_24_HOUR_VIEW = 23;
+    private static final int HOUR_SPINNER_MIN_VAL_12_HOUR_VIEW = 1;
+    private static final int HOUR_SPINNER_MAX_VAL_12_HOUR_VIEW = 12;
+    private static final int MINUT_SPINNER_MIN_VAL = 0;
+    private static final int MINUT_SPINNER_MAX_VAL = 59;
+    private static final int AMPM_SPINNER_MIN_VAL = 0;
+    private static final int AMPM_SPINNER_MAX_VAL = 1;
+
+    private final NumberPicker mDateSpinner;
+    private final NumberPicker mHourSpinner;
+    private final NumberPicker mMinuteSpinner;
+    private final NumberPicker mAmPmSpinner;
+    private Calendar mDate;
+
+    private String[] mDateDisplayValues = new String[DAYS_IN_ALL_WEEK];
+
+    private boolean mIsAm;
+
+    private boolean mIs24HourView;
+
+    private boolean mIsEnabled = DEFAULT_ENABLE_STATE;
+
+    private boolean mInitialising;
+
+    private OnDateTimeChangedListener mOnDateTimeChangedListener;
+
+    private NumberPicker.OnValueChangeListener mOnDateChangedListener = new NumberPicker.OnValueChangeListener() {
+        @Override
+        public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
+            mDate.add(Calendar.DAY_OF_YEAR, newVal - oldVal);
+            updateDateControl();
+            onDateTimeChanged();
+        }
+    };
+
+    private NumberPicker.OnValueChangeListener mOnHourChangedListener = new NumberPicker.OnValueChangeListener() {
+        @Override
+        public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
+            boolean isDateChanged = false;
+            Calendar cal = Calendar.getInstance();
+            if (!mIs24HourView) {
+                if (!mIsAm && oldVal == HOURS_IN_HALF_DAY - 1 && newVal == HOURS_IN_HALF_DAY) {
+                    cal.setTimeInMillis(mDate.getTimeInMillis());
+                    cal.add(Calendar.DAY_OF_YEAR, 1);
+                    isDateChanged = true;
+                } else if (mIsAm && oldVal == HOURS_IN_HALF_DAY && newVal == HOURS_IN_HALF_DAY - 1) {
+                    cal.setTimeInMillis(mDate.getTimeInMillis());
+                    cal.add(Calendar.DAY_OF_YEAR, -1);
+                    isDateChanged = true;
+                }
+                if (oldVal == HOURS_IN_HALF_DAY - 1 && newVal == HOURS_IN_HALF_DAY ||
+                        oldVal == HOURS_IN_HALF_DAY && newVal == HOURS_IN_HALF_DAY - 1) {
+                    mIsAm = !mIsAm;
+                    updateAmPmControl();
+                }
+            } else {
+                if (oldVal == HOURS_IN_ALL_DAY - 1 && newVal == 0) {
+                    cal.setTimeInMillis(mDate.getTimeInMillis());
+                    cal.add(Calendar.DAY_OF_YEAR, 1);
+                    isDateChanged = true;
+                } else if (oldVal == 0 && newVal == HOURS_IN_ALL_DAY - 1) {
+                    cal.setTimeInMillis(mDate.getTimeInMillis());
+                    cal.add(Calendar.DAY_OF_YEAR, -1);
+                    isDateChanged = true;
+                }
+            }
+            int newHour = mHourSpinner.getValue() % HOURS_IN_HALF_DAY + (mIsAm ? 0 : HOURS_IN_HALF_DAY);
+            mDate.set(Calendar.HOUR_OF_DAY, newHour);
+            onDateTimeChanged();
+            if (isDateChanged) {
+                setCurrentYear(cal.get(Calendar.YEAR));
+                setCurrentMonth(cal.get(Calendar.MONTH));
+                setCurrentDay(cal.get(Calendar.DAY_OF_MONTH));
+            }
+        }
+    };
+
+    private NumberPicker.OnValueChangeListener mOnMinuteChangedListener = new NumberPicker.OnValueChangeListener() {
+        @Override
+        public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
+            int minValue = mMinuteSpinner.getMinValue();
+            int maxValue = mMinuteSpinner.getMaxValue();
+            int offset = 0;
+            if (oldVal == maxValue && newVal == minValue) {
+                offset += 1;
+            } else if (oldVal == minValue && newVal == maxValue) {
+                offset -= 1;
+            }
+            if (offset != 0) {
+                mDate.add(Calendar.HOUR_OF_DAY, offset);
+                mHourSpinner.setValue(getCurrentHour());
+                updateDateControl();
+                int newHour = getCurrentHourOfDay();
+                if (newHour >= HOURS_IN_HALF_DAY) {
+                    mIsAm = false;
+                    updateAmPmControl();
+                } else {
+                    mIsAm = true;
+                    updateAmPmControl();
+                }
+            }
+            mDate.set(Calendar.MINUTE, newVal);
+            onDateTimeChanged();
+        }
+    };
+
+    private NumberPicker.OnValueChangeListener mOnAmPmChangedListener = new NumberPicker.OnValueChangeListener() {
+        @Override
+        public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
+            mIsAm = !mIsAm;
+            if (mIsAm) {
+                mDate.add(Calendar.HOUR_OF_DAY, -HOURS_IN_HALF_DAY);
+            } else {
+                mDate.add(Calendar.HOUR_OF_DAY, HOURS_IN_HALF_DAY);
+            }
+            updateAmPmControl();
+            onDateTimeChanged();
+        }
+    };
+
+    public interface OnDateTimeChangedListener {
+        void onDateTimeChanged(DateTimePicker view, int year, int month,
+                               int dayOfMonth, int hourOfDay, int minute);
+    }
+
+    public DateTimePicker(Context context) {
+        this(context, System.currentTimeMillis());
+    }
+
+    public DateTimePicker(Context context, long date) {
+        this(context, date, DateFormat.is24HourFormat(context));
+    }
+
+    public DateTimePicker(Context context, long date, boolean is24HourView) {
+        super(context);
+        mDate = Calendar.getInstance();
+        mInitialising = true;
+        mIsAm = getCurrentHourOfDay() >= HOURS_IN_HALF_DAY;
+        inflate(context, R.layout.datetime_picker, this);
+
+        mDateSpinner = (NumberPicker) findViewById(R.id.date);
+        mDateSpinner.setMinValue(DATE_SPINNER_MIN_VAL);
+        mDateSpinner.setMaxValue(DATE_SPINNER_MAX_VAL);
+        mDateSpinner.setOnValueChangedListener(mOnDateChangedListener);
+
+        mHourSpinner = (NumberPicker) findViewById(R.id.hour);
+        mHourSpinner.setOnValueChangedListener(mOnHourChangedListener);
+        mMinuteSpinner =  (NumberPicker) findViewById(R.id.minute);
+        mMinuteSpinner.setMinValue(MINUT_SPINNER_MIN_VAL);
+        mMinuteSpinner.setMaxValue(MINUT_SPINNER_MAX_VAL);
+        mMinuteSpinner.setOnLongPressUpdateInterval(100);
+        mMinuteSpinner.setOnValueChangedListener(mOnMinuteChangedListener);
+
+        String[] stringsForAmPm = new DateFormatSymbols().getAmPmStrings();
+        mAmPmSpinner = (NumberPicker) findViewById(R.id.amPm);
+        mAmPmSpinner.setMinValue(AMPM_SPINNER_MIN_VAL);
+        mAmPmSpinner.setMaxValue(AMPM_SPINNER_MAX_VAL);
+        mAmPmSpinner.setDisplayedValues(stringsForAmPm);
+        mAmPmSpinner.setOnValueChangedListener(mOnAmPmChangedListener);
+
+        // update controls to initial state
+        updateDateControl();
+        updateHourControl();
+        updateAmPmControl();
+
+        set24HourView(is24HourView);
+
+        // set to current time
+        setCurrentDate(date);
+
+        setEnabled(isEnabled());
+
+        // set the content descriptions
+        mInitialising = false;
+    }
+
+    @Override
+    public void setEnabled(boolean enabled) {
+        if (mIsEnabled == enabled) {
+            return;
+        }
+        super.setEnabled(enabled);
+        mDateSpinner.setEnabled(enabled);
+        mMinuteSpinner.setEnabled(enabled);
+        mHourSpinner.setEnabled(enabled);
+        mAmPmSpinner.setEnabled(enabled);
+        mIsEnabled = enabled;
+    }
+
+    @Override
+    public boolean isEnabled() {
+        return mIsEnabled;
+    }
+
+    /**
+     * Get the current date in millis
+     *
+     * @return the current date in millis
+     */
+    public long getCurrentDateInTimeMillis() {
+        return mDate.getTimeInMillis();
+    }
+
+    /**
+     * Set the current date
+     *
+     * @param date The current date in millis
+     */
+    public void setCurrentDate(long date) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTimeInMillis(date);
+        setCurrentDate(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH),
+                cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));
+    }
+
+    /**
+     * Set the current date
+     *
+     * @param year The current year
+     * @param month The current month
+     * @param dayOfMonth The current dayOfMonth
+     * @param hourOfDay The current hourOfDay
+     * @param minute The current minute
+     */
+    public void setCurrentDate(int year, int month,
+                               int dayOfMonth, int hourOfDay, int minute) {
+        setCurrentYear(year);
+        setCurrentMonth(month);
+        setCurrentDay(dayOfMonth);
+        setCurrentHour(hourOfDay);
+        setCurrentMinute(minute);
+    }
+
+    /**
+     * Get current year
+     *
+     * @return The current year
+     */
+    public int getCurrentYear() {
+        return mDate.get(Calendar.YEAR);
+    }
+
+    /**
+     * Set current year
+     *
+     * @param year The current year
+     */
+    public void setCurrentYear(int year) {
+        if (!mInitialising && year == getCurrentYear()) {
+            return;
+        }
+        mDate.set(Calendar.YEAR, year);
+        updateDateControl();
+        onDateTimeChanged();
+    }
+
+    /**
+     * Get current month in the year
+     *
+     * @return The current month in the year
+     */
+    public int getCurrentMonth() {
+        return mDate.get(Calendar.MONTH);
+    }
+
+    /**
+     * Set current month in the year
+     *
+     * @param month The month in the year
+     */
+    public void setCurrentMonth(int month) {
+        if (!mInitialising && month == getCurrentMonth()) {
+            return;
+        }
+        mDate.set(Calendar.MONTH, month);
+        updateDateControl();
+        onDateTimeChanged();
+    }
+
+    /**
+     * Get current day of the month
+     *
+     * @return The day of the month
+     */
+    public int getCurrentDay() {
+        return mDate.get(Calendar.DAY_OF_MONTH);
+    }
+
+    /**
+     * Set current day of the month
+     *
+     * @param dayOfMonth The day of the month
+     */
+    public void setCurrentDay(int dayOfMonth) {
+        if (!mInitialising && dayOfMonth == getCurrentDay()) {
+            return;
+        }
+        mDate.set(Calendar.DAY_OF_MONTH, dayOfMonth);
+        updateDateControl();
+        onDateTimeChanged();
+    }
+
+    /**
+     * Get current hour in 24 hour mode, in the range (0~23)
+     * @return The current hour in 24 hour mode
+     */
+    public int getCurrentHourOfDay() {
+        return mDate.get(Calendar.HOUR_OF_DAY);
+    }
+
+    private int getCurrentHour() {
+        if (mIs24HourView){
+            return getCurrentHourOfDay();
+        } else {
+            int hour = getCurrentHourOfDay();
+            if (hour > HOURS_IN_HALF_DAY) {
+                return hour - HOURS_IN_HALF_DAY;
+            } else {
+                return hour == 0 ? HOURS_IN_HALF_DAY : hour;
+            }
+        }
+    }
+
+    /**
+     * Set current hour in 24 hour mode, in the range (0~23)
+     *
+     * @param hourOfDay
+     */
+    public void setCurrentHour(int hourOfDay) {
+        if (!mInitialising && hourOfDay == getCurrentHourOfDay()) {
+            return;
+        }
+        mDate.set(Calendar.HOUR_OF_DAY, hourOfDay);
+        if (!mIs24HourView) {
+            if (hourOfDay >= HOURS_IN_HALF_DAY) {
+                mIsAm = false;
+                if (hourOfDay > HOURS_IN_HALF_DAY) {
+                    hourOfDay -= HOURS_IN_HALF_DAY;
+                }
+            } else {
+                mIsAm = true;
+                if (hourOfDay == 0) {
+                    hourOfDay = HOURS_IN_HALF_DAY;
+                }
+            }
+            updateAmPmControl();
+        }
+        mHourSpinner.setValue(hourOfDay);
+        onDateTimeChanged();
+    }
+
+    /**
+     * Get currentMinute
+     *
+     * @return The Current Minute
+     */
+    public int getCurrentMinute() {
+        return mDate.get(Calendar.MINUTE);
+    }
+
+    /**
+     * Set current minute
+     */
+    public void setCurrentMinute(int minute) {
+        if (!mInitialising && minute == getCurrentMinute()) {
+            return;
+        }
+        mMinuteSpinner.setValue(minute);
+        mDate.set(Calendar.MINUTE, minute);
+        onDateTimeChanged();
+    }
+
+    /**
+     * @return true if this is in 24 hour view else false.
+     */
+    public boolean is24HourView () {
+        return mIs24HourView;
+    }
+
+    /**
+     * Set whether in 24 hour or AM/PM mode.
+     *
+     * @param is24HourView True for 24 hour mode. False for AM/PM mode.
+     */
+    public void set24HourView(boolean is24HourView) {
+        if (mIs24HourView == is24HourView) {
+            return;
+        }
+        mIs24HourView = is24HourView;
+        mAmPmSpinner.setVisibility(is24HourView ? View.GONE : View.VISIBLE);
+        int hour = getCurrentHourOfDay();
+        updateHourControl();
+        setCurrentHour(hour);
+        updateAmPmControl();
+    }
+
+    private void updateDateControl() {
+        Calendar cal = Calendar.getInstance();
+        cal.setTimeInMillis(mDate.getTimeInMillis());
+        cal.add(Calendar.DAY_OF_YEAR, -DAYS_IN_ALL_WEEK / 2 - 1);
+        mDateSpinner.setDisplayedValues(null);
+        for (int i = 0; i < DAYS_IN_ALL_WEEK; ++i) {
+            cal.add(Calendar.DAY_OF_YEAR, 1);
+            mDateDisplayValues[i] = (String) DateFormat.format("MM.dd EEEE", cal);
+        }
+        mDateSpinner.setDisplayedValues(mDateDisplayValues);
+        mDateSpinner.setValue(DAYS_IN_ALL_WEEK / 2);
+        mDateSpinner.invalidate();
+    }
+
+    private void updateAmPmControl() {
+        if (mIs24HourView) {
+            mAmPmSpinner.setVisibility(View.GONE);
+        } else {
+            int index = mIsAm ? Calendar.AM : Calendar.PM;
+            mAmPmSpinner.setValue(index);
+            mAmPmSpinner.setVisibility(View.VISIBLE);
+        }
+    }
+
+    private void updateHourControl() {
+        if (mIs24HourView) {
+            mHourSpinner.setMinValue(HOUR_SPINNER_MIN_VAL_24_HOUR_VIEW);
+            mHourSpinner.setMaxValue(HOUR_SPINNER_MAX_VAL_24_HOUR_VIEW);
+        } else {
+            mHourSpinner.setMinValue(HOUR_SPINNER_MIN_VAL_12_HOUR_VIEW);
+            mHourSpinner.setMaxValue(HOUR_SPINNER_MAX_VAL_12_HOUR_VIEW);
+        }
+    }
+
+    /**
+     * Set the callback that indicates the 'Set' button has been pressed.
+     * @param callback the callback, if null will do nothing
+     */
+    public void setOnDateTimeChangedListener(OnDateTimeChangedListener callback) {
+        mOnDateTimeChangedListener = callback;
+    }
+
+    private void onDateTimeChanged() {
+        if (mOnDateTimeChangedListener != null) {
+            mOnDateTimeChangedListener.onDateTimeChanged(this, getCurrentYear(),
+                    getCurrentMonth(), getCurrentDay(), getCurrentHourOfDay(), getCurrentMinute());
+        }
+    }
+}
+
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/DateTimePickerDialog.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/DateTimePickerDialog.java
new file mode 100644
index 0000000..2b0b385
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/DateTimePickerDialog.java
@@ -0,0 +1,75 @@
+package com.example.administrator.myapplication.ui;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.text.format.DateFormat;
+import android.text.format.DateUtils;
+
+import com.example.administrator.myapplication.R;
+
+import java.util.Calendar;
+
+/**
+ * Created by htq on 2016/9/13.
+ */
+public class DateTimePickerDialog extends AlertDialog implements DialogInterface.OnClickListener {
+
+    private Calendar mDate = Calendar.getInstance();
+    private boolean mIs24HourView;
+    private OnDateTimeSetListener mOnDateTimeSetListener;
+    private DateTimePicker mDateTimePicker;
+
+    public interface OnDateTimeSetListener {
+        void OnDateTimeSet(AlertDialog dialog, long date);
+    }
+
+    public DateTimePickerDialog(Context context, long date) {
+        super(context);
+        mDateTimePicker = new DateTimePicker(context);
+        setView(mDateTimePicker);
+        mDateTimePicker.setOnDateTimeChangedListener(new DateTimePicker.OnDateTimeChangedListener() {
+            public void onDateTimeChanged(DateTimePicker view, int year, int month,
+                                          int dayOfMonth, int hourOfDay, int minute) {
+                mDate.set(Calendar.YEAR, year);
+                mDate.set(Calendar.MONTH, month);
+                mDate.set(Calendar.DAY_OF_MONTH, dayOfMonth);
+                mDate.set(Calendar.HOUR_OF_DAY, hourOfDay);
+                mDate.set(Calendar.MINUTE, minute);
+                updateTitle(mDate.getTimeInMillis());
+            }
+        });
+        mDate.setTimeInMillis(date);
+        mDate.set(Calendar.SECOND, 0);
+        mDateTimePicker.setCurrentDate(mDate.getTimeInMillis());
+        setButton(context.getString(R.string.datetime_dialog_ok), this);
+        setButton2(context.getString(R.string.datetime_dialog_cancel), (OnClickListener) null);
+        set24HourView(DateFormat.is24HourFormat(this.getContext()));
+        updateTitle(mDate.getTimeInMillis());
+    }
+
+    public void set24HourView(boolean is24HourView) {
+        mIs24HourView = is24HourView;
+    }
+
+    public void setOnDateTimeSetListener(OnDateTimeSetListener callBack) {
+        mOnDateTimeSetListener = callBack;
+    }
+
+    private void updateTitle(long date) {
+        int flag =
+                DateUtils.FORMAT_SHOW_YEAR |
+                        DateUtils.FORMAT_SHOW_DATE |
+                        DateUtils.FORMAT_SHOW_TIME;
+        flag |= mIs24HourView ? DateUtils.FORMAT_24HOUR : DateUtils.FORMAT_24HOUR;
+        setTitle(DateUtils.formatDateTime(this.getContext(), date, flag));
+    }
+
+    public void onClick(DialogInterface arg0, int arg1) {
+        if (mOnDateTimeSetListener != null) {
+            mOnDateTimeSetListener.OnDateTimeSet(this, mDate.getTimeInMillis());
+        }
+    }
+}
+
+
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/LoginActivity.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/LoginActivity.java
index 3838a5f..78c820b 100644
--- a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/LoginActivity.java
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/LoginActivity.java
@@ -1,367 +1,133 @@
 package com.example.administrator.myapplication.ui;
 
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.annotation.TargetApi;
+
+import android.app.ProgressDialog;
 import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.support.annotation.NonNull;
-import android.support.design.widget.Snackbar;
-import android.support.v7.app.AppCompatActivity;
-import android.app.LoaderManager.LoaderCallbacks;
-
-import android.content.CursorLoader;
-import android.content.Loader;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.AsyncTask;
-
-import android.os.Build;
+import android.graphics.drawable.Drawable;
 import android.os.Bundle;
-import android.provider.ContactsContract;
-import android.text.TextUtils;
-import android.view.KeyEvent;
+import android.support.v7.app.AppCompatActivity;
 import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.inputmethod.EditorInfo;
-import android.widget.ArrayAdapter;
-import android.widget.AutoCompleteTextView;
+import android.view.WindowManager;
 import android.widget.Button;
 import android.widget.EditText;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.entity.User;
+import com.example.administrator.myapplication.utils.AccountUtils;
+import com.example.administrator.myapplication.utils.MD5Util;
+import com.example.administrator.myapplication.utils.SPUtils;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import static android.Manifest.permission.READ_CONTACTS;
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import cn.bmob.v3.BmobUser;
+import cn.bmob.v3.listener.SaveListener;
 
 /**
- * A login screen that offers login via email/password.
+ * Created by htq on 2016/9/3.
  */
-public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<Cursor> {
+public class LoginActivity extends AppCompatActivity implements View.OnClickListener {
 
-    /**
-     * Id to identity READ_CONTACTS permission request.
-     */
-    private static final int REQUEST_READ_CONTACTS = 0;
+    @BindView(R.id.btn_login)
+    Button loginBtn;
+    @BindView(R.id.btn_register)
+    TextView registerBtn;
+    @BindView(R.id.login_name)
+    EditText loginName;
+    @BindView(R.id.login_pwd)
+    EditText loginPwd;
 
-    /**
-     * A dummy authentication store containing known user names and passwords.
-     * TODO: remove after connecting to a real authentication system.
-     */
-    private static final String[] DUMMY_CREDENTIALS = new String[]{
-            "foo@example.com:hello", "bar@example.com:world"
-    };
-    /**
-     * Keep track of the login task to ensure we can cancel it if requested.
-     */
-    private UserLoginTask mAuthTask = null;
-
-    // UI references.
-    private AutoCompleteTextView mEmailView;
-    private EditText mPasswordView;
-    private View mProgressView;
-    private View mLoginFormView;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+     //   requestWindowFeature(Window.FEATURE_NO_TITLE);
+        /*set it to be full screen*/
+        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+                WindowManager.LayoutParams.FLAG_FULLSCREEN);
         setContentView(R.layout.activity_login);
-        // Set up the login form.
-        findViewById(R.id.sign_in_button).setOnClickListener(new View.OnClickListener(){
+        ButterKnife.bind(this);
+        initDrawableSize();
+
+    }
+
+
+    private void initDrawableSize()
+    {
+        Drawable accountDraw=getResources().getDrawable(R.drawable.login_icon_account);
+        accountDraw.setBounds(0,0,45,45);
+        Drawable passwordDraw=getResources().getDrawable(R.drawable.login_icon_password);
+        passwordDraw.setBounds(0,0,45,45);
+        loginName.setCompoundDrawables(accountDraw,null,null,null);
+        loginPwd.setCompoundDrawables(passwordDraw,null,null,null);
+    }
+    @OnClick({R.id.btn_login, R.id.btn_register})
+    public void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.btn_login:
+                login();
+                break;
+            case R.id.btn_register:
+                goToRegisterActivity();
+                break;
+        }
+    }
+
+
+
+
+    private void login() {
+        final String name=loginName.getText().toString();
+        final String pwd=loginPwd.getText().toString();
+        final ProgressDialog progress = new ProgressDialog(
+                LoginActivity.this);
+        progress.setMessage("æ­£åœ¨ç™»é™†...");
+        progress.setCanceledOnTouchOutside(false);
+        progress.show();
+
+        User user = new User();
+        user.setUsername(name);
+        user.setPassword(MD5Util.MD5(pwd));
+
+       // user.setPassword(pwd);
+    //    Snackbar.make(loginBtn,"ç™»å½•æˆ�åŠŸï¼�",Snackbar.LENGTH_SHORT).show();
+        user.login(this, new SaveListener() {
             @Override
-            public void onClick (View v){
-                startActivity(new Intent(LoginActivity.this, SignActivity.class));
+            public void onSuccess() {
+                progress.dismiss();
+              //  Snackbar.make(loginBtn,"ç™»å½•æˆ�åŠŸï¼�",Snackbar.LENGTH_SHORT).show();
+                //å°†ç”¨æˆ·ä¿¡æ�¯ä¿�å­˜è‡³æœ¬åœ°
+                SPUtils.put(LoginActivity.this,"user_name",name);
+                SPUtils.put(LoginActivity.this,"pwd",MD5Util.MD5(pwd));
+                User user2;
+                user2 = BmobUser.getCurrentUser(LoginActivity.this, User.class);
+                //å°†ç™»é™†ä¿¡æ�¯ä¿�å­˜æœ¬åœ°
+                AccountUtils.saveUserInfos(LoginActivity.this, user2, MD5Util.MD5(pwd));
+                goToHomeActivity();
+
+            }
+
+            @Override
+            public void onFailure(int code, String msg) {
+                progress.dismiss();
+                Toast.makeText(LoginActivity.this,msg, Toast.LENGTH_LONG).show();
+               // Snackbar.make(loginBtn,"ç™»å½•å¤±è´¥ï¼�",Snackbar.LENGTH_SHORT).show();
             }
         });
 
-        findViewById(R.id.log_in_button).setOnClickListener(new View.OnClickListener(){
-            @Override
-            public void onClick(View v){
-                startActivity(new Intent(LoginActivity.this, ListActivity.class));
-            }
-        });
-
-        mEmailView = (AutoCompleteTextView) findViewById(R.id.account);
-        populateAutoComplete();
-
-        mPasswordView = (EditText) findViewById(R.id.password);
-        mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
-                if (id == R.id.login || id == EditorInfo.IME_NULL) {
-                    attemptLogin();
-                    return true;
-                }
-                return false;
-            }
-        });
-
-        Button mEmailSignInButton = (Button) findViewById(R.id.log_in_button);
-        mEmailSignInButton.setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                attemptLogin();
-            }
-        });
-
-        mLoginFormView = findViewById(R.id.login_form);
-        mProgressView = findViewById(R.id.login_progress);
     }
 
-    private void populateAutoComplete() {
-        if (!mayRequestContacts()) {
-            return;
-        }
+    private void goToHomeActivity() {
 
-        getLoaderManager().initLoader(0, null, this);
+        Intent intent=new Intent(LoginActivity.this,MainActivity.class);
+        startActivity(intent);
+        this.finish();
     }
 
-    private boolean mayRequestContacts() {
-        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
-            return true;
-        }
-        if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
-            return true;
-        }
-        if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
-            Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
-                    .setAction(android.R.string.ok, new View.OnClickListener() {
-                        @Override
-                        @TargetApi(Build.VERSION_CODES.M)
-                        public void onClick(View v) {
-                            requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
-                        }
-                    });
-        } else {
-            requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
-        }
-        return false;
-    }
-
-    /**
-     * Callback received when a permissions request has been completed.
-     */
-    @Override
-    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
-                                           @NonNull int[] grantResults) {
-        if (requestCode == REQUEST_READ_CONTACTS) {
-            if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
-                populateAutoComplete();
-            }
-        }
-    }
-
-
-    /**
-     * Attempts to sign in or register the account specified by the login form.
-     * If there are form errors (invalid email, missing fields, etc.), the
-     * errors are presented and no actual login attempt is made.
-     */
-    private void attemptLogin() {
-        if (mAuthTask != null) {
-            return;
-        }
-
-        // Reset errors.
-        mEmailView.setError(null);
-        mPasswordView.setError(null);
-
-        // Store values at the time of the login attempt.
-        String email = mEmailView.getText().toString();
-        String password = mPasswordView.getText().toString();
-
-        boolean cancel = false;
-        View focusView = null;
-
-        // Check for a valid password, if the user entered one.
-        if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {
-            mPasswordView.setError(getString(R.string.error_invalid_password));
-            focusView = mPasswordView;
-            cancel = true;
-        }
-
-        // Check for a valid email address.
-        if (TextUtils.isEmpty(email)) {
-            mEmailView.setError(getString(R.string.error_field_required));
-            focusView = mEmailView;
-            cancel = true;
-        } else if (!isEmailValid(email)) {
-            mEmailView.setError(getString(R.string.error_invalid_email));
-            focusView = mEmailView;
-            cancel = true;
-        }
-
-        if (cancel) {
-            // There was an error; don't attempt login and focus the first
-            // form field with an error.
-            focusView.requestFocus();
-        } else {
-            // Show a progress spinner, and kick off a background task to
-            // perform the user login attempt.
-            showProgress(true);
-            mAuthTask = new UserLoginTask(email, password);
-            mAuthTask.execute((Void) null);
-        }
-    }
-
-    private boolean isEmailValid(String email) {
-        //TODO: Replace this with your own logic
-        return email.contains("@");
-    }
-
-    private boolean isPasswordValid(String password) {
-        //TODO: Replace this with your own logic
-        return password.length() > 4;
-    }
-
-    /**
-     * Shows the progress UI and hides the login form.
-     */
-    @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
-    private void showProgress(final boolean show) {
-        // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow
-        // for very easy animations. If available, use these APIs to fade-in
-        // the progress spinner.
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
-            int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);
-
-            mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
-            mLoginFormView.animate().setDuration(shortAnimTime).alpha(
-                    show ? 0 : 1).setListener(new AnimatorListenerAdapter() {
-                @Override
-                public void onAnimationEnd(Animator animation) {
-                    mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
-                }
-            });
-
-            mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
-            mProgressView.animate().setDuration(shortAnimTime).alpha(
-                    show ? 1 : 0).setListener(new AnimatorListenerAdapter() {
-                @Override
-                public void onAnimationEnd(Animator animation) {
-                    mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
-                }
-            });
-        } else {
-            // The ViewPropertyAnimator APIs are not available, so simply show
-            // and hide the relevant UI components.
-            mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
-            mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
-        }
-    }
-
-    @Override
-    public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {
-        return new CursorLoader(this,
-                // Retrieve data rows for the device user's 'profile' contact.
-                Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI,
-                        ContactsContract.Contacts.Data.CONTENT_DIRECTORY), ProfileQuery.PROJECTION,
-
-                // Select only email addresses.
-                ContactsContract.Contacts.Data.MIMETYPE +
-                        " = ?", new String[]{ContactsContract.CommonDataKinds.Email
-                .CONTENT_ITEM_TYPE},
-
-                // Show primary email addresses first. Note that there won't be
-                // a primary email address if the user hasn't specified one.
-                ContactsContract.Contacts.Data.IS_PRIMARY + " DESC");
-    }
-
-    @Override
-    public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
-        List<String> emails = new ArrayList<>();
-        cursor.moveToFirst();
-        while (!cursor.isAfterLast()) {
-            emails.add(cursor.getString(ProfileQuery.ADDRESS));
-            cursor.moveToNext();
-        }
-
-        addEmailsToAutoComplete(emails);
-    }
-
-    @Override
-    public void onLoaderReset(Loader<Cursor> cursorLoader) {
-
-    }
-
-    private void addEmailsToAutoComplete(List<String> emailAddressCollection) {
-        //Create adapter to tell the AutoCompleteTextView what to show in its dropdown list.
-        ArrayAdapter<String> adapter =
-                new ArrayAdapter<>(LoginActivity.this,
-                        android.R.layout.simple_dropdown_item_1line, emailAddressCollection);
-
-        mEmailView.setAdapter(adapter);
-    }
-
-
-    private interface ProfileQuery {
-        String[] PROJECTION = {
-                ContactsContract.CommonDataKinds.Email.ADDRESS,
-                ContactsContract.CommonDataKinds.Email.IS_PRIMARY,
-        };
-
-        int ADDRESS = 0;
-        int IS_PRIMARY = 1;
-    }
-
-    /**
-     * Represents an asynchronous login/registration task used to authenticate
-     * the user.
-     */
-    public class UserLoginTask extends AsyncTask<Void, Void, Boolean> {
-
-        private final String mEmail;
-        private final String mPassword;
-
-        UserLoginTask(String email, String password) {
-            mEmail = email;
-            mPassword = password;
-        }
-
-        @Override
-        protected Boolean doInBackground(Void... params) {
-            // TODO: attempt authentication against a network service.
-
-            try {
-                // Simulate network access.
-                Thread.sleep(2000);
-            } catch (InterruptedException e) {
-                return false;
-            }
-
-            for (String credential : DUMMY_CREDENTIALS) {
-                String[] pieces = credential.split(":");
-                if (pieces[0].equals(mEmail)) {
-                    // Account exists, return true if the password matches.
-                    return pieces[1].equals(mPassword);
-                }
-            }
-
-            // TODO: register the new account here.
-            return true;
-        }
-
-        @Override
-        protected void onPostExecute(final Boolean success) {
-            mAuthTask = null;
-            showProgress(false);
-
-            if (success) {
-                finish();
-            } else {
-                mPasswordView.setError(getString(R.string.error_incorrect_password));
-                mPasswordView.requestFocus();
-            }
-        }
-
-        @Override
-        protected void onCancelled() {
-            mAuthTask = null;
-            showProgress(false);
-        }
+    private void goToRegisterActivity() {
+        Intent intent=new Intent(LoginActivity.this,RegisterActivity.class);
+        startActivity(intent);
     }
 }
-
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/MainActivity.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/MainActivity.java
new file mode 100644
index 0000000..a8c59a1
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/MainActivity.java
@@ -0,0 +1,245 @@
+package com.example.administrator.myapplication.ui;
+
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.graphics.drawable.BitmapDrawable;
+import android.os.Bundle;
+import android.os.SystemClock;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.NavigationView;
+import android.support.design.widget.Snackbar;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentTransaction;
+import android.support.v4.view.GravityCompat;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v7.app.ActionBarDrawerToggle;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.ImageView;
+
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.db.NoteDatabase;
+import com.example.administrator.myapplication.entity.UpdataEvent;
+import com.example.administrator.myapplication.entity.User;
+import com.example.administrator.myapplication.utils.Constants;
+import com.example.administrator.myapplication.utils.SystemUtils;
+
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+
+public class MainActivity extends AppCompatActivity
+        implements NavigationView.OnNavigationItemSelectedListener {
+    //æ­¤å¤„ä¸�èƒ½å®šä¹‰ä¸ºå…¨å±€çš„ï¼Œå�¦åˆ™åœ¨è°ƒç”¨changFragmentå‡½æ•°æ—¶ä¼šæŠ¥java.lang.IllegalStateException: commit already called
+//    private   FragmentManager fm=getSupportFragmentManager();
+//     private  FragmentTransaction ft=fm.beginTransaction();
+
+    protected FloatingActionButton fab;
+    private  boolean isFirstUse;
+    protected DrawerLayout drawer;
+    private long mBackPressedTime=0;
+    private  NoteBookFragment noteBookFragment;
+    private ImageView headIcon;
+    private View baseView;
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        isFirstUse=new SystemUtils(MainActivity.this).isFirstUse();
+        if(isFirstUse) {
+            initIntruduceData();
+        }
+        initMainFragment();
+        initUi();
+        initHead();
+        initBgPic();
+      //  User.refreshAvatarFromLocal(BmobConstants.MyAvatarDir+"avatarIcon.png",headIcon);
+        //æ³¨å†ŒEventBus
+        EventBus.getDefault().register(this);
+    }
+
+    /**
+     * ç”¨äºŽåˆ·æ–°å¤´åƒ�çš„
+     * @param event
+     */
+    @Subscribe
+    public void onEventBackgroundThread(UpdataEvent event) {
+        if (event.getType() == UpdataEvent.UPDATE_USER_INFOS) {
+            User.initDefaultAvatar(this,headIcon);
+            //Snackbar.make(headIcon,"update",Snackbar.LENGTH_LONG).show();
+           // mPresenter.setUserNickName();
+
+
+        }
+    }
+
+
+
+    private void initUi()
+    {
+        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+        setSupportActionBar(toolbar);
+        fab = (FloatingActionButton) findViewById(R.id.fab);
+        fab.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                //    toggleActionButton();
+                Intent intent = new Intent(MainActivity.this, NoteEditActivity.class);
+                Bundle bundle = new Bundle();
+                bundle.putInt(NoteEditFragment.NOTE_FROMWHERE_KEY,
+                        NoteEditFragment.QUICK_DIALOG);
+                intent.putExtra(Constants.BUNDLE_KEY_ARGS, bundle);
+                startActivity(intent);
+            }
+        });
+        drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
+                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
+        drawer.setDrawerListener(toggle);
+        toggle.syncState();
+
+        NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
+        navigationView.setNavigationItemSelectedListener(this);
+
+        baseView= navigationView.getHeaderView(0);
+        headIcon= (ImageView)baseView.findViewById(R.id.imageView);
+
+        headIcon.setOnClickListener(headIconOnTouchListener);
+
+
+    }
+
+    private  View.OnClickListener headIconOnTouchListener=new View.OnClickListener() {
+        @Override
+        public void onClick(View vt) {
+
+            Intent intent = new Intent(MainActivity.this, UserInfoActivity.class);
+            startActivity(intent);
+
+        }
+    };
+
+    private void initBgPic()
+    {
+
+        SystemUtils systemUtils=new SystemUtils(this);
+        String path=systemUtils.getPath();
+        if(path!=null) {
+            Bitmap bitmap = systemUtils.getBitmapByPath(this, path);
+            if (bitmap != null) {
+                drawer.setBackgroundDrawable(new BitmapDrawable(getResources(), bitmap));
+
+            }
+        }
+    }
+    private void initHead()
+    {
+
+        User.initDefaultAvatar(this,headIcon);
+
+
+    }
+    private void initMainFragment()
+    {
+        FragmentManager fm=getSupportFragmentManager();
+        FragmentTransaction ft=fm.beginTransaction();
+        noteBookFragment=new  NoteBookFragment();
+        ft.replace(R.id.main_fraglayout, noteBookFragment,null);
+        ft.commit();
+    }
+
+
+    protected   void changeFragment(Fragment fragment)
+    {
+        FragmentManager fm=getSupportFragmentManager();
+        FragmentTransaction ft=fm.beginTransaction();
+        ft.replace(R.id.main_fraglayout, fragment,null);
+    //    ft.addToBackStack(fragment.toString());
+        ft.commit();
+
+    }
+
+
+    private void initIntruduceData()
+    {
+        NoteDatabase noteDb=  new NoteDatabase(MainActivity.this);
+        noteDb.insertIntroduce(this);
+        new SystemUtils(MainActivity.this).set("isFirstUse","false");
+    }
+
+
+
+
+
+
+    @Override
+    public void onBackPressed() {
+        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+        if (drawer.isDrawerOpen(GravityCompat.START)) {
+            drawer.closeDrawer(GravityCompat.START);
+        } else {
+            long curTime = SystemClock.uptimeMillis();
+            if ((curTime - mBackPressedTime) < (2 * 1000)) {
+                finish();
+                System.exit(0);
+            } else {
+                mBackPressedTime = curTime;
+                Snackbar.make(drawer, "å�Œå‡»é€€å‡ºç¨‹åº�", Snackbar.LENGTH_LONG).show();
+            }
+         //   super.onBackPressed();
+        }
+    }
+
+
+
+
+
+
+
+
+    @SuppressWarnings("StatementWithEmptyBody")
+    @Override
+    public boolean onNavigationItemSelected(MenuItem item) {
+        // Handle navigation view item clicks here.
+        int id = item.getItemId();
+
+        if (id == R.id.nav_change_bg) {
+
+            setTitle("æ›´æ�¢çš®è‚¤");
+            ChangeBgFragment changeBgFragment=new ChangeBgFragment();
+            changeFragment(changeBgFragment);
+            fab.hide();
+        } else if (id == R.id.nav_home) {
+            setTitle("ä¸»é¡µ");
+            initMainFragment();
+
+        } else if (id == R.id.nav_setting) {
+            setTitle("è®¾ç½®");
+            SettingFragment settingFragment=new SettingFragment();
+            changeFragment(settingFragment);
+            fab.hide();
+
+        } else if (id == R.id.nav_share) {
+
+            SystemUtils.shareApp(this);
+
+        } else if (id == R.id.nav_about) {
+
+            setTitle("å…³äºŽåº”ç”¨");
+            AboutAppFragment aboutAppFragment=new AboutAppFragment();
+            changeFragment(aboutAppFragment);
+            fab.hide();
+        }
+        else if (id == R.id.nav_exit) {
+            finish();
+            System.exit(0);
+        }
+
+        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+        drawer.closeDrawer(GravityCompat.START);
+        return true;
+    }
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/NoteBookFragment.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/NoteBookFragment.java
new file mode 100644
index 0000000..675631f
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/NoteBookFragment.java
@@ -0,0 +1,357 @@
+package com.example.administrator.myapplication.ui;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.os.Bundle;
+import android.support.design.widget.Snackbar;
+import android.support.v4.app.Fragment;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.View.OnTouchListener;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ImageView;
+import android.widget.Toast;
+
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.adapter.NotebookAdapter;
+import com.example.administrator.myapplication.db.NoteDatabase;
+import com.example.administrator.myapplication.entity.NotebookData;
+import com.example.administrator.myapplication.entity.OnResponseListener;
+import com.example.administrator.myapplication.entity.Response;
+import com.example.administrator.myapplication.entity.User;
+import com.example.administrator.myapplication.utils.AccountUtils;
+import com.example.administrator.myapplication.utils.Constants;
+import com.example.administrator.myapplication.utils.HTQAnimations;
+import com.example.administrator.myapplication.utils.SystemUtils;
+import com.example.administrator.myapplication.widget.HTQDragGridView;
+
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+
+
+public class NoteBookFragment extends Fragment implements
+        OnItemClickListener, OnRefreshListener {
+
+    @BindView(R.id.frag_note_list)
+    HTQDragGridView mGrid;
+    @BindView(R.id.frag_note_trash)
+    ImageView mImgTrash;
+    @BindView(R.id.swiperefreshlayout)
+    SwipeRefreshLayout mSwipeRefreshLayout;
+
+    private NoteDatabase noteDb;
+    private List<NotebookData> datas;
+    private NotebookAdapter adapter;
+    private Activity aty;
+    public static final int STATE_NONE = 0;
+    public static final int STATE_REFRESH = 1;
+    public static final int STATE_LOADMORE = 2;
+    public static final int STATE_NOMORE = 3;
+    public static final int STATE_PRESSNONE = 4;// æ­£åœ¨ä¸‹æ‹‰ä½†è¿˜æ²¡æœ‰åˆ°åˆ·æ–°çš„çŠ¶æ€�
+    public static int mState = STATE_NONE;
+    /**
+     * ç”¨æ�¥å�šæ›´è¿›ä¸€æ­¥äººæ€§åŒ–çš„é˜²æ‰‹æŠ–ç­–ç•¥æ—¶ä½¿ç”¨<br>
+     * æ¯”å¦‚ç”±äºŽæ‰‹æŠ–åŠ¨ä¸Šä¸‹æ‹‰è�œå�•æ—¶æ‹‰åŠ¨ä¸€éƒ¨åˆ†ï¼Œä½†å�ˆæ²¡æœ‰è¾¾åˆ°å�¯åˆ·æ–°çš„æ—¶å€™ï¼Œæš‚å�œä¸€æ®µæ—¶é—´ï¼Œè¿™ä¸ªæ—¶å€™ç”¨æˆ·çš„é€»è¾‘åº”è¯¥æ˜¯è¦�ç§»åŠ¨itemçš„ã€‚<br>
+     * å…¶å®žåº”è¯¥è¿˜æœ‰ä¸€ç§�æ ¹æ�®setOnFocusChangeListeneræ�¥æ”¹å†™çš„æ–¹æ³•ï¼Œæˆ‘æ²¡æœ‰å°�è¯•ã€‚
+     */
+    // private static final Handler mHandler = new Handler() {
+    // @Override
+    // public void handleMessage(android.os.Message msg) {
+    // mList.setDragEnable(true);
+    // };
+    // };
+
+    /********************************* function method ******************************/
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setHasOptionsMenu(true);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        super.onCreateView(inflater, container, savedInstanceState);
+        View rootView = inflater.inflate(R.layout.fragment_note, null,
+                false);
+        aty = getActivity();
+        ButterKnife.bind(this, rootView);
+        initData();
+        initView(rootView);
+        if(new SystemUtils(getActivity()).isTarn())
+            mGrid.setAlpha(0.55f);
+        return rootView;
+    }
+
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        refurbish();
+        ((MainActivity) getActivity()).fab.show();
+        //setListCanPull();
+    }
+
+    @Override
+    public void onDestroy() {
+        noteDb.destroy();
+        super.onDestroy();
+    }
+
+
+
+    @Override
+    public void onItemClick(AdapterView<?> parent, View view, int position,
+                            long id) {
+        Bundle bundle = new Bundle();
+        bundle.putInt(NoteEditFragment.NOTE_FROMWHERE_KEY,
+                NoteEditFragment.NOTEBOOK_ITEM);
+        bundle.putSerializable(NoteEditFragment.NOTE_KEY, datas.get(position));
+
+        Intent intent=new Intent(getActivity(),NoteEditActivity.class);
+        intent.putExtra(Constants.BUNDLE_KEY_ARGS, bundle);
+        startActivity(intent);
+
+
+    }
+
+    /***************************** initialization method ***************************/
+
+
+    public void initData() {
+        noteDb = new NoteDatabase(aty);
+        datas = noteDb.query();// æŸ¥è¯¢æ“�ä½œï¼Œå¿½ç•¥è€—æ—¶
+        if (datas != null) {
+            adapter = new NotebookAdapter(aty, datas);
+        }
+        else //å¦‚æžœæœ¬åœ°æ— æ•°æ�®åˆ™å°�è¯•ä»Žæœ�åŠ¡å™¨ç«¯èŽ·å�–æ•°æ�®
+        {
+            getServerData();
+        }
+    }
+
+public void getServerData()
+{
+    String userId = AccountUtils.getUserId(getActivity());
+    User.getUserNotes(getActivity(), userId, new OnResponseListener() {
+        @Override
+        public void onResponse(Response response) {
+            if(response.isSucces())
+            {
+                datas.clear();//å…ˆå°†datasä¸­çš„æ•°æ�®å…¨éƒ¨æ¸…é™¤æŽ‰
+                datas.addAll(response.getNoteItemList());
+                if (datas.size() > 0) {
+                    adapter = new NotebookAdapter(aty, datas);
+
+                } else {
+                   Snackbar.make(mGrid,"æš‚æ— æ•°æ�®å“¦ï¼�èµ¶å¿«æ·»åŠ ä¸€ä¸ªï¼š)", Snackbar.LENGTH_LONG).show();
+                }
+            }
+        }
+    });
+
+}
+
+    public void initView(View view) {
+        mGrid.setAdapter(adapter);
+        mGrid.setOnItemClickListener(this);
+        mGrid.setTrashView(mImgTrash);
+        mGrid.setSelector(new ColorDrawable(Color.TRANSPARENT));
+        mGrid.setOnDeleteListener(new HTQDragGridView.OnDeleteListener() {
+            @Override
+            public void onDelete(final int position) {
+
+
+                       // datas.get(position).setObjectId(datas.get(position).getObjectId());
+                        datas.get(position).deleteNoteInServe(getActivity(), new OnResponseListener() {
+                            @Override
+                            public void onResponse(Response response) {
+                                if(!response.isSucces())
+                                {
+                                    Toast.makeText(getActivity(),response.getMsg(), Toast.LENGTH_LONG).show();
+                                }
+                            }
+                        });
+
+                delete(position);
+            }
+        });
+        mGrid.setOnMoveListener(new HTQDragGridView.OnMoveListener() {
+            @Override
+            public void startMove() {
+                mSwipeRefreshLayout.setEnabled(false);
+                mImgTrash.startAnimation(HTQAnimations.getTranslateAnimation(0,
+                        0, mImgTrash.getTop(), 0, 500));
+                mImgTrash.setVisibility(View.VISIBLE);
+            }
+
+            @Override
+            public void finishMove() {
+             //   setListCanPull();
+                mImgTrash.setVisibility(View.INVISIBLE);
+                mImgTrash.startAnimation(HTQAnimations.getTranslateAnimation(0,
+                        0, 0, mImgTrash.getTop(), 500));
+                if (adapter.getDataChange()) {
+                    new Thread(new Runnable() {
+                        @Override
+                        public void run() {
+                            noteDb.reset(adapter.getDatas());
+                        }
+                    }).start();
+                }
+            }
+
+            @Override
+            public void cancleMove() {}
+        });
+
+
+        mSwipeRefreshLayout.setOnTouchListener(new OnTouchListener() {
+            @Override
+            public boolean onTouch(View v, MotionEvent event) {
+                if (event.getAction() == MotionEvent.ACTION_MOVE) {
+                    mState = STATE_PRESSNONE;
+                    mGrid.setDragEnable(false);
+                    // mHandler.sendMessageDelayed(Message.obtain(), 400);
+                } else {
+                    mGrid.setDragEnable(true);
+                }
+                return false;
+            }
+        });
+        mSwipeRefreshLayout.setOnRefreshListener(this);
+        mSwipeRefreshLayout.setColorSchemeResources(
+                R.color.swiperefresh_color1, R.color.swiperefresh_color2,
+                R.color.swiperefresh_color3, R.color.swiperefresh_color4);
+//        mEmptyLayout.setErrorType(EmptyLayout.NODATA);
+//        if (!datas.isEmpty()) {
+//            mEmptyLayout.setVisibility(View.GONE);
+//        }
+    }
+
+    /********************************* GridView method ******************************/
+
+    @Override
+    public void onRefresh() {//å�Œæ­¥æ•°æ�®,å…ˆä»Žæœ�åŠ¡å™¨ç«¯èŽ·å�–æ•°æ�®ï¼Œç„¶å�Žé‡�ç½®åˆ°æ•°æ�®åº“ä¸­
+        if (mState == STATE_REFRESH) {
+            return;
+        }
+        // è®¾ç½®é¡¶éƒ¨æ­£åœ¨åˆ·æ–°
+        mGrid.setSelection(0);
+        setSwipeRefreshLoadingState();
+        getServerData();
+        adapter.refurbishData(datas);
+        noteDb.reset(datas);//å°†ç»“æžœé‡�ç½®åˆ°æ•°æ�®åº“
+//        for(int i=0;i<datas.size();i++)
+//        {
+//
+//            noteDb.save(datas.get(i));
+//        }
+
+        //refurbish();
+        setSwipeRefreshLoadedState();
+        Snackbar.make(mGrid, "å·²ä»Žæœ�åŠ¡å™¨ç«¯å�Œæ­¥æ•°æ�®ï¼�", Snackbar.LENGTH_LONG)
+                        .setAction("Action", null).show();
+    }
+
+    /**
+     * è®¾ç½®é¡¶éƒ¨æ­£åœ¨åŠ è½½çš„çŠ¶æ€�
+     */
+    private void setSwipeRefreshLoadingState() {
+        mState = STATE_REFRESH;
+        mGrid.setDragEnable(false);
+        if (mSwipeRefreshLayout != null) {
+            mSwipeRefreshLayout.setRefreshing(true);
+            // é˜²æ­¢å¤šæ¬¡é‡�å¤�åˆ·æ–°
+           // mSwipeRefreshLayout.setEnabled(false);
+        }
+    }
+
+    /**
+     * è®¾ç½®é¡¶éƒ¨åŠ è½½å®Œæ¯•çš„çŠ¶æ€�
+     */
+    private void setSwipeRefreshLoadedState() {
+        mState = STATE_NOMORE;
+        if (mSwipeRefreshLayout != null) {
+            mSwipeRefreshLayout.setRefreshing(false);
+            mSwipeRefreshLayout.setEnabled(true);
+        }
+        mGrid.setDragEnable(true);
+    }
+
+
+
+
+    /********************************* synchronize method ******************************/
+
+    /**
+     * ä½¿ç”¨è‡ªå¸¦ç¼“å­˜åŠŸèƒ½çš„ç½‘ç»œè¯·æ±‚ï¼Œé˜²æ­¢å¤šæ¬¡åˆ·æ–°é€ æˆ�çš„æµ�é‡�æ�Ÿè€—ä»¥å�Šæœ�åŠ¡å™¨åŽ‹åŠ›
+     */
+    private void refurbish() {
+        datas = noteDb.query();
+        if (datas != null) {
+            if (adapter != null) {
+                adapter.refurbishData(datas);
+            } else {
+                adapter = new NotebookAdapter(aty, datas);
+                mGrid.setAdapter(adapter);
+            }
+        }
+
+    }
+
+    /**
+     * åˆ é™¤æ•°æ�®
+     * 
+     * @param index
+     */
+    private void delete(int index) {
+        final int noteId = datas.get(index).getId();
+
+        noteDb.delete(noteId);
+        datas.remove(index);
+        if (datas != null && adapter != null) {
+            adapter.refurbishData(datas);
+
+            mGrid.setAdapter(adapter);
+        }
+
+      //  updateEmptyView();
+    }
+
+    @Override
+    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+        // Inflate the menu; this adds items to the action bar if it is present.
+        inflater.inflate(R.menu.main, menu);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        // Handle action bar item clicks here. The action bar will
+        // automatically handle clicks on the Home/Up button, so long
+        // as you specify a parent activity in AndroidManifest.xml.
+        int id = item.getItemId();
+
+        //noinspection SimplifiableIfStatement
+        if (id == R.id.action_settings) {
+            new SystemUtils(getActivity()).setBoolean("isTran",true);
+            mGrid.setAlpha(0.55f);
+            return true;
+        }
+
+        return super.onOptionsItemSelected(item);
+    }
+}
\ No newline at end of file
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/NoteEditActivity.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/NoteEditActivity.java
new file mode 100644
index 0000000..b64fd9d
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/NoteEditActivity.java
@@ -0,0 +1,43 @@
+package com.example.administrator.myapplication.ui;
+
+import android.os.Bundle;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentTransaction;
+import android.support.v7.app.AppCompatActivity;
+
+import com.example.administrator.myapplication.R;
+
+/**
+ * Created by htq on 2016/8/9.
+ */
+public class NoteEditActivity extends AppCompatActivity {
+
+
+    private  NoteEditFragment noteEditFragment;
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_note_edit);
+        setTitle("æ·»åŠ è®°å½•");
+        initFragment();
+
+    }
+
+    private void initFragment()
+    {
+        FragmentManager fm=getSupportFragmentManager();
+        FragmentTransaction ft=fm.beginTransaction();
+        noteEditFragment=new  NoteEditFragment();
+        ft.replace(R.id.main_fraglayout, noteEditFragment,null);
+        ft.commit();
+    }
+    @Override
+    public void onBackPressed() {
+
+       if(!noteEditFragment.onBackPressed())
+          super.onBackPressed();
+
+    }
+
+
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/NoteEditFragment.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/NoteEditFragment.java
new file mode 100644
index 0000000..df6353f
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/NoteEditFragment.java
@@ -0,0 +1,490 @@
+package com.example.administrator.myapplication.ui;
+
+
+import android.app.AlarmManager;
+import android.app.AlertDialog;
+import android.app.PendingIntent;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.design.widget.Snackbar;
+import android.support.v4.app.Fragment;
+import android.text.Html;
+import android.text.InputType;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.github.clans.fab.FloatingActionButton;
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.db.NoteDatabase;
+import com.example.administrator.myapplication.entity.NotebookData;
+import com.example.administrator.myapplication.entity.OnResponseListener;
+import com.example.administrator.myapplication.entity.Response;
+import com.example.administrator.myapplication.utils.AccountUtils;
+import com.example.administrator.myapplication.utils.Constants;
+import com.example.administrator.myapplication.utils.DialogHelp;
+import com.example.administrator.myapplication.utils.HTQAnimations;
+import com.example.administrator.myapplication.utils.ResourceParser;
+import com.example.administrator.myapplication.utils.SPUtils;
+import com.example.administrator.myapplication.utils.StringUtils;
+import com.example.administrator.myapplication.utils.SystemUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+
+/**
+ * Created by htq on 2016/8/8.
+ */
+public class NoteEditFragment  extends Fragment implements View.OnClickListener,View.OnTouchListener {
+    @BindView(R.id.note_detail_edit)
+    EditText mEtContent;
+    @BindView(R.id.note_detail_tv_date)
+    TextView mTvDate;
+    @BindView(R.id.note_detail_titlebar)
+    RelativeLayout mLayoutTitle;
+    @BindView(R.id.note_detail_img_thumbtack)
+    ImageView mImgThumbtack;
+
+    @BindView(R.id.note_detail_img_button)
+    ImageView mImgMenu;
+    @BindView(R.id.note_detail_menu)
+    RelativeLayout mLayoutMenu;
+
+    @BindView(R.id.note_detail_img_green)
+    ImageView mImgGreen;
+    @BindView(R.id.note_detail_img_blue)
+    ImageView mImgBlue;
+    @BindView(R.id.note_detail_img_purple)
+    ImageView mImgPurple;
+    @BindView(R.id.note_detail_img_yellow)
+    ImageView mImgYellow;
+    @BindView(R.id.note_detail_img_red)
+    ImageView mImgRed;
+
+    @BindView(R.id.menu_item_text_font)
+    FloatingActionButton menuTextFont;
+    @BindView(R.id.menu_item_clock)
+    FloatingActionButton menuClock;
+    @BindView(R.id.menu_item_desktop)
+    FloatingActionButton menuDesktop;
+    @BindView(R.id.menu_item_share)
+    FloatingActionButton menuShare;
+
+    @BindView(R.id.font_size_selector)
+    View mFontSizeSelector;
+    private NotebookData editData;
+    private NoteDatabase noteDb;
+    protected boolean isNewNote;
+    private int whereFrom = QUICK_DIALOG;// ä»Žå“ªä¸ªç•Œé�¢æ�¥
+
+    public static final String NOTE_KEY = "notebook_key";
+    public static final String NOTE_FROMWHERE_KEY = "fromwhere_key";
+    public static final int QUICK_DIALOG = 0;
+    public static final int NOTEBOOK_ITEM = 1;
+    public static final String DESKTOP = "desktop";
+
+
+    private int mFontSizeId;
+    private static final Map<Integer, Integer> sFontSelectorSelectionMap = new HashMap<Integer, Integer>();
+
+    static {
+        sFontSelectorSelectionMap.put(Constants.TEXT_LARGE, R.id.iv_large_select);
+        sFontSelectorSelectionMap.put(Constants.TEXT_SMALL, R.id.iv_small_select);
+        sFontSelectorSelectionMap.put(Constants.TEXT_MEDIUM, R.id.iv_medium_select);
+        sFontSelectorSelectionMap.put(Constants.TEXT_SUPER, R.id.iv_super_select);
+    }
+
+    private static final Map<Integer, Integer> sFontSizeBtnsMap = new HashMap<Integer, Integer>();
+
+    static {
+        sFontSizeBtnsMap.put(R.id.ll_font_large, Constants.TEXT_LARGE);
+        sFontSizeBtnsMap.put(R.id.ll_font_small, Constants.TEXT_SMALL);
+        sFontSizeBtnsMap.put(R.id.ll_font_normal,Constants.TEXT_MEDIUM);
+        sFontSizeBtnsMap.put(R.id.ll_font_super, Constants.TEXT_SUPER);
+    }
+    public static final int[] sBackGrounds = { 0xffe5fce8,// ç»¿è‰²
+            0xfffffdd7,// é»„è‰²
+            0xffffddde,// çº¢è‰²
+            0xffccf2fd,// è“�è‰²
+            0xfff7f5f6,// ç´«è‰²
+    };
+    public static final int[] sTitleBackGrounds = { 0xffcef3d4,// ç»¿è‰²
+            0xffebe5a9,// é»„è‰²
+            0xffecc4c3,// çº¢è‰²
+            0xffa9d5e2,// è“�è‰²
+            0xffddd7d9,// ç´«è‰²
+    };
+
+    public static final int[] sThumbtackImgs = { R.drawable.green,
+            R.drawable.yellow, R.drawable.red, R.drawable.blue,
+            R.drawable.purple };
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        super.onCreateView(inflater, container, savedInstanceState);
+        View rootView = inflater.inflate(R.layout.note_edit_fraglayout,
+                container, false);
+        ButterKnife.bind(this, rootView);
+        initData();
+        initView(rootView);
+
+        return rootView;
+    }
+
+
+    private void initView(View view) {
+
+        mImgGreen.setOnClickListener(this);
+        mImgBlue.setOnClickListener(this);
+        mImgPurple.setOnClickListener(this);
+        mImgYellow.setOnClickListener(this);
+        mImgRed.setOnClickListener(this);
+
+        mEtContent.setInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE);
+        mEtContent.setSingleLine(false);
+        mEtContent.setHorizontallyScrolling(false);
+        mEtContent.setText(Html.fromHtml(editData.getContent()).toString());
+        mTvDate.setText(editData.getDate());
+
+        mEtContent.setBackgroundColor(sBackGrounds[editData.getColor()]);
+        mLayoutTitle.setBackgroundColor(sTitleBackGrounds[editData.getColor()]);
+        mImgThumbtack.setImageResource(sThumbtackImgs[editData.getColor()]);
+
+        mImgMenu.setOnTouchListener(this);
+        mLayoutMenu.setOnTouchListener(this);
+
+//        mImgThumbtack.setImageResource(sThumbtackImgs[editData.getColor()]);
+//        mEtContent.setBackgroundColor(sBackGrounds[editData.getColor()]);
+//        mLayoutTitle.setBackgroundColor(sTitleBackGrounds[editData.getColor()]);
+//        closeMenu();
+    }
+
+
+
+
+    public void initData() {
+        noteDb = new NoteDatabase(getActivity());
+        if (editData == null) {
+            editData = new NotebookData();
+            editData.setContent(new SystemUtils(getActivity()).getNoteDraft());
+            isNewNote = true;
+        }
+        if (StringUtils.isEmpty(editData.getDate())) {
+            editData.setDate(StringUtils.getDataTime("yyyy/MM/dd"));
+        }
+
+        mFontSizeId= (int) SPUtils.get(getActivity(),Constants.TEXT_SIZE,Constants.TEXT_MEDIUM);
+    }
+
+
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.note_detail_img_green:
+                editData.setColor(0);
+                break;
+            case R.id.note_detail_img_blue:
+                editData.setColor(3);
+                break;
+            case R.id.note_detail_img_purple:
+                editData.setColor(4);
+                break;
+            case R.id.note_detail_img_yellow:
+                editData.setColor(1);
+                break;
+            case R.id.note_detail_img_red:
+                editData.setColor(2);
+                break;
+
+        }
+        mImgThumbtack.setImageResource(sThumbtackImgs[editData.getColor()]);
+        mEtContent.setBackgroundColor(sBackGrounds[editData.getColor()]);
+        mLayoutTitle.setBackgroundColor(sTitleBackGrounds[editData.getColor()]);
+        closeMenu();
+    }
+
+    @OnClick({R.id.menu_item_share,R.id.menu_item_text_font,R.id.menu_item_clock,R.id.menu_item_desktop})
+    public void click( FloatingActionButton menuItem)
+    {
+        String editContent=mEtContent.getText().toString();
+        switch(menuItem.getId())
+        {
+            case R.id.menu_item_share:{
+
+                if(editContent.equals(""))
+                {
+                    Toast.makeText(getActivity(),"æ‚¨è¿˜æœªè¾“å…¥å†…å®¹å“¦", Toast.LENGTH_LONG).show();
+                }else {
+                    SystemUtils.shareNote(getActivity(),editContent);
+                }
+            }
+            break;
+            case R.id.menu_item_text_font:{
+                showTextSelectorPanel();
+
+            } break;
+            case R.id.menu_item_clock:{
+                if(!editContent.equals("")) {
+                    setReminder(editContent);
+                }
+                else
+                {
+                    Toast.makeText(getActivity(),"äº²,å†…å®¹ä¸ºç©ºå“¦", Toast.LENGTH_LONG).show();
+                }
+
+            } break;
+
+            case R.id.menu_item_desktop:{
+
+                if(!editContent.equals("")) {
+                    addToDesktop(editContent);
+                }
+                else
+                {
+                    Toast.makeText(getActivity(),"å†…å®¹ä¸ºç©ºï¼Œæ·»åŠ å¤±è´¥", Toast.LENGTH_LONG).show();
+                }
+            } break;
+        }
+
+
+    }
+
+
+    @OnClick({R.id.ll_font_small,R.id.ll_font_normal,R.id.ll_font_large,R.id.ll_font_super})
+    public void ClickTextSizeSelector(View v) {
+        int id = v.getId();
+        getActivity().findViewById(sFontSelectorSelectionMap.get(mFontSizeId)).setVisibility(View.GONE);
+        mFontSizeId = sFontSizeBtnsMap.get(id);
+        SPUtils.put(getActivity(),Constants.TEXT_SIZE,mFontSizeId);
+        getActivity().findViewById(sFontSelectorSelectionMap.get(mFontSizeId)).setVisibility(View.VISIBLE);
+        mEtContent.setTextAppearance(getActivity(),
+                ResourceParser.TextAppearanceResources.getTexAppearanceResource(mFontSizeId));
+        getActivity().findViewById(R.id.font_size_selector).setVisibility(View.GONE);
+
+    }
+    private void showTextSelectorPanel() {
+        mFontSizeSelector.setVisibility(View.VISIBLE);
+        getActivity().findViewById(sFontSelectorSelectionMap.get(mFontSizeId)).setVisibility(View.VISIBLE);
+    }
+
+    private void addToDesktop(String title) {
+        Intent intent = new Intent();
+        Intent shortcutIntent = new Intent(getActivity(), NoteEditActivity.class);
+       // SPUtils.put(getActivity(),DESKTOP,title);//å°†å†…å®¹ä¿�å­˜è‡³shareä¸­
+        shortcutIntent.putExtra(DESKTOP,title);
+        shortcutIntent.setAction(Intent.ACTION_VIEW);
+        intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
+        intent.putExtra(Intent.EXTRA_SHORTCUT_NAME,title);
+        intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
+                Intent.ShortcutIconResource.fromContext(getActivity(), R.mipmap.app_icon));
+        intent.putExtra("duplicate", true);
+        intent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
+        Toast.makeText(getActivity(),"å·²æ·»åŠ è‡³æ¡Œé�¢", Toast.LENGTH_LONG).show();
+       // showToast(R.string.info_note_enter_desktop);
+        getActivity().sendBroadcast(intent);
+    }
+
+    private void setReminder(final String str) {
+        DateTimePickerDialog d = new DateTimePickerDialog(getActivity(), System.currentTimeMillis());
+        d.setOnDateTimeSetListener(new DateTimePickerDialog.OnDateTimeSetListener() {
+            public void OnDateTimeSet(AlertDialog dialog, long date) {
+                setClock(date, true,str);
+               // mEditNote.setAlertDate(date, true);
+            }
+        });
+        d.show();
+    }
+
+    private void setClock(Long date, boolean set, String str)
+    {
+
+        Intent intent = new Intent(getActivity(), AlarmReceiver.class);
+        intent.putExtra(Constants.ALART_CONTENT,str);
+      //  intent.setData(ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, mWorkingNote.getNoteId()));
+        PendingIntent pendingIntent = PendingIntent.getBroadcast(getActivity(), 0, intent, 0);
+        AlarmManager alarmManager = ((AlarmManager) getActivity().getSystemService(getActivity().ALARM_SERVICE));
+        if (!set) {
+            alarmManager.cancel(pendingIntent);
+        } else {
+            alarmManager.set(AlarmManager.RTC_WAKEUP, date, pendingIntent);
+
+        }
+    }
+    @Override
+    public boolean onTouch(View v, MotionEvent event) {
+        if (MotionEvent.ACTION_DOWN == event.getAction()) {
+            if (mLayoutMenu.getVisibility() == View.GONE) {
+                openMenu();
+            } else {
+                closeMenu();
+            }
+        }
+        return true;
+    }
+    /**
+     * åˆ‡æ�¢ä¾¿ç­¾é¢œè‰²çš„è�œå�•
+     */
+    private void openMenu() {
+        HTQAnimations.openAnimation(mLayoutMenu, mImgMenu, 700);
+    }
+
+    /**
+     * åˆ‡æ�¢ä¾¿ç­¾é¢œè‰²çš„è�œå�•
+     */
+    private void closeMenu() {
+        HTQAnimations.closeAnimation(mLayoutMenu, mImgMenu, 500);
+    }
+
+    /**
+     * ä¿�å­˜å·²ç¼–è¾‘å†…å®¹åˆ°æ•°æ�®åº“
+     */
+    private void save() {
+        setNoteProperty();
+        noteDb.save(editData);
+    }
+    private void setNoteProperty()
+    {
+        if (editData.getId() == 0) {
+            editData.setId(-1
+                    * StringUtils.toInt(
+                    StringUtils.getDataTime("dddHHmmss"), 0));
+        }
+        String userId = AccountUtils.getUserId(getActivity());
+        editData.setUserId(userId);
+
+        editData.setUnixTime(StringUtils.getDataTime("yyyy-MM-dd HH:mm:ss"));
+        editData.setContent(mEtContent.getText().toString());
+        editData.setObjectId(editData.getObjectId());
+    }
+
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setHasOptionsMenu(true);
+
+        Bundle bundle = getActivity().getIntent().getBundleExtra(Constants.BUNDLE_KEY_ARGS);
+        if (bundle != null) {
+            editData = (NotebookData) bundle.getSerializable(NOTE_KEY);
+            whereFrom = bundle.getInt(NOTE_FROMWHERE_KEY, QUICK_DIALOG);
+        }
+        getActivity().getWindow().setSoftInputMode(
+                WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN
+                        | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
+    }
+
+    @Override
+    public void onResume() {
+        String desktopStr=getActivity().getIntent().getStringExtra(DESKTOP);
+
+        if(desktopStr!=null)//è¡¨æ˜Žç”¨æˆ·ä»Žæ¡Œé�¢å¿«æ�·æ–¹å¼�ç‚¹å‡»è¿‡æ�¥çš„
+        {
+            mEtContent.setText(desktopStr);
+        }
+        super.onResume();
+    }
+
+    @Override
+    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+        inflater.inflate(R.menu.notebook_edit_menu, menu);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.public_menu_send:
+                if (!StringUtils.isEmpty(mEtContent.getText().toString())) {
+                    save();
+
+                    if(whereFrom==0) {//è¡¨æ˜Žç”¨æˆ·æ˜¯ä»Žä¸»æœºé�¢çš„åŠ å�·æŒ‰é’®è·³è½¬è¿‡æ�¥
+                        editData.postNoteToServer(getActivity(), new OnResponseListener() {
+                            @Override
+                            public void onResponse(Response response) {
+                                if (!response.isSucces()) {
+                                    Snackbar.make(mImgGreen, "ä¿�å­˜è‡³æœ�åŠ¡å™¨ç«¯å¤±è´¥ï¼Œæš‚ä¿�å­˜åœ¨æœ¬åœ°", Snackbar.LENGTH_LONG).show();
+                                } else {
+
+                                    getActivity().finish();
+                                }
+                            }
+                        });
+                    }else if(whereFrom==1)//è¡¨æ˜Žç”¨æˆ·æ˜¯ä»Žä¸»ç•Œé�¢çš„itemè·³è½¬è¿‡æ�¥ï¼Œæ­¤æ—¶å�ªéœ€æ›´æ–°å�³å�¯
+                    {
+                        editData.updateNoteInServe(getActivity(), editData.getObjectId(), new OnResponseListener() {
+                            @Override
+                            public void onResponse(Response response) {
+                                if (!response.isSucces()) {
+                                    Snackbar.make(mImgGreen, "ä¿�å­˜è‡³æœ�åŠ¡å™¨ç«¯å¤±è´¥"+response.getMsg(), Snackbar.LENGTH_LONG).show();
+                                } else {
+                                    getActivity().finish();
+                                }
+                            }
+                        });
+                    }
+
+                }
+
+                break;
+        }
+        return true;
+    }
+
+
+
+    public boolean onBackPressed() {
+        if (isNewNote) {
+            final String content = mEtContent.getText().toString();
+            if (!TextUtils.isEmpty(content)) {
+                DialogHelp.getConfirmDialog(getActivity(), "æ˜¯å�¦ä¿�å­˜ä¸ºè�‰ç¨¿?", new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialogInterface, int i) {
+                      //
+                        new SystemUtils(getActivity()).setNoteDraft(content+"[è�‰ç¨¿]");
+                        getActivity().finish();
+                    }
+                }, new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialogInterface, int i) {
+                        new SystemUtils(getActivity()).setNoteDraft("");
+                        getActivity().finish();
+                    }
+                }).show();
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    /**
+     * notice :inner Broadcast receiver must be static ( to be registered through Manifest)
+     * or Non-static broadcast receiver must be registered and unregistered inside the Parent class
+     *
+     */
+    public static class AlarmReceiver extends BroadcastReceiver {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            intent.setClass(context, AlarmAlertActivity.class);
+            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+           // Log.i("alarm content",intent.getStringExtra(Constants.ALART_CONTENT));
+            //intent.putExtra(Constants.ALART_CONTENT,intent.getStringExtra(Constants.ALART_CONTENT));
+            context.startActivity(intent);
+        }
+    }
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/RegisterActivity.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/RegisterActivity.java
new file mode 100644
index 0000000..2d69df2
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/RegisterActivity.java
@@ -0,0 +1,119 @@
+package com.example.administrator.myapplication.ui;
+
+import android.app.ProgressDialog;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.text.TextUtils;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageButton;
+
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.entity.User;
+import com.example.administrator.myapplication.utils.MD5Util;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import cn.bmob.v3.listener.SaveListener;
+
+/**
+ * Created by htq on 2016/9/4.
+ */
+public class RegisterActivity extends AppCompatActivity {
+
+    @BindView(R.id.et_username)
+    EditText accountEt;
+    @BindView(R.id.et_password)
+    EditText pwdEt;
+    @BindView(R.id.et_email)
+    EditText twicePwdEt;
+    @BindView(R.id.btn_register)
+    Button registerBtn;
+    @BindView(R.id.img_back)
+    ImageButton imgBtnBack;
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+//       // requestWindowFeature(Window.FEATURE_NO_TITLE);
+//        /*set it to be full screen*/
+//        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+//                WindowManager.LayoutParams.FLAG_FULLSCREEN);
+        setContentView(R.layout.activity_register);
+        ButterKnife.bind(this);
+    }
+
+    @OnClick(R.id.img_back)
+    public void back() {
+        finish();
+    }
+
+
+    @OnClick(R.id.btn_register)
+    public void register(){
+        String name =accountEt.getText().toString();
+        String password = pwdEt.getText().toString();
+        String pwd_again = twicePwdEt.getText().toString();
+
+        if (TextUtils.isEmpty(name)) {
+            Snackbar.make(registerBtn,"è´¦å�·ä¸�èƒ½ä¸ºç©º", Snackbar.LENGTH_LONG).show();
+            return;
+        }
+
+        if (TextUtils.isEmpty(password)) {
+            Snackbar.make(registerBtn,"å¯†ç �ä¸�èƒ½ä¸ºç©º", Snackbar.LENGTH_LONG).show();
+            return;
+        }
+        if (!pwd_again.equals(password)) {
+            Snackbar.make(registerBtn,"ä¸¤æ¬¡å¯†ç �è¾“å…¥ä¸�ä¸€è‡´", Snackbar.LENGTH_LONG).show();
+            return;
+        }
+
+        boolean isNetConnected = com.example.administrator.myapplication.utils.CommonUtils.isNetworkAvailable(this);
+        if(!isNetConnected){
+            Snackbar.make(registerBtn,"ç½‘ç»œè¿žæŽ¥å‡ºé”™", Snackbar.LENGTH_LONG).show();
+            return;
+        }
+
+        final ProgressDialog progress = new ProgressDialog(RegisterActivity.this);
+        progress.setMessage("æ­£åœ¨æ³¨å†Œ...");
+        progress.setCanceledOnTouchOutside(false);
+        progress.show();
+        //ç”±äºŽæ¯�ä¸ªåº”ç”¨çš„æ³¨å†Œæ‰€éœ€çš„èµ„æ–™éƒ½ä¸�ä¸€æ ·ï¼Œæ•…IM sdkæœªæ��ä¾›æ³¨å†Œæ–¹æ³•ï¼Œç”¨æˆ·å�¯æŒ‰ç…§bmod SDKçš„æ³¨å†Œæ–¹å¼�è¿›è¡Œæ³¨å†Œã€‚
+        //æ³¨å†Œçš„æ—¶å€™éœ€è¦�æ³¨æ„�ä¸¤ç‚¹ï¼š1ã€�Userè¡¨ä¸­ç»‘å®šè®¾å¤‡idå’Œtypeï¼Œ2ã€�è®¾å¤‡è¡¨ä¸­ç»‘å®šusernameå­—æ®µ
+        final User bu = new User();
+        bu.setUsername(name);
+        bu.setPassword(MD5Util.MD5(password));
+        //å°†userå’Œè®¾å¤‡idè¿›è¡Œç»‘å®šaa
+ //       bu.setUserSex(true);
+//        bu.setDeviceType("android");
+//        bu.setInstallId(BmobInstallation.getInstallationId(this));
+        bu.signUp(RegisterActivity.this, new SaveListener() {
+
+            @Override
+            public void onSuccess() {
+                // TODO Auto-generated method stub
+                progress.dismiss();
+                Snackbar.make(registerBtn,"æ³¨å†Œæˆ�åŠŸ", Snackbar.LENGTH_LONG).show();
+                // å°†è®¾å¤‡ä¸Žusernameè¿›è¡Œç»‘å®š
+              //  userManager.bindInstallationForRegister(bu.getUsername());
+                // å�¯åŠ¨ä¸»é¡µ
+              //  Log.i("test","enter mainActivity");
+                Intent intent = new Intent(RegisterActivity.this,MainActivity.class);
+                startActivity(intent);
+                finish();
+
+            }
+            @Override
+            public void onFailure(int arg0, String arg1) {
+                // TODO Auto-generated method stub
+                Snackbar.make(registerBtn,"æ³¨å†Œå¤±è´¥:", Snackbar.LENGTH_LONG).show();
+                progress.dismiss();
+            }
+        });
+    }
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/SetLockActivity.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/SetLockActivity.java
new file mode 100644
index 0000000..661b06b
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/SetLockActivity.java
@@ -0,0 +1,92 @@
+package com.example.administrator.myapplication.ui;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.utils.SystemUtils;
+import com.example.administrator.myapplication.widget.patternlock.LockPatternView;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+
+/**
+ * Created by htq on 2016/8/12.
+ */
+public class SetLockActivity extends AppCompatActivity {
+
+    @BindView(R.id.tv_activity_set_lock_title)
+    TextView mTitleTv;
+
+    @BindView(R.id.lockView)
+    LockPatternView mLockPatternView;
+
+    @BindView(R.id.btn_password_clear)
+    Button mClearBtn;
+
+    private String mPassword;
+    private boolean isFirst = true;
+
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.activity_set_lock);
+        ButterKnife.bind(this);
+        setTitle("åº”ç”¨åŠ é”�");
+
+        initUI();
+    }
+
+    private void initUI()
+    {
+        mLockPatternView.setActivityContext(SetLockActivity.this);
+        mLockPatternView.setLockListener(new LockPatternView.OnLockListener() {
+            @Override
+            public void getStringPassword(String password) {
+                if (isFirst) {
+                    mPassword = password;
+                    mTitleTv.setText("å†�æ¬¡è¾“å…¥æ‰‹åŠ¿å¯†ç �");
+                    isFirst = false;
+                    mClearBtn.setVisibility(View.VISIBLE);
+                } else {
+                    if (password.equals(mPassword)) {
+                        new SystemUtils(SetLockActivity.this).set("password",password);
+                        new SystemUtils(SetLockActivity.this).setBoolean("isSetLock", true);
+                        startActivity(new Intent(SetLockActivity.this, MainActivity.class));
+                        SetLockActivity.this.finish();
+                    }else {
+                        isFirst =true;
+                        Snackbar.make( mTitleTv,"ä¸¤æ¬¡å¯†ç �ä¸�ä¸€è‡´ï¼Œè¯·é‡�æ–°è®¾ç½®", Snackbar.LENGTH_LONG).show();
+                        mPassword = "";
+
+                        mTitleTv.setText("è®¾ç½®æ‰‹åŠ¿å¯†ç �");
+                        mClearBtn.setVisibility(View.GONE);
+                    }
+                }
+            }
+
+            @Override
+            public boolean isPassword() {
+                return false;
+            }
+        });
+
+        mClearBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mPassword = "";
+                isFirst = true;
+                mClearBtn.setVisibility(View.GONE);
+            }
+        });
+    }
+//    private void initData()
+//    {
+//
+//    }
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/SettingFragment.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/SettingFragment.java
new file mode 100644
index 0000000..fe11c88
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/SettingFragment.java
@@ -0,0 +1,104 @@
+package com.example.administrator.myapplication.ui;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.utils.SystemUtils;
+import com.example.administrator.myapplication.widget.ToggleButton;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+
+/**
+ * Created by htq on 2016/8/12.
+ */
+public class SettingFragment extends Fragment {
+    @BindView(R.id.tb_lock)
+    ToggleButton mTbLock;
+    @BindView(R.id.tb_tran)
+    ToggleButton mTbTran;
+    @BindView(R.id.lin)
+    LinearLayout mLinL;
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        View view = inflater.inflate(R.layout.fragment_setting, container,
+                false);
+
+        ButterKnife.bind(this, view);
+        initView();
+        return view;
+    }
+
+    @Override
+    public void onStart() {
+        initData();
+        super.onStart();
+    }
+
+
+    private void initData() {
+
+        SystemUtils util=new SystemUtils(getActivity());
+        boolean isSetLock =util.getBoolean("isSetLock");
+        if(isSetLock)
+            mTbLock.setToggleOn();
+        else
+            mTbLock.setToggleOff();
+
+        boolean isTran =util.getBoolean("isTran");
+        if(isTran) {
+            mTbTran.setToggleOn();
+            mLinL.setAlpha(0.55f);
+        }
+        else {
+            mTbTran.setToggleOff();
+
+        }
+    }
+
+    private void initView()
+    {
+        mTbLock.setOnToggleChanged(new ToggleButton.OnToggleChanged() {
+            @Override
+            public void onToggle(boolean on) {
+               // AppContext.setLoadImage(on);
+                if(on) {
+
+                    Intent intent = new Intent(getActivity(), SetLockActivity.class);
+                    startActivity(intent);
+                }
+                else
+                {
+                    new SystemUtils(getActivity()).setBoolean("isSetLock", false);
+                }
+            }
+        });
+        mTbTran.setOnToggleChanged(new ToggleButton.OnToggleChanged() {
+            @Override
+            public void onToggle(boolean on) {
+                // AppContext.setLoadImage(on);
+                if(on) {
+
+                    new SystemUtils(getActivity()).setBoolean("isTran", true);
+                    mLinL.setAlpha(0.55f);
+                }
+                else
+                {
+                    new SystemUtils(getActivity()).setBoolean("isTran", false);
+                    mLinL.setAlpha(1);
+                }
+            }
+        });
+
+
+    }
+    
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/UnLockActivity.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/UnLockActivity.java
new file mode 100644
index 0000000..29ab2f7
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/UnLockActivity.java
@@ -0,0 +1,57 @@
+package com.example.administrator.myapplication.ui;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.widget.Toast;
+
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.utils.SystemUtils;
+import com.example.administrator.myapplication.widget.patternlock.LockPatternView;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+
+/**
+ * Created by htq on 2016/8/12.
+ */
+public class UnLockActivity extends AppCompatActivity {
+
+    @BindView(R.id.lockView)
+    LockPatternView mLockPatternView;
+
+    private String mPasswordStr;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_unlock);
+        ButterKnife.bind(this);
+        Toast.makeText(getApplicationContext(), "å¯†ç �æ­£ç¡®", Toast.LENGTH_SHORT).show();
+        mLockPatternView.setActivityContext(UnLockActivity.this);
+        mLockPatternView.setLockListener(new LockPatternView.OnLockListener() {
+            String password = new SystemUtils(UnLockActivity.this).getString("password");
+
+            @Override
+            public void getStringPassword(String password) {
+                mPasswordStr = password;
+            }
+
+            @Override
+            public boolean isPassword() {
+                if (mPasswordStr.equals(password)) {
+                    Snackbar.make(mLockPatternView, "å¯†ç �æ­£ç¡®",  Snackbar.LENGTH_SHORT).show();
+                    Intent intent = new Intent(UnLockActivity.this, MainActivity.class);
+                    startActivity(intent);
+                    UnLockActivity.this.finish();
+                    return true;
+                } else {
+                    Snackbar.make(mLockPatternView, "å¯†ç �ä¸�æ­£ç¡®",  Snackbar.LENGTH_SHORT).show();
+                }
+                return false;
+            }
+        });
+
+    }
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/UserInfoActivity.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/UserInfoActivity.java
new file mode 100644
index 0000000..acd117d
--- /dev/null
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/UserInfoActivity.java
@@ -0,0 +1,493 @@
+package com.example.administrator.myapplication.ui;
+
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Environment;
+import android.provider.MediaStore;
+import android.support.annotation.Nullable;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.util.DisplayMetrics;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.PopupWindow;
+import android.widget.RelativeLayout;
+
+import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.entity.UpdataEvent;
+import com.example.administrator.myapplication.entity.User;
+import com.example.administrator.myapplication.utils.AccountUtils;
+import com.example.administrator.myapplication.utils.BmobConstants;
+import com.example.administrator.myapplication.utils.PhotoUtil;
+import com.example.administrator.myapplication.utils.SPUtils;
+
+import org.greenrobot.eventbus.EventBus;
+
+import java.io.File;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import cn.bmob.v3.BmobUser;
+import cn.bmob.v3.datatype.BmobFile;
+import cn.bmob.v3.listener.UpdateListener;
+import cn.bmob.v3.listener.UploadFileListener;
+
+/**
+ * Created by htq on 2016/9/4.
+ */
+
+public class UserInfoActivity extends AppCompatActivity {
+
+    @BindView(R.id.mine_avatar)
+    ImageView headIcon;
+    @BindView(R.id.rl_nick)
+    RelativeLayout rlNick;
+    @BindView(R.id.rl_sex)
+    RelativeLayout rlSex;
+    @BindView(R.id.rl_email)
+    RelativeLayout rlEmail;
+    @BindView(R.id.rl_account)
+    RelativeLayout rlAccount;
+    @BindView(R.id.exit_btn)
+    Button exitBtn;
+    @BindView(R.id.img_back)
+    ImageButton imgBtnBack;
+
+    private String userSex = "";
+    private final int UPDATE_USER_DIARYPWD = 1, UPDATE_USER_EMAIL = 2, UPDATE_USER_NICKNAME = 3;
+    private PopupWindow mPopupWindow;
+    protected int mScreenWidth;
+    protected int mScreenHeight;
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+//        requestWindowFeature(Window.FEATURE_NO_TITLE);
+//        /*set it to be full screen*/
+//        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+//                WindowManager.LayoutParams.FLAG_FULLSCREEN);
+        setContentView(R.layout.activity_user_info);
+        ButterKnife.bind(this);
+
+        DisplayMetrics metric = new DisplayMetrics();
+        getWindowManager().getDefaultDisplay().getMetrics(metric);
+        mScreenWidth = metric.widthPixels;
+        mScreenHeight = metric.heightPixels;
+
+        User.initDefaultAvatar(this,headIcon);
+                //refreshAvatarFromLocal(BmobConstants.MyAvatarDir+"avatarIcon.png",headIcon);
+        //userManager = BmobUserManager.getInstance(this);
+    }
+
+    @OnClick(R.id.img_back)
+    public void back() {
+        finish();
+    }
+
+    @OnClick({R.id.mine_avatar, R.id.rl_nick, R.id.rl_sex, R.id.rl_email, R.id.rl_account, R.id.exit_btn})
+    public void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.mine_avatar:
+                showAvatarPop();
+                break;
+            case R.id.rl_nick:
+                AlertDialog nickNameDialog = buildeChangeInfoDialog(UPDATE_USER_NICKNAME);
+                nickNameDialog.show();
+                break;
+            case R.id.rl_sex:
+                changeUserSex();
+                break;
+            case R.id.rl_email:
+                AlertDialog emailDialog = buildeChangeInfoDialog(UPDATE_USER_EMAIL);
+                emailDialog.show();
+                break;
+            case R.id.rl_account:
+              //  login();
+                break;
+            case R.id.exit_btn:
+             //   goToRegisterActivity();
+                break;
+        }
+    }
+
+    private void changeUserSex() {
+        final String[] sexItems = {"ç”·", "å¥³"};
+
+        AlertDialog.Builder sexBuilder = new AlertDialog.Builder(UserInfoActivity.this)
+                .setTitle("é€‰æ‹©æ€§åˆ«")
+                .setSingleChoiceItems(sexItems, 1, new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        userSex = sexItems[which];
+                    }
+                });
+        sexBuilder.setPositiveButton("ç¡®å®š", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                //  mPresenter.upDateInfo(UserBiz.UPDATE_USER_SEX, userSex);
+            }
+        });
+        sexBuilder.create().show();
+    }
+
+    public AlertDialog buildeChangeInfoDialog(final int chageType) {
+        View layout;
+        final EditText et_pwd;
+        final EditText et_change;
+        ImageView icon;
+        String dialogTitle = "";
+        //è½½å…¥,åˆ�å§‹åŒ–è‡ªå®šä¹‰å¯¹è¯�æ¡†å¸ƒå±€
+        layout = getLayoutInflater().inflate(R.layout.change_info_dialog_layout, null);
+     //   et_pwd = (EditText) layout.findViewById(R.id.ed_pwd_confirm);
+        et_change = (EditText) layout.findViewById(R.id.ed_change_info);
+        icon = (ImageView) layout.findViewById(R.id.iv_change_info_icon);
+        switch (chageType) {
+            case UPDATE_USER_DIARYPWD:
+                dialogTitle = "ä¿®æ”¹æ—¥è®°å¯†ç �";
+                et_change.setHint("æ–°çš„æ—¥è®°å¯†ç �");
+                Drawable drawable1 = getDrawableByResource(R.drawable.diary_pwd);
+                icon.setImageDrawable(drawable1);
+                break;
+            case UPDATE_USER_EMAIL:
+                dialogTitle = "ä¿®æ”¹é‚®ç®±";
+                et_change.setHint("è®¾ç½®æ‚¨çš„é‚®ç®±");
+                Drawable drawable2 = getDrawableByResource(R.drawable.email);
+                icon.setImageDrawable(drawable2);
+                break;
+            case UPDATE_USER_NICKNAME:
+                dialogTitle = "ä¿®æ”¹æ˜µç§°";
+                et_change.setHint("è®¾ç½®æ‚¨çš„æ˜µç§°");
+                Drawable drawable3 = getDrawableByResource(R.drawable.nickname);
+                icon.setImageDrawable(drawable3);
+                break;
+        }
+
+        //è®¾ç½®å¯¹è¯�æ¡†
+        AlertDialog.Builder builder = new AlertDialog.Builder(this)
+                .setTitle(dialogTitle)
+                .setView(layout)
+                .setPositiveButton("ç¡®å®š", new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                     //   String pwd = et_pwd.getText().toString();
+//                        if (pwd.equals(AccountUtils.getUserPwd(UserInfoActivity.this))) {
+//                            //  upDateInfo(chageType, et_change.getText().toString());
+//                        } else {
+//                            Toast.makeText(UserInfoActivity.this, "å¯†ç �ä¸�æ­£ç¡®ï¼Œé‡�æ–°è¾“å…¥", Toast.LENGTH_LONG).show();
+//                        }
+                    }
+                });
+        //å¼¹å‡ºå¯¹è¯�æ¡†
+        return builder.create();
+    }
+
+    public Drawable getDrawableByResource(int id) {
+        return getResources().getDrawable(id);
+    }
+
+
+    RelativeLayout layout_choose;
+    RelativeLayout layout_photo;
+    PopupWindow avatorPop;
+
+    public String filePath = "";
+    private void showAvatarPop() {
+        View view = LayoutInflater.from(this).inflate(R.layout.pop_showavator,
+                null);
+        layout_choose = (RelativeLayout) view.findViewById(R.id.layout_choose);
+        layout_photo = (RelativeLayout) view.findViewById(R.id.layout_photo);
+        layout_photo.setOnClickListener(new View.OnClickListener() {
+
+            @Override
+            public void onClick(View arg0) {
+
+                // TODO Auto-generated method stub
+                layout_choose.setBackgroundColor(getResources().getColor(
+                        R.color.base_color_text_white));
+                layout_photo.setBackgroundDrawable(getResources().getDrawable(
+                        R.drawable.pop_bg_press));
+                File dir = new File(BmobConstants.MyAvatarDir);
+                if (!dir.exists()) {
+                    dir.mkdirs();
+                }
+                // åŽŸå›¾
+                File file = new File(dir, new SimpleDateFormat("yyMMddHHmmss")
+                        .format(new Date()));
+                filePath = file.getAbsolutePath();// èŽ·å�–ç›¸ç‰‡çš„ä¿�å­˜è·¯å¾„
+                Uri imageUri = Uri.fromFile(file);
+
+                Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
+                intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
+                startActivityForResult(intent,
+                        BmobConstants.REQUESTCODE_UPLOADAVATAR_CAMERA);
+            }
+        });
+        layout_choose.setOnClickListener(new View.OnClickListener() {
+
+            @Override
+            public void onClick(View arg0) {
+                // TODO Auto-generated method stub
+              //  ShowLog("ç‚¹å‡»ç›¸å†Œ");
+                layout_photo.setBackgroundColor(getResources().getColor(
+                        R.color.base_color_text_white));
+                layout_choose.setBackgroundDrawable(getResources().getDrawable(
+                        R.drawable.pop_bg_press));
+                Intent intent = new Intent(Intent.ACTION_PICK, null);
+                intent.setDataAndType(
+                        MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
+                startActivityForResult(intent,
+                        BmobConstants.REQUESTCODE_UPLOADAVATAR_LOCATION);
+            }
+        });
+
+        avatorPop = new PopupWindow(view, mScreenWidth, 600);
+        avatorPop.setTouchInterceptor(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View v, MotionEvent event) {
+                if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
+                    avatorPop.dismiss();
+                    return true;
+                }
+                return false;
+            }
+        });
+
+        avatorPop.setWidth(WindowManager.LayoutParams.MATCH_PARENT);
+        avatorPop.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
+        avatorPop.setTouchable(true);
+        avatorPop.setFocusable(true);
+        avatorPop.setOutsideTouchable(true);
+        avatorPop.setBackgroundDrawable(new BitmapDrawable());
+        // åŠ¨ç”»æ•ˆæžœ ä»Žåº•éƒ¨å¼¹èµ·
+        avatorPop.setAnimationStyle(R.style.Animations_GrowFromBottom);
+        avatorPop.showAtLocation(exitBtn, Gravity.BOTTOM, 0, 0);
+    }
+
+
+    /**
+     * @Title: startImageAction
+     * @return void
+     * @throws
+     */
+    private void startImageAction(Uri uri, int outputX, int outputY,
+                                  int requestCode, boolean isCrop) {
+        Intent intent = null;
+        if (isCrop) {
+            intent = new Intent("com.android.camera.action.CROP");
+        } else {
+            intent = new Intent(Intent.ACTION_GET_CONTENT, null);
+        }
+        intent.setDataAndType(uri, "image/*");
+       // intent.putExtra("output", Uri.fromFile(new File(BaseApplication.avatarPath)));
+        intent.putExtra("crop", "true");
+        intent.putExtra("aspectX", 1);
+        intent.putExtra("aspectY", 1);
+        intent.putExtra("outputX", outputX);
+        intent.putExtra("outputY", outputY);
+        intent.putExtra("scale", true);
+      //  intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);//ç›´æŽ¥è¾“å‡ºæ–‡ä»¶
+        intent.putExtra("return-data", true);
+        intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString());
+        intent.putExtra("noFaceDetection", true); // no face detection
+        startActivityForResult(intent, requestCode);
+    }
+
+    Bitmap newBitmap;
+    boolean isFromCamera = false;// åŒºåˆ†æ‹�ç…§æ—‹è½¬
+    int degree = 0;
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        // TODO Auto-generated method stub
+        super.onActivityResult(requestCode, resultCode, data);
+        switch (requestCode) {
+            case BmobConstants.REQUESTCODE_UPLOADAVATAR_CAMERA:// æ‹�ç…§ä¿®æ”¹å¤´åƒ�
+                if (resultCode == RESULT_OK) {
+                    if (!Environment.getExternalStorageState().equals(
+                            Environment.MEDIA_MOUNTED)) {
+                        Snackbar.make(exitBtn,"SDå�¡ä¸�å�¯ç”¨", Snackbar.LENGTH_LONG).show();
+                        return;
+                    }
+                    isFromCamera = true;
+                    File file = new File(filePath);
+                    degree = PhotoUtil.readPictureDegree(file.getAbsolutePath());
+                //    Log.i("life", "æ‹�ç…§å�Žçš„è§’åº¦ï¼š" + degree);
+                    startImageAction(Uri.fromFile(file), 200, 200,
+                            BmobConstants.REQUESTCODE_UPLOADAVATAR_CROP, true);
+                }
+                break;
+            case BmobConstants.REQUESTCODE_UPLOADAVATAR_LOCATION:// æœ¬åœ°ä¿®æ”¹å¤´åƒ�
+                if (avatorPop != null) {
+                    avatorPop.dismiss();
+                }
+                Uri uri = null;
+                if (data == null) {
+                    return;
+                }
+                if (resultCode == RESULT_OK) {
+                    if (!Environment.getExternalStorageState().equals(
+                            Environment.MEDIA_MOUNTED)) {
+                        Snackbar.make(exitBtn,"SDå�¡ä¸�å�¯ç”¨", Snackbar.LENGTH_LONG).show();
+                        return;
+                    }
+                    isFromCamera = false;
+                    uri = data.getData();
+                    startImageAction(uri, 200, 200,
+                            BmobConstants.REQUESTCODE_UPLOADAVATAR_CROP, true);
+                } else {
+                    Snackbar.make(exitBtn,"ç…§ç‰‡èŽ·å�–å¤±è´¥", Snackbar.LENGTH_LONG).show();
+
+                }
+
+                break;
+            case BmobConstants.REQUESTCODE_UPLOADAVATAR_CROP:// è£�å‰ªå¤´åƒ�è¿”å›ž
+                // TODO sent to crop
+                if (avatorPop != null) {
+                    avatorPop.dismiss();
+                }
+                if (data == null) {
+                    // Toast.makeText(this, , Toast.LENGTH_SHORT).show();
+                    Snackbar.make(exitBtn,"å�–æ¶ˆé€‰æ‹©", Snackbar.LENGTH_LONG).show();
+                    return;
+                } else {
+                    saveCropAvator(data);
+                    SPUtils.put(this,"isSetAvatar",true);
+
+                }
+
+                // åˆ�å§‹åŒ–æ–‡ä»¶è·¯å¾„
+                filePath = "";
+                // ä¸Šä¼ å¤´åƒ�
+                uploadAvatar();
+
+                break;
+            default:
+                break;
+
+        }
+    }
+
+    private void uploadAvatar() {
+        //BmobLog.i("å¤´åƒ�åœ°å�€ï¼š" + path);
+        final BmobFile bmobFile = new BmobFile(new File(path));
+        bmobFile.upload(this, new UploadFileListener() {
+
+            @Override
+            public void onSuccess() {
+                // TODO Auto-generated method stub
+                String url = bmobFile.getFileUrl(UserInfoActivity.this);
+                updateUserAvatar(url);
+                AccountUtils.saveUserHeadUrl(UserInfoActivity.this,url);
+                toUpdateUserInfo(url);
+            }
+
+            @Override
+            public void onProgress(Integer arg0) {
+                // TODO Auto-generated method stub
+
+            }
+
+
+            @Override
+            public void onFailure(int arg0, String msg) {
+                // TODO Auto-generated method stub
+                Snackbar.make(exitBtn,"å¤´åƒ�ä¸Šä¼ å¤±è´¥ï¼š" + msg+ String.valueOf(arg0), Snackbar.LENGTH_LONG).show();
+              //  ShowToast("å¤´åƒ�ä¸Šä¼ å¤±è´¥ï¼š" + msg+String.valueOf(arg0));
+            }
+        });
+    }
+
+    private void updateUserAvatar(final String url) {
+        User  u =new User();
+        u.setUserHeadUrl(url);
+        updateUserData(u,new UpdateListener() {
+            @Override
+            public void onSuccess() {
+                // TODO Auto-generated method stub
+                Snackbar.make(exitBtn,"å¤´åƒ�æ›´æ–°æˆ�åŠŸï¼�", Snackbar.LENGTH_SHORT).show();
+                //ShowToast();
+                // æ›´æ–°å¤´åƒ�
+                User.refreshAvatarFromServe(url,headIcon);
+            }
+
+            @Override
+            public void onFailure(int code, String msg) {
+                // TODO Auto-generated method stub
+                Snackbar.make(exitBtn,"å¤´åƒ�æ›´æ–°å¤±è´¥ï¼š" + msg+ String.valueOf(code), Snackbar.LENGTH_SHORT).show();
+                //ShowToast();
+            }
+        });
+    }
+
+
+
+    private void updateUserData(User user,UpdateListener listener){
+        BmobUser current = user.getCurrentUser(UserInfoActivity.this);
+        user.setObjectId(current.getObjectId());
+        user.update(this, listener);
+    }
+
+    String path;
+    String avatarFile="avatarIcon.png";
+    /**
+     * ä¿�å­˜è£�å‰ªçš„å¤´åƒ�
+     *
+     * @param data
+     */
+    private void saveCropAvator(Intent data) {
+        Bundle extras = data.getExtras();
+        if (extras != null) {
+            Bitmap bitmap = extras.getParcelable("data");
+        //    Log.i("life", "avatar - bitmap = " + bitmap);
+            if (bitmap != null) {
+                bitmap = PhotoUtil.toRoundCorner(bitmap, 10);
+                if (isFromCamera && degree != 0) {
+                    bitmap = PhotoUtil.rotaingImageView(degree, bitmap);
+                }
+                headIcon.setImageBitmap(bitmap);
+
+                // ä¿�å­˜å›¾ç‰‡
+                String filename = new SimpleDateFormat("yyMMddHHmmss")
+                        .format(new Date())+".png";
+                path = BmobConstants.MyAvatarDir + avatarFile;//filename;
+
+//                PhotoUtil.saveBitmap(BmobConstants.MyAvatarDir, filename,
+//                        bitmap, true);
+                PhotoUtil.saveBitmap(BmobConstants.MyAvatarDir, avatarFile,
+                        bitmap, true);
+                // ä¸Šä¼ å¤´åƒ�
+                if (bitmap != null && bitmap.isRecycled()) {
+                    bitmap.recycle();
+                }
+            }
+        }
+    }
+
+    /**
+     * åˆ·æ–°å…¶ä»–ç•Œé�¢çš„å¤´åƒ�
+     */
+    public void toUpdateUserInfo(String url) {
+        UpdataEvent event = new UpdataEvent();
+        event.setType(UpdataEvent.UPDATE_USER_INFOS);
+       // event.setString(BmobConstants.MyAvatarDir+avatarFile);
+        event.setString(url);
+        EventBus.getDefault().post(event);
+    }
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/WelcomeActivity.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/WelcomeActivity.java
index 984ee8f..a2f09cf 100644
--- a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/WelcomeActivity.java
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/WelcomeActivity.java
@@ -9,7 +9,16 @@ import android.view.WindowManager;
 import android.widget.Toast;
 
 import com.example.administrator.myapplication.R;
+import com.example.administrator.myapplication.entity.User;
+import com.example.administrator.myapplication.utils.SPUtils;
+import com.example.administrator.myapplication.utils.SystemUtils;
 
+import cn.bmob.v3.listener.SaveListener;
+
+
+/**
+ * Created by htq on 2016/8/12.
+ */
 public class WelcomeActivity extends AppCompatActivity {
     private boolean isSetLock;
 
@@ -19,14 +28,14 @@ public class WelcomeActivity extends AppCompatActivity {
         /*set it to be no title*/
         requestWindowFeature(Window.FEATURE_NO_TITLE);
         /*set it to be full screen*/
-        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
-                WindowManager.LayoutParams.FLAG_FULLSCREEN);
+         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+               WindowManager.LayoutParams.FLAG_FULLSCREEN);
         setContentView(R.layout.activity_welcome);
         //åˆ�å§‹åŒ–bmob
-        //        String libName = "bmob";
-        //        System.loadLibrary(libName );
+//        String libName = "bmob";
+//        System.loadLibrary(libName );
 
-        isSetLock = new com.htq.baidu.coolnote.utils.SystemUtils(WelcomeActivity.this).getBoolean("isSetLock");
+        isSetLock = new SystemUtils(WelcomeActivity.this).getBoolean("isSetLock");
         new Handler().postDelayed(new Runnable() {
             @Override
             public void run() {
@@ -47,33 +56,33 @@ public class WelcomeActivity extends AppCompatActivity {
     }
     private void autoLogin()
     {
-        if(com.htq.baidu.coolnote.utils.SPUtils.contains(this,"user_name"))
-        {
-            String name=(String) com.htq.baidu.coolnote.utils.SPUtils.get(this,"user_name","");
-            String pwd=(String) com.htq.baidu.coolnote.utils.SPUtils.get(this,"pwd","");
-            User user = new User();
-            user.setUsername(name);
-            user.setPassword(pwd);
-            user.login(this, new SaveListener() {
-                @Override
-                public void onSuccess() {
-                    //  Snackbar.make(loginBtn,"ç™»å½•æˆ�åŠŸï¼�",Snackbar.LENGTH_SHORT).show();
-                    goToHomeActivity();
+            if(SPUtils.contains(this,"user_name"))
+            {
+                String name=(String)SPUtils.get(this,"user_name","");
+                String pwd=(String)SPUtils.get(this,"pwd","");
+                User user = new User();
+                user.setUsername(name);
+                user.setPassword(pwd);
+                user.login(this, new SaveListener() {
+                    @Override
+                    public void onSuccess() {
+                      //  Snackbar.make(loginBtn,"ç™»å½•æˆ�åŠŸï¼�",Snackbar.LENGTH_SHORT).show();
+                        goToHomeActivity();
 
-                }
+                    }
 
-                @Override
-                public void onFailure(int code, String msg) {
-                    //Snackbar.make(loginBtn,"ç™»å½•å¤±è´¥ï¼�",Snackbar.LENGTH_SHORT).show();
-                    Toast.makeText(WelcomeActivity.this,msg, Toast.LENGTH_SHORT).show();
-                    goToLoginActivity();//è‡ªåŠ¨ç™»é™†å¤±è´¥ï¼Œç”¨æˆ·æ‰‹åŠ¨ç™»é™†
-                }
-            });
-        }
+                    @Override
+                    public void onFailure(int code, String msg) {
+                        //Snackbar.make(loginBtn,"ç™»å½•å¤±è´¥ï¼�",Snackbar.LENGTH_SHORT).show();
+                        Toast.makeText(WelcomeActivity.this,msg, Toast.LENGTH_SHORT).show();
+                        goToLoginActivity();//è‡ªåŠ¨ç™»é™†å¤±è´¥ï¼Œç”¨æˆ·æ‰‹åŠ¨ç™»é™†
+                    }
+                });
+            }
         else
-        {
-            goToLoginActivity();
-        }
+            {
+                goToLoginActivity();
+            }
     }
     private void goToHomeActivity()
     {
@@ -89,4 +98,4 @@ public class WelcomeActivity extends AppCompatActivity {
         WelcomeActivity.this.finish();
 
     }
-}
\ No newline at end of file
+}
diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/utils/CommonUtils.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/utils/CommonUtils.java
index 02b1101..695fe45 100644
--- a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/utils/CommonUtils.java
+++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/utils/CommonUtils.java
@@ -1,4 +1,4 @@
-package com.htq.baidu.coolnote.utils;
+package com.example.administrator.myapplication.utils;
 
 import android.content.Context;
 import android.net.ConnectivityManager;
diff --git a/src/MyApplication/app/src/main/res/layout/about_me_fragment.xml b/src/MyApplication/app/src/main/res/layout/about_me_fragment.xml
index 74b93e9..33b03fb 100644
--- a/src/MyApplication/app/src/main/res/layout/about_me_fragment.xml
+++ b/src/MyApplication/app/src/main/res/layout/about_me_fragment.xml
@@ -15,7 +15,7 @@
         android:textSize="20sp"
         android:text="@string/app_name" />
 
-    <com.htq.baidu.coolnote.widget.CircleImageView
+    <com.example.administrator.myapplication.widget.CircleImageView
         android:id="@+id/imageView1"
         android:layout_width="100dp"
         android:layout_height="100dp"
@@ -51,7 +51,7 @@
     android:layout_below="@+id/textView2" 
     android:layout_marginTop="10dp">
 
-   <com.htq.baidu.coolnote.widget.CircleImageView
+   <com.example.administrator.myapplication.widget.CircleImageView
         android:id="@+id/imageView2"
         android:layout_width="125dp"
         android:layout_height="125dp"
diff --git a/src/MyApplication/app/src/main/res/layout/activity_login.xml b/src/MyApplication/app/src/main/res/layout/activity_login.xml
index c6973b6..fc1bb57 100644
--- a/src/MyApplication/app/src/main/res/layout/activity_login.xml
+++ b/src/MyApplication/app/src/main/res/layout/activity_login.xml
@@ -1,83 +1,98 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:gravity="center_horizontal"
-    android:orientation="vertical"
-    android:paddingBottom="@dimen/activity_vertical_margin"
-    android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    tools:context="com.example.administrator.myapplication.ui.LoginActivity">
+    android:background="@drawable/login_bg" >
 
-    <!-- Login progress -->
-    <ProgressBar
-        android:id="@+id/login_progress"
-        style="?android:attr/progressBarStyleLarge"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="8dp"
-        android:visibility="gone" />
-
-    <ScrollView
-        android:id="@+id/login_form"
+    <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:orientation="vertical" >
+
+        <com.example.administrator.myapplication.widget.CircleImageView
+            android:id="@+id/iv_icon"
+            android:layout_width="80dp"
+            android:layout_height="80dp"
+            android:layout_marginBottom="30dp"
+            android:src="@mipmap/app_icon" />
 
         <LinearLayout
-            android:id="@+id/email_login_form"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:orientation="vertical">
+            android:layout_margin="10dp"
+            android:background="@drawable/input_bg"
+            android:orientation="vertical" >
 
-            <android.support.design.widget.TextInputLayout
+            <EditText
+                android:id="@+id/login_name"
+                android:layout_width="fill_parent"
+                android:layout_height="@dimen/base_action_bar_height"
+                android:background="@color/transparent"
+                android:drawableLeft="@drawable/login_icon_account"
+                android:drawablePadding="25dip"
+                android:hint="@string/login_username_hint"
+                android:paddingLeft="15dip"
+                android:shadowDx="0.0"
+                android:shadowDy="1.0"
+                android:shadowRadius="1.0"
+                android:textColorHint="#ffdddddd" />
+
+            <View
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content">
+                android:layout_height="0.5dp"
+                android:background="@drawable/base_horization_line" />
 
-                <AutoCompleteTextView
-                    android:id="@+id/account"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:hint="ç”µå­�é‚®ç®±/ç”µè¯�å�·ç �"
-                    android:maxLines="1"
-                    android:singleLine="true" />
-
-            </android.support.design.widget.TextInputLayout>
-
-            <android.support.design.widget.TextInputLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content">
-
-                <EditText
-                    android:id="@+id/password"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:hint="å¯†ç �"
-                    android:imeActionId="@+id/login"
-                    android:imeOptions="actionUnspecified"
-                    android:inputType="textPassword"
-                    android:maxLines="1"
-                    android:singleLine="true" />
-
-            </android.support.design.widget.TextInputLayout>
-
-            <Button
-                android:id="@+id/log_in_button"
-                style="?android:textAppearanceSmall"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="16dp"
-                android:text="ç™»å½•"
-                android:textStyle="bold" />
-
-            <Button
-                android:id="@+id/sign_in_button"
-                style="?android:textAppearanceSmall"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="16dp"
-                android:text="æ–°ç”¨æˆ·è¯·æ³¨å†Œ"
-                android:textStyle="bold" />
+            <EditText
+                android:id="@+id/login_pwd"
+                android:layout_width="fill_parent"
+                android:layout_height="@dimen/base_action_bar_height"
+                android:background="@color/transparent"
+                android:drawableLeft="@drawable/login_icon_password"
+                android:drawablePadding="25dip"
+                android:hint="@string/login_password_hint"
+                android:inputType="textPassword"
+                android:paddingLeft="15dip"
+                android:textColorHint="#ffdddddd" />
         </LinearLayout>
-    </ScrollView>
-</LinearLayout>
+
+        <Button
+            android:id="@+id/btn_login"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/base_action_bar_height"
+            android:layout_margin="@dimen/activity_vertical_margin"
+            android:background="@drawable/btn_login_selector"
+            android:gravity="center"
+            android:text="@string/login"
+            android:textColor="@color/base_color_text_white"
+            android:textSize="@dimen/text_size_large" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="48dp"
+        android:layout_alignParentBottom="true"
+        android:layout_marginBottom="20dp"
+        android:gravity="center"
+        android:orientation="horizontal" >
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="fill_parent"
+            android:gravity="center_vertical"
+            android:text="@string/register_txt1"
+            android:textColor="@color/base_color_text_gray"
+            android:textSize="20sp" />
+
+        <TextView
+            android:id="@+id/btn_register"
+            android:layout_width="wrap_content"
+            android:layout_height="fill_parent"
+            android:layout_marginLeft="5dp"
+            android:gravity="center_vertical"
+            android:text="@string/register_txt2"
+            android:textColor="@color/color_theme"
+            android:textSize="20sp" />
+    </LinearLayout>
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/src/MyApplication/app/src/main/res/layout/activity_user_info.xml b/src/MyApplication/app/src/main/res/layout/activity_user_info.xml
index 22a892e..6e26c13 100644
--- a/src/MyApplication/app/src/main/res/layout/activity_user_info.xml
+++ b/src/MyApplication/app/src/main/res/layout/activity_user_info.xml
@@ -45,7 +45,7 @@
         android:layout_height="75dp"
         >
 
-        <com.htq.baidu.coolnote.widget.CircleImageView
+        <com.example.administrator.myapplication.widget.CircleImageView
             android:id="@+id/mine_avatar"
             android:layout_width="80dp"
             android:layout_height="80dp"
diff --git a/src/MyApplication/app/src/main/res/layout/activity_welcome.xml b/src/MyApplication/app/src/main/res/layout/activity_welcome.xml
index 2a1b49b..12668e0 100644
--- a/src/MyApplication/app/src/main/res/layout/activity_welcome.xml
+++ b/src/MyApplication/app/src/main/res/layout/activity_welcome.xml
@@ -1,38 +1,50 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                xmlns:tools="http://schemas.android.com/tools"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:background="@mipmap/welc_bg" >
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@mipmap/welc_bg" >
     <com.example.administrator.myapplication.widget.CircleImageView
-        android:id="@+id/soucang_icon"
+        android:id="@+id/beauty_note_icon"
         android:layout_width="100dp"
         android:layout_height="100dp"
-        android:layout_marginTop="60dp"
-        android:layout_centerHorizontal="true"
+        android:layout_marginTop="77dp"
         android:src="@mipmap/app_icon"
         android:contentDescription="@string/app_name"
-        android:scaleType="centerCrop"/>
+        android:scaleType="centerCrop"
+        android:layout_alignParentTop="true"
+        android:layout_centerHorizontal="true"/>
 
     <TextView
-        android:id="@+id/sou"
+        android:id="@+id/beauty"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:textSize="20sp"
         android:layout_centerHorizontal="true"
-        android:layout_below="@id/soucang_icon"
+        android:layout_below="@id/beauty_note_icon"
         android:layout_marginTop="20dp"
         android:textColor="#fff"
         android:text="@string/app_name"/>
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="50dp"
         android:textSize="20sp"
-        android:layout_centerHorizontal="true"
-        android:layout_below="@id/sou"
         android:textColor="#fff"
-        android:text="å—–å¾—ä¸€ä¸‹ï¼Œè®©æ”¶è—�å�˜å¾—æ›´ç®€å�•"
+        android:text="@string/slogan"
         android:gravity="center"
-        />
+        android:id="@+id/textView4"
+        android:layout_above="@+id/textView5"
+        android:layout_centerHorizontal="true"
+        android:layout_marginBottom="87dp"/>
 
+
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_centerHorizontal="true"
+        android:textSize="14sp"
+        android:textColor="#000"
+        android:text="@string/author"
+        android:id="@+id/textView5"/>
 </RelativeLayout>
diff --git a/src/MyApplication/app/src/main/res/layout/app_bar_main.xml b/src/MyApplication/app/src/main/res/layout/app_bar_main.xml
index e786d97..6feda2e 100644
--- a/src/MyApplication/app/src/main/res/layout/app_bar_main.xml
+++ b/src/MyApplication/app/src/main/res/layout/app_bar_main.xml
@@ -5,7 +5,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:fitsSystemWindows="true"
-    tools:context="com.htq.baidu.coolnote.ui.MainActivity">
+    tools:context="com.example.administrator.myapplication.ui.MainActivity">
 
     <android.support.design.widget.AppBarLayout
         android:layout_width="match_parent"
diff --git a/src/MyApplication/app/src/main/res/layout/fragment_note.xml b/src/MyApplication/app/src/main/res/layout/fragment_note.xml
index 6812f1d..89e13b9 100644
--- a/src/MyApplication/app/src/main/res/layout/fragment_note.xml
+++ b/src/MyApplication/app/src/main/res/layout/fragment_note.xml
@@ -14,7 +14,7 @@
         android:layout_height="fill_parent"
         android:visibility="visible" >
 
-       <com.htq.baidu.coolnote.widget.HTQDragGridView
+       <com.example.administrator.myapplication.widget.HTQDragGridView
             android:id="@+id/frag_note_list"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
diff --git a/src/MyApplication/app/src/main/res/layout/fragment_setting.xml b/src/MyApplication/app/src/main/res/layout/fragment_setting.xml
index e79b578..623ebff 100644
--- a/src/MyApplication/app/src/main/res/layout/fragment_setting.xml
+++ b/src/MyApplication/app/src/main/res/layout/fragment_setting.xml
@@ -14,7 +14,7 @@
             android:textColor="#000"
             android:textSize="16sp" />
 
-        <com.htq.baidu.coolnote.widget.ToggleButton
+        <com.example.administrator.myapplication.widget.ToggleButton
             android:id="@+id/tb_lock"
             style="@style/option_item_toggleButton"
             android:layout_alignParentRight="true" />
@@ -34,7 +34,7 @@
             android:textColor="#000"
             android:textSize="16sp" />
 
-        <com.htq.baidu.coolnote.widget.ToggleButton
+        <com.example.administrator.myapplication.widget.ToggleButton
             android:id="@+id/tb_tran"
             style="@style/option_item_toggleButton"
             android:layout_alignParentRight="true" />
diff --git a/src/MyApplication/app/src/main/res/layout/layout_note_detail_menu.xml b/src/MyApplication/app/src/main/res/layout/layout_note_detail_menu.xml
index 511e4bf..872826b 100644
--- a/src/MyApplication/app/src/main/res/layout/layout_note_detail_menu.xml
+++ b/src/MyApplication/app/src/main/res/layout/layout_note_detail_menu.xml
@@ -19,7 +19,7 @@
         android:visibility="invisible"
        />
     <!-- android:visibility="invisible" -->
-    <com.htq.baidu.coolnote.widget.NoteItemCircleView
+    <com.example.administrator.myapplication.widget.NoteItemCircleView
         android:id="@+id/note_detail_img_green"
         style="@style/note_detail_menu_item"
         android:layout_alignLeft="@+id/note_detail_img_menu"
@@ -30,7 +30,7 @@
         app:border_width="2dip"
      />
 <!-- android:src="#ffcef3d4"-->
-    <com.htq.baidu.coolnote.widget.NoteItemCircleView
+    <com.example.administrator.myapplication.widget.NoteItemCircleView
         android:id="@+id/note_detail_img_blue"
         style="@style/note_detail_menu_item"
         android:layout_alignLeft="@+id/note_detail_img_menu"
diff --git a/src/MyApplication/app/src/main/res/layout/nav_header_main.xml b/src/MyApplication/app/src/main/res/layout/nav_header_main.xml
index 2011d10..ff6dd9a 100644
--- a/src/MyApplication/app/src/main/res/layout/nav_header_main.xml
+++ b/src/MyApplication/app/src/main/res/layout/nav_header_main.xml
@@ -11,7 +11,7 @@
     android:paddingTop="@dimen/activity_vertical_margin"
     android:theme="@style/ThemeOverlay.AppCompat.Dark">
 
-    <com.htq.baidu.coolnote.widget.CircleImageView
+    <com.example.administrator.myapplication.widget.CircleImageView
         android:id="@+id/imageView"
         android:layout_width="110dp"
         android:layout_height="110dp"
diff --git a/src/MyApplication/app/src/main/res/layout/note_edit_fraglayout.xml b/src/MyApplication/app/src/main/res/layout/note_edit_fraglayout.xml
new file mode 100644
index 0000000..33b162a
--- /dev/null
+++ b/src/MyApplication/app/src/main/res/layout/note_edit_fraglayout.xml
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:fab="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:paddingBottom="2dp"
+    android:paddingLeft="2dp"
+    android:paddingRight="2dp" >
+
+    <EditText
+        android:id="@+id/note_detail_edit"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginTop="50dp"
+        android:gravity="top"
+        android:hint="@null"
+        android:singleLine="false"
+        android:textColor="#333" />
+
+    <include
+        android:id="@+id/note_detail_menu"
+        layout="@layout/layout_note_detail_menu" />
+
+    <RelativeLayout
+        android:id="@+id/note_detail_titlebar"
+        android:layout_width="match_parent"
+        android:layout_height="35dp"
+        android:layout_marginTop="15dp"
+        android:paddingLeft="15dp"
+        android:paddingRight="15dp" >
+
+        <TextView
+            android:id="@+id/note_detail_tv_date"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_alignParentLeft="true"
+            android:layout_centerVertical="true"
+            android:gravity="center"
+            android:textColor="#666" />
+
+        <ImageView
+            android:id="@+id/note_detail_img_button"
+            style="@style/note_detail_menu"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:contentDescription="@null"
+            android:src="@drawable/icon_color" />
+    </RelativeLayout>
+
+    <ImageView
+        android:id="@+id/note_detail_img_thumbtack"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignBottom="@+id/note_detail_titlebar"
+        android:layout_centerHorizontal="true"
+        android:contentDescription="@null"
+        android:paddingBottom="5dp" />
+
+    <com.github.clans.fab.FloatingActionMenu
+        android:id="@+id/floating_action_menu"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentRight="true"
+        android:paddingLeft="10dp"
+        fab:menu_labels_ellipsize="end"
+        fab:menu_labels_singleLine="true"
+        fab:menu_backgroundColor="@color/transparent"
+       ><!--   fab:menu_icon="@drawable/actionbar_icon_add" #ccffffff-->
+        <com.github.clans.fab.FloatingActionButton
+            android:id="@+id/menu_item_text_font"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@drawable/menu_font_size"
+            fab:fab_size="mini"
+            fab:fab_label="å­—ä½“å¤§å°�" />
+        <com.github.clans.fab.FloatingActionButton
+            android:id="@+id/menu_item_clock"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@drawable/menu_alert"
+            fab:fab_size="mini"
+            fab:fab_label="è®¾ç½®é—¹é’Ÿ" />
+        <com.github.clans.fab.FloatingActionButton
+            android:id="@+id/menu_item_desktop"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@drawable/menu_to_desktop"
+            fab:fab_size="mini"
+            fab:fab_label="æ·»åŠ åˆ°æ¡Œé�¢" />
+        <com.github.clans.fab.FloatingActionButton
+            android:id="@+id/menu_item_share"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@drawable/menu_share"
+            fab:fab_size="mini"
+            fab:fab_label="åˆ†äº«è®°å½•" />
+
+    </com.github.clans.fab.FloatingActionMenu>
+    <LinearLayout
+        android:id="@+id/font_size_selector"
+        android:layout_width="fill_parent"
+        android:layout_height="115dp"
+        android:layout_alignParentBottom="true"
+        android:background="@drawable/font_size_selector_bg"
+        android:visibility="gone"
+       >
+        <!--android:layout_gravity="bottom"-->
+        <FrameLayout
+            android:id="@+id/ll_font_small"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1">
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:gravity="center"
+                android:orientation="vertical">
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginBottom="5dip"
+                    android:src="@drawable/font_small" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/font_small"
+                    android:textAppearance="@style/TextAppearanceUnderMenuIcon" />
+            </LinearLayout>
+
+            <ImageView
+                android:id="@+id/iv_small_select"
+                android:layout_width="25dp"
+                android:layout_height="25dp"
+                android:layout_gravity="bottom|right"
+                android:layout_marginBottom="-7dip"
+                android:layout_marginRight="7dip"
+                android:focusable="false"
+                android:src="@drawable/selected"
+                android:visibility="gone"  />
+        </FrameLayout>
+<!--  -->
+        <FrameLayout
+            android:id="@+id/ll_font_normal"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1">
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:gravity="center"
+                android:orientation="vertical">
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginBottom="5dip"
+                    android:src="@drawable/font_normal" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/font_normal"
+                    android:textAppearance="@style/TextAppearanceUnderMenuIcon" />
+            </LinearLayout>
+
+            <ImageView
+                android:id="@+id/iv_medium_select"
+                android:layout_width="25dp"
+                android:layout_height="25dp"
+                android:layout_gravity="bottom|right"
+                android:layout_marginBottom="-7dip"
+                android:layout_marginRight="7dip"
+                android:focusable="false"
+                android:src="@drawable/selected"
+                android:visibility="gone" />
+        </FrameLayout>
+
+        <FrameLayout
+            android:id="@+id/ll_font_large"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1">
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:gravity="center"
+                android:orientation="vertical">
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginBottom="5dip"
+                    android:src="@drawable/font_large" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/font_large"
+                    android:textAppearance="@style/TextAppearanceUnderMenuIcon" />
+            </LinearLayout>
+
+            <ImageView
+                android:id="@+id/iv_large_select"
+                android:layout_width="25dp"
+                android:layout_height="25dp"
+                android:layout_gravity="bottom|right"
+                android:layout_marginBottom="-7dip"
+                android:layout_marginRight="7dip"
+                android:focusable="false"
+                android:src="@drawable/selected"
+                android:visibility="gone" />
+        </FrameLayout>
+
+        <FrameLayout
+            android:id="@+id/ll_font_super"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1">
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:gravity="center"
+                android:orientation="vertical">
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginBottom="5dip"
+                    android:src="@drawable/font_super" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/font_super"
+                    android:textAppearance="@style/TextAppearanceUnderMenuIcon" />
+            </LinearLayout>
+
+            <ImageView
+                android:id="@+id/iv_super_select"
+                android:layout_width="25dp"
+                android:layout_height="25dp"
+                android:layout_gravity="bottom|right"
+                android:layout_marginBottom="-7dip"
+                android:layout_marginRight="7dip"
+                android:focusable="false"
+                android:src="@drawable/selected"
+                android:visibility="gone" />
+        </FrameLayout>
+    </LinearLayout>
+</RelativeLayout>
\ No newline at end of file
diff --git a/src/MyApplication/app/src/main/res/layout/widget_lock_view.xml b/src/MyApplication/app/src/main/res/layout/widget_lock_view.xml
index 41ba98d..2dbc698 100644
--- a/src/MyApplication/app/src/main/res/layout/widget_lock_view.xml
+++ b/src/MyApplication/app/src/main/res/layout/widget_lock_view.xml
@@ -2,7 +2,7 @@
 <merge
     xmlns:android="http://schemas.android.com/apk/res/android">
 
-    <com.htq.baidu.coolnote.widget.patternlock.LockPatternView
+    <com.example.administrator.myapplication.widget.patternlock.LockPatternView
         android:id="@+id/lockView"
         android:layout_width="400dp"
         android:layout_height="400dp"
diff --git a/src/MyApplication/app/src/main/res/values/strings.xml b/src/MyApplication/app/src/main/res/values/strings.xml
index da6aab9..ef71314 100644
--- a/src/MyApplication/app/src/main/res/values/strings.xml
+++ b/src/MyApplication/app/src/main/res/values/strings.xml
@@ -13,9 +13,9 @@
     <string name="about_me">ä½œè€…ï¼š@ï¼šCurry </string>
     <string name="setting">è®¾ç½®</string>
     <string name="home">ä¸»é¡µ</string>
-    <string name="author">å—–è—� @htq All rights reserved </string>
+    <string name="author">å—–è—� @Curry All rights reserved </string>
     <string name="jia_mi">åº”ç”¨åŠ å¯†</string>
-    <string name="slogan">æ¼‚äº®å¥½ç”¨çš„è®°äº‹æœ¬</string>
+    <string name="slogan">å—–å—–å—–,ä¸–ç•Œéƒ½æ˜¯ä½ çš„</string>
     <string name="exit">é€€å‡º</string>
     <string name="settran">åº”ç”¨é€�æ˜ŽèƒŒæ™¯</string>
     <string name="pop_photo">æ‹�ç…§</string>
@@ -32,7 +32,7 @@
     <string name="login_email_hint">è¯·å†�æ¬¡è¾“å…¥å¯†ç �</string>
     <string name="register_account">æ³¨å†Œè´¦å�·</string>
     <string name="user_info">ä¸ªäººèµ„æ–™</string>
-    <string name="my_blog">http://blog.csdn.net/htq__æ¬¢è¿Žå¤§å®¶è®¿é—®</string>
+    <string name="my_blog">æ¬¢è¿Žå¤§å®¶è®¿é—®1905563644</string>
     <string name="datetime_dialog_ok">è®¾ç½®</string>
     <string name="datetime_dialog_cancel">å�–æ¶ˆ</string>
     <string name="notealert_look">æŸ¥çœ‹è¯¦æƒ…</string>
diff --git a/src/MyApplication/build.gradle b/src/MyApplication/build.gradle
index 407a12f..6cd0d7a 100644
--- a/src/MyApplication/build.gradle
+++ b/src/MyApplication/build.gradle
@@ -15,7 +15,9 @@ buildscript {
 allprojects {
     repositories {
         jcenter()
+        maven { url "https://raw.github.com/bmob/bmob-android-sdk/master" }
     }
+
 }
 
 task clean(type: Delete) {
