diff --git a/src/AndroidManifest.xml b/src/AndroidManifest.xml
new file mode 100644
index 0000000..dc82d02
--- /dev/null
+++ b/src/AndroidManifest.xml
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/net/micode/notes/ui/Changepassword.java b/src/net/micode/notes/ui/Changepassword.java
new file mode 100644
index 0000000..3f344de
--- /dev/null
+++ b/src/net/micode/notes/ui/Changepassword.java
@@ -0,0 +1,78 @@
+package net.micode.notes.ui;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import net.micode.notes.R;
+
+public class Changepassword extends Activity{
+ EditText OldPassword;
+ EditText NewPassword;
+ EditText AckPassword;
+ Button Acknowledged;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState){
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_change_password);
+ getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
+ | WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
+ OldPassword=(EditText) findViewById(R.id.old_password);
+ NewPassword=(EditText) findViewById(R.id.new_password);
+ AckPassword=(EditText) findViewById(R.id.ack_password);
+ Acknowledged=(Button)findViewById(R.id.Acknowledged);
+ Acknowledged.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ String old_password = OldPassword.getText().toString();
+ String new_password = NewPassword.getText().toString();
+ String ack_password = AckPassword.getText().toString();
+ SharedPreferences pref = getSharedPreferences("user
+ management",MODE_PRIVATE);
+ String login_password = pref.getString("password","");
+ if(old_password.equals("")==true || new_password.equals("")==true
+ || ack_password.equals("")==true) {
+ Toast.makeText(ChangingPassword.this, "密码不能为空",
+ Toast.LENGTH_SHORT).show();
+ }
+ else if (new_password.equals(ack_password) == false) {
+ Toast.makeText(ChangingPassword.this, "新建密码与重复密码不匹配,
+ 请重新输入密码", Toast.LENGTH_SHORT).show();
+ AckPassword.setText("");
+ }
+ else if(old_password.equals(login_password) == false){
+ Toast.makeText(ChangingPassword.this, "原有密码错误,请重新输入
+ 密码", Toast.LENGTH_SHORT).show();
+ OldPassword.setText("");
+ }
+ else if (new_password.equals(ack_password) == true &&
+ old_password.equals(login_password) == true){
+ SharedPreferences.Editor editor=getSharedPreferences("user
+ management", MODE_PRIVATE).edit();
+ editor.putString("password",new_password);
+ editor.apply();
+ Toast.makeText(ChangingPassword.this, "修改密码成功",
+ Toast.LENGTH_SHORT).show();
+ Intent intent=new
+ Intent(ChangingPassword.this,NotesListActivity.class);
+ startActivity(intent);
+ finish();
+ }
+ }
+ });
+ }
+ @Override
+ public void onBackPressed(){
+ Intent intent=new Intent(ChangingPassword.this,NotesListActivity.class);
+ startActivity(intent);
+ finish();
+ }
+}
+
diff --git a/src/net/micode/notes/ui/ChangingPassword.java b/src/net/micode/notes/ui/ChangingPassword.java
new file mode 100644
index 0000000..54c869b
--- /dev/null
+++ b/src/net/micode/notes/ui/ChangingPassword.java
@@ -0,0 +1,71 @@
+package net.micode.notes.ui;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import net.micode.notes.R;
+
+public class ChangingPassword extends Activity{
+ EditText OldPassword;
+ EditText NewPassword;
+ EditText AckPassword;
+ Button Acknowledged;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState){
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_change_password);
+ getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
+ | WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
+ OldPassword=(EditText) findViewById(R.id.old_password);
+ NewPassword=(EditText) findViewById(R.id.new_password);
+ AckPassword=(EditText) findViewById(R.id.ack_password);
+ Acknowledged=(Button)findViewById(R.id.Acknowledged);
+ Acknowledged.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ String old_password = OldPassword.getText().toString();
+ String new_password = NewPassword.getText().toString();
+ String ack_password = AckPassword.getText().toString();
+ SharedPreferences pref = getSharedPreferences("user management",MODE_PRIVATE);
+ String login_password = pref.getString("password","");
+ if(old_password.equals("")==true || new_password.equals("")==true || ack_password.equals("")==true) {
+ Toast.makeText(ChangingPassword.this, "密码不能为空", Toast.LENGTH_SHORT).show();
+ }
+ else if (new_password.equals(ack_password) == false) {
+ Toast.makeText(ChangingPassword.this, "新建密码与重复密码不匹配,请重新输入密码", Toast.LENGTH_SHORT).show();
+ AckPassword.setText("");
+ }
+ else if(old_password.equals(login_password) == false){
+ Toast.makeText(ChangingPassword.this, "原有密码错误,请重新输入密码", Toast.LENGTH_SHORT).show();
+ OldPassword.setText("");
+ }
+ else if (new_password.equals(ack_password) == true &&
+ old_password.equals(login_password) == true){
+ SharedPreferences.Editor editor=getSharedPreferences("user management", MODE_PRIVATE).edit();
+ editor.putString("password",new_password);
+ editor.apply();
+ Toast.makeText(ChangingPassword.this, "修改密码成功",Toast.LENGTH_SHORT).show();
+ Intent intent=new
+ Intent(ChangingPassword.this,NotesListActivity.class);
+ startActivity(intent);
+ finish();
+ }
+ }
+ });
+ }
+ @Override
+ public void onBackPressed(){
+ Intent intent=new Intent(ChangingPassword.this,NotesListActivity.class);
+ startActivity(intent);
+ finish();
+ }
+}
+
diff --git a/src/net/micode/notes/ui/DeletingPassword.java b/src/net/micode/notes/ui/DeletingPassword.java
new file mode 100644
index 0000000..82cbb76
--- /dev/null
+++ b/src/net/micode/notes/ui/DeletingPassword.java
@@ -0,0 +1,62 @@
+package net.micode.notes.ui;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import net.micode.notes.R;
+
+public class DeletingPassword extends Activity {
+ EditText Dt_password;
+ Button Acknowledged;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_delete_password);
+ getWindow().setSoftInputMode(
+ WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
+ | WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
+ Dt_password=(EditText) findViewById(R.id.thepassword);
+ Acknowledged=(Button)findViewById(R.id.Dt_Acknowledged);
+ Acknowledged.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ String text02 = Dt_password.getText().toString();
+ if(text02.equals("")==true)
+ Toast.makeText(DeletingPassword.this, "密码不能为空",
+ Toast.LENGTH_SHORT).show();
+ SharedPreferences pref=getSharedPreferences("user management",MODE_PRIVATE);
+ String password = pref.getString("password","");
+ if(password.equals("")==false&&password.equals(text02)==true){
+ SharedPreferences.Editor editor=getSharedPreferences("user management", MODE_PRIVATE).edit();
+ editor.putBoolean("user",false);//false 表示已经设置登录密码
+ editor.putString("password","");
+ editor.apply();
+ Toast.makeText(DeletingPassword.this, "已经删除登录密码",
+ Toast.LENGTH_SHORT).show();
+ Intent intent=new
+ Intent(DeletingPassword.this,NotesListActivity.class);
+ startActivity(intent);
+ finish();
+ }
+ else{
+ Toast.makeText(DeletingPassword.this, "密码错误",
+ Toast.LENGTH_SHORT).show();
+ Dt_password.setText("");//把密码框内输入过的错误密码清空
+ }
+ }
+ });
+ }
+ @Override
+ public void onBackPressed() {
+ Intent intent=new Intent(DeletingPassword.this,NotesListActivity.class);
+ startActivity(intent);
+ finish();
+ }
+}
\ No newline at end of file
diff --git a/src/net/micode/notes/ui/LoginActivity.java b/src/net/micode/notes/ui/LoginActivity.java
new file mode 100644
index 0000000..d87b98c
--- /dev/null
+++ b/src/net/micode/notes/ui/LoginActivity.java
@@ -0,0 +1,55 @@
+package net.micode.notes.ui;
+
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+import android.app.Activity;
+
+import net.micode.notes.R;
+
+public class LoginActivity extends Activity{
+
+ EditText lgn_password;
+ Button lgn_login;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ SharedPreferences pref = getSharedPreferences("user management", MODE_PRIVATE);
+ boolean User_boolean = pref.getBoolean("user", false); //检查用户是否设置了密码
+ if (!User_boolean) { //如果用户没有设置密码,则直接跳转到便签主界面
+ Intent intent = new Intent(LoginActivity.this, NotesListActivity.class);
+ startActivity(intent);
+ finish();
+ }
+
+ setContentView(R.layout.activity_login);
+ getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
+ lgn_password = (EditText)findViewById(R.id.lgn_password);
+ lgn_login = (Button) findViewById(R.id.login);
+ lgn_login.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ SharedPreferences pref = getSharedPreferences("user management", MODE_PRIVATE);
+ String password = pref.getString("password", "");
+ if (password.equals(" ") == false && password.equals(lgn_password.getText().toString()) == true) {
+ Intent intent = new Intent(LoginActivity.this, NotesListActivity.class);
+ startActivity(intent);
+ finish();
+ } else {
+ Toast.makeText(LoginActivity.this, "密码错误", Toast.LENGTH_SHORT).show();
+ lgn_password.setText(""); //清空密码框内的输入
+ }
+
+ }
+ }
+ );
+ }
+}
+
+
diff --git a/src/net/micode/notes/ui/NoteEditActivity.java b/src/net/micode/notes/ui/NoteEditActivity.java
index b67920a..43a7060 100644
--- a/src/net/micode/notes/ui/NoteEditActivity.java
+++ b/src/net/micode/notes/ui/NoteEditActivity.java
@@ -47,6 +47,7 @@ import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.EditText;
+import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -85,8 +86,10 @@ public class NoteEditActivity extends Activity implements OnClickListener,
public ImageView ibSetBgColor;
}
+
//使用Map实现数据存储
private static final Map sBgSelectorBtnsMap = new HashMap();
+
static {
sBgSelectorBtnsMap.put(R.id.iv_bg_yellow, ResourceParser.YELLOW);
sBgSelectorBtnsMap.put(R.id.iv_bg_red, ResourceParser.RED);
@@ -97,6 +100,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
private static final Map sBgSelectorSelectionMap = new HashMap();
+
static {
sBgSelectorSelectionMap.put(ResourceParser.YELLOW, R.id.iv_bg_yellow_select);
sBgSelectorSelectionMap.put(ResourceParser.RED, R.id.iv_bg_red_select);
@@ -107,6 +111,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
private static final Map sFontSizeBtnsMap = new HashMap();
+
static {
sFontSizeBtnsMap.put(R.id.ll_font_large, ResourceParser.TEXT_LARGE);
sFontSizeBtnsMap.put(R.id.ll_font_small, ResourceParser.TEXT_SMALL);
@@ -116,6 +121,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
private static final Map sFontSelectorSelectionMap = new HashMap();
+
static {
sFontSelectorSelectionMap.put(ResourceParser.TEXT_LARGE, R.id.iv_large_select);
sFontSelectorSelectionMap.put(ResourceParser.TEXT_SMALL, R.id.iv_small_select);
@@ -220,7 +226,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN
| WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
- } else if(TextUtils.equals(Intent.ACTION_INSERT_OR_EDIT, intent.getAction())) {
+ } else if (TextUtils.equals(Intent.ACTION_INSERT_OR_EDIT, intent.getAction())) {
// New note
// intent.getAction()
// 大多用于broadcast发送广播时给机制(intent)设置一个action,就是一个字符串
@@ -287,6 +293,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
super.onResume();
initNoteScreen(); //调用方法初始化笔记屏幕
}
+
//初始化笔记界面的方法
private void initNoteScreen() {
//设置笔记编辑器的文字样式
@@ -341,8 +348,10 @@ public class NoteEditActivity extends Activity implements OnClickListener,
//没有提醒时,隐藏提醒日期和图标
mNoteHeaderHolder.tvAlertDate.setVisibility(View.GONE);
mNoteHeaderHolder.ivAlertIcon.setVisibility(View.GONE);
- };
+ }
+ ;
}
+
//当活动通过意图重新初始化时调用
@Override
protected void onNewIntent(Intent intent) {
@@ -390,7 +399,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
//判断触摸事件是否在给定的视图的范围内的方法
private boolean inRangeOfView(View view, MotionEvent ev) {
- int []location = new int[2];
+ int[] location = new int[2];
//获取视图在屏幕上的位置
view.getLocationOnScreen(location);
int x = location[0];
@@ -400,8 +409,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|| ev.getX() > (x + view.getWidth())
|| ev.getY() < y
|| ev.getY() > (y + view.getHeight())) {
- return false;
- }
+ return false;
+ }
return true;
}
@@ -429,7 +438,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
for (int id : sFontSizeBtnsMap.keySet()) {
View view = findViewById(id);
view.setOnClickListener(this);
- };
+ }
+ ;
//获取共享偏好设置,用于恢复特定的笔记属性,如字体的大小
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
mFontSizeId = mSharedPrefs.getInt(PREFERENCE_FONT_SIZE, ResourceParser.BG_DEFAULT_FONT_SIZE);
@@ -439,7 +449,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
* return the {@link ResourceParser#BG_DEFAULT_FONT_SIZE}
*/
//如果字体大小ID超出资源数组大小,设置为默认字体大小
- if(mFontSizeId >= TextAppearanceResources.getResourcesSize()) {
+ if (mFontSizeId >= TextAppearanceResources.getResourcesSize()) {
mFontSizeId = ResourceParser.BG_DEFAULT_FONT_SIZE;
}
//初始化笔记编辑列表视图
@@ -451,7 +461,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
protected void onPause() {
super.onPause();
//尝试保存笔记,如果成功则记录保存的长度
- if(saveNote()) {
+ if (saveNote()) {
Log.d(TAG, "Note data was saved with length:" + mWorkingNote.getContent().length());
}
//清除设置状态
@@ -473,14 +483,15 @@ public class NoteEditActivity extends Activity implements OnClickListener,
return;
}
//添加小部件ID到intent中
- intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[] {
- mWorkingNote.getWidgetId()
+ intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[]{
+ mWorkingNote.getWidgetId()
});
//发送广播以通知小部件更新
sendBroadcast(intent);
//设置结果为OK
setResult(RESULT_OK, intent);
}
+
//处理点击事件
public void onClick(View v) {
int id = v.getId();
@@ -488,8 +499,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
if (id == R.id.btn_set_bg_color) {
mNoteBgColorSelector.setVisibility(View.VISIBLE);
findViewById(sBgSelectorSelectionMap.get(mWorkingNote.getBgColorId())).setVisibility(
- - View.VISIBLE);
- //更改背景颜色或字体大小的逻辑
+ -View.VISIBLE);
+ //更改背景颜色或字体大小的逻辑
} else if (sBgSelectorBtnsMap.containsKey(id)) {
findViewById(sBgSelectorSelectionMap.get(mWorkingNote.getBgColorId())).setVisibility(
View.GONE);
@@ -515,7 +526,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
@Override
public void onBackPressed() {
//清除设置状态,如果已经处理则返回
- if(clearSettingState()) {
+ if (clearSettingState()) {
return;
}
//保存笔记然后正常处理返回事件
@@ -620,7 +631,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
d.setOnDateTimeSetListener(new OnDateTimeSetListener() {
public void OnDateTimeSet(AlertDialog dialog, long date) {
//当用户设置了日期时间后,将这个时间保存为提醒的时间
- mWorkingNote.setAlertDate(date , true);
+ mWorkingNote.setAlertDate(date, true);
}
});
//显示日期时间选择对话框
@@ -707,7 +718,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
AlarmManager alarmManager = ((AlarmManager) getSystemService(ALARM_SERVICE));
//显示提醒的头部信息
showAlertHeader();
- if(!set) {
+ if (!set) {
//如果set为false,取消任何现有的闹钟
alarmManager.cancel(pendingIntent);
} else {
@@ -745,7 +756,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
mEditTextList.removeViewAt(index);//移除指定索引处的编辑框视图
NoteEditText edit = null;
- if(index == 0) { //如果删除的是第一个编辑框
+ if (index == 0) { //如果删除的是第一个编辑框
edit = (NoteEditText) mEditTextList.getChildAt(0).findViewById(
R.id.et_edit_text);
} else {//否则,获取欠一个编辑框
@@ -764,7 +775,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
/**
* Should not happen, check for debug
*/
- if(index > mEditTextList.getChildCount()) {
+ if (index > mEditTextList.getChildCount()) {
Log.e(TAG, "Index out of mEditTextList boundrary, should not happen");
}
//创建新的列表项视图,然后将其添加到列表中的指定位置
@@ -786,7 +797,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
String[] items = text.split("\n");//按换行符拆分文本成多个项
int index = 0;
for (String item : items) {
- if(!TextUtils.isEmpty(item)) { //跳过空项
+ if (!TextUtils.isEmpty(item)) { //跳过空项
mEditTextList.addView(getListItem(item, index));//添加列表项
index++;
}
@@ -862,7 +873,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
return;
}
//根据文本是否存在来设置复选框的可见性
- if(hasText) {
+ if (hasText) {
mEditTextList.getChildAt(index).findViewById(R.id.cb_edit_item).setVisibility(View.VISIBLE);
} else {
mEditTextList.getChildAt(index).findViewById(R.id.cb_edit_item).setVisibility(View.GONE);
@@ -1000,4 +1011,19 @@ public class NoteEditActivity extends Activity implements OnClickListener,
private void showToast(int resId, int duration) {
Toast.makeText(this, resId, duration).show();
}
+
+
+ final ImageButton add_img_btn = (ImageButton) findViewById(R.id.add_img_btn);
+ add_img_btn.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ log.d(TAG, "onClick: click add image button");
+ Intent loadImage = new Intent(Intent.ACTION_GET_CONTENT);
+ loadImage.addCategory(Intent.CATEGORY_OPENABLE);
+ loadImage.setType("image/*");
+ startActivityForResult(loadImage, PHOTO_REQUESt);
+ }
+ });
+
}
+
diff --git a/src/net/micode/notes/ui/NoteEditText.java b/src/net/micode/notes/ui/NoteEditText.java
index 07060b5..84a8239 100644
--- a/src/net/micode/notes/ui/NoteEditText.java
+++ b/src/net/micode/notes/ui/NoteEditText.java
@@ -187,9 +187,10 @@ public class NoteEditText extends EditText {
if (mOnTextViewChangeListener != null) {
if (!focused && TextUtils.isEmpty(getText())) {
mOnTextViewChangeListener.onTextChange(mIndex, false);
- } else {
+ }
+ else {
mOnTextViewChangeListener.onTextChange(mIndex, true);
- }9
+ }
}
super.onFocusChanged(focused, direction, previouslyFocusedRect);
}
diff --git a/src/net/micode/notes/ui/SettingPassword.java b/src/net/micode/notes/ui/SettingPassword.java
new file mode 100644
index 0000000..abc2fe5
--- /dev/null
+++ b/src/net/micode/notes/ui/SettingPassword.java
@@ -0,0 +1,66 @@
+package net.micode.notes.ui;
+
+import static android.content.Context.MODE_PRIVATE;
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import net.micode.notes.R;
+
+
+public class SettingPassword extends Activity {
+ EditText password;
+ EditText password_ack;
+ Button acknowledge;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_set_loginpassword);
+ getWindow().setSoftInputMode(
+ WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
+ | WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
+ password = (EditText) findViewById(R.id.password);
+ password_ack = (EditText) findViewById(R.id.password_ack);
+ acknowledge = (Button)findViewById(R.id.acknowledge);
+ acknowledge.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ String text02 = password.getText().toString();
+ String text03 = password_ack.getText().toString();
+ if(text02.equals("")==true) {
+ Toast.makeText(SettingPassword.this, "密码不能为空", Toast.LENGTH_SHORT).show();
+ }
+ else if (text02.equals(text03) == false) {
+ Toast.makeText(SettingPassword.this, "密码错误,请重新输入密码 ", Toast.LENGTH_SHORT).show();
+ password_ack.setText("");
+ }
+ else if (text02.equals(text03) == true){
+ SharedPreferences.Editor editor=getSharedPreferences("user management", MODE_PRIVATE).edit();
+ editor.putBoolean("user",true); //true 表示已经设置登录密码
+ editor.putString("password",text02);
+ editor.apply();
+ Log.d("RegisterLoginPassword","password is "+text02);
+ Toast.makeText(SettingPassword.this, "密码设置成功",
+ Toast.LENGTH_SHORT).show();
+ Intent intent=new
+ Intent(SettingPassword.this,NotesListActivity.class);
+ startActivity(intent);
+ finish();
+ }
+ }
+ });
+ }
+ @Override
+ public void onBackPressed() {
+ Intent intent=new Intent(SettingPassword.this,NotesListActivity.class);
+ startActivity(intent);
+ finish();
+ }
+}
\ No newline at end of file
diff --git a/src/net/micode/notes/ui/SplashActivity.java b/src/net/micode/notes/ui/SplashActivity.java
new file mode 100644
index 0000000..973e297
--- /dev/null
+++ b/src/net/micode/notes/ui/SplashActivity.java
@@ -0,0 +1,29 @@
+package net.micode.notes.ui;
+import android.annotation.SuppressLint;
+import android.content.Intent;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.Handler;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.WindowInsets;
+import net.micode.notes.R;
+public class SplashActivity extends AppCompatActivity {
+ Handler mHandler=new Handler();
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState); //加载启动界面
+ setContentView(R.layout.activity_splash); //加载启动
+// 当计时结束时,跳转至 NotesListActivity
+ mHandler.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ Intent intent = new Intent();
+ intent.setClass(SplashActivity.this, LoginActivity.class);
+ startActivity(intent);
+ finish(); //销毁欢迎页面
+ }
+ }, 2000); // 2 秒后跳转}
diff --git a/src/res/color/primary_text_dark.xml b/src/res/color/primary_text_dark.xml
new file mode 100644
index 0000000..8ad98e3
--- /dev/null
+++ b/src/res/color/primary_text_dark.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/color/secondary_text_dark.xml b/src/res/color/secondary_text_dark.xml
new file mode 100644
index 0000000..9cf8a1a
--- /dev/null
+++ b/src/res/color/secondary_text_dark.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/drawable-hdpi/bg_btn_set_color.png b/src/res/drawable-hdpi/bg_btn_set_color.png
new file mode 100644
index 0000000..5eb5d44
Binary files /dev/null and b/src/res/drawable-hdpi/bg_btn_set_color.png differ
diff --git a/src/res/drawable-hdpi/bg_color_btn_mask.png b/src/res/drawable-hdpi/bg_color_btn_mask.png
new file mode 100644
index 0000000..100db77
Binary files /dev/null and b/src/res/drawable-hdpi/bg_color_btn_mask.png differ
diff --git a/src/res/drawable-hdpi/call_record.png b/src/res/drawable-hdpi/call_record.png
new file mode 100644
index 0000000..fb88ca4
Binary files /dev/null and b/src/res/drawable-hdpi/call_record.png differ
diff --git a/src/res/drawable-hdpi/clock.png b/src/res/drawable-hdpi/clock.png
new file mode 100644
index 0000000..5f2ae9a
Binary files /dev/null and b/src/res/drawable-hdpi/clock.png differ
diff --git a/src/res/drawable-hdpi/delete.png b/src/res/drawable-hdpi/delete.png
new file mode 100644
index 0000000..643de3e
Binary files /dev/null and b/src/res/drawable-hdpi/delete.png differ
diff --git a/src/res/drawable-hdpi/dropdown_icon.9.png b/src/res/drawable-hdpi/dropdown_icon.9.png
new file mode 100644
index 0000000..5525025
Binary files /dev/null and b/src/res/drawable-hdpi/dropdown_icon.9.png differ
diff --git a/src/res/drawable-hdpi/edit_blue.9.png b/src/res/drawable-hdpi/edit_blue.9.png
new file mode 100644
index 0000000..55a1856
Binary files /dev/null and b/src/res/drawable-hdpi/edit_blue.9.png differ
diff --git a/src/res/drawable-hdpi/edit_green.9.png b/src/res/drawable-hdpi/edit_green.9.png
new file mode 100644
index 0000000..2cb2d60
Binary files /dev/null and b/src/res/drawable-hdpi/edit_green.9.png differ
diff --git a/src/res/drawable-hdpi/edit_red.9.png b/src/res/drawable-hdpi/edit_red.9.png
new file mode 100644
index 0000000..bae944a
Binary files /dev/null and b/src/res/drawable-hdpi/edit_red.9.png differ
diff --git a/src/res/drawable-hdpi/edit_title_blue.9.png b/src/res/drawable-hdpi/edit_title_blue.9.png
new file mode 100644
index 0000000..96e6092
Binary files /dev/null and b/src/res/drawable-hdpi/edit_title_blue.9.png differ
diff --git a/src/res/drawable-hdpi/edit_title_green.9.png b/src/res/drawable-hdpi/edit_title_green.9.png
new file mode 100644
index 0000000..08d8644
Binary files /dev/null and b/src/res/drawable-hdpi/edit_title_green.9.png differ
diff --git a/src/res/drawable-hdpi/edit_title_red.9.png b/src/res/drawable-hdpi/edit_title_red.9.png
new file mode 100644
index 0000000..9c430e5
Binary files /dev/null and b/src/res/drawable-hdpi/edit_title_red.9.png differ
diff --git a/src/res/drawable-hdpi/edit_title_white.9.png b/src/res/drawable-hdpi/edit_title_white.9.png
new file mode 100644
index 0000000..19e8d95
Binary files /dev/null and b/src/res/drawable-hdpi/edit_title_white.9.png differ
diff --git a/src/res/drawable-hdpi/edit_title_yellow.9.png b/src/res/drawable-hdpi/edit_title_yellow.9.png
new file mode 100644
index 0000000..bf8f580
Binary files /dev/null and b/src/res/drawable-hdpi/edit_title_yellow.9.png differ
diff --git a/src/res/drawable-hdpi/edit_white.9.png b/src/res/drawable-hdpi/edit_white.9.png
new file mode 100644
index 0000000..918f7a6
Binary files /dev/null and b/src/res/drawable-hdpi/edit_white.9.png differ
diff --git a/src/res/drawable-hdpi/edit_yellow.9.png b/src/res/drawable-hdpi/edit_yellow.9.png
new file mode 100644
index 0000000..10cb642
Binary files /dev/null and b/src/res/drawable-hdpi/edit_yellow.9.png differ
diff --git a/src/res/drawable-hdpi/font_large.png b/src/res/drawable-hdpi/font_large.png
new file mode 100644
index 0000000..78cf2e6
Binary files /dev/null and b/src/res/drawable-hdpi/font_large.png differ
diff --git a/src/res/drawable-hdpi/font_normal.png b/src/res/drawable-hdpi/font_normal.png
new file mode 100644
index 0000000..9de7ced
Binary files /dev/null and b/src/res/drawable-hdpi/font_normal.png differ
diff --git a/src/res/drawable-hdpi/font_size_selector_bg.9.png b/src/res/drawable-hdpi/font_size_selector_bg.9.png
new file mode 100644
index 0000000..be8e64c
Binary files /dev/null and b/src/res/drawable-hdpi/font_size_selector_bg.9.png differ
diff --git a/src/res/drawable-hdpi/font_small.png b/src/res/drawable-hdpi/font_small.png
new file mode 100644
index 0000000..d3ff104
Binary files /dev/null and b/src/res/drawable-hdpi/font_small.png differ
diff --git a/src/res/drawable-hdpi/font_super.png b/src/res/drawable-hdpi/font_super.png
new file mode 100644
index 0000000..85b13a1
Binary files /dev/null and b/src/res/drawable-hdpi/font_super.png differ
diff --git a/src/res/drawable-hdpi/icon_app.png b/src/res/drawable-hdpi/icon_app.png
new file mode 100644
index 0000000..418aadc
Binary files /dev/null and b/src/res/drawable-hdpi/icon_app.png differ
diff --git a/src/res/drawable-hdpi/list_background.png b/src/res/drawable-hdpi/list_background.png
new file mode 100644
index 0000000..087e1f9
Binary files /dev/null and b/src/res/drawable-hdpi/list_background.png differ
diff --git a/src/res/drawable-hdpi/list_blue_down.9.png b/src/res/drawable-hdpi/list_blue_down.9.png
new file mode 100644
index 0000000..b88eebf
Binary files /dev/null and b/src/res/drawable-hdpi/list_blue_down.9.png differ
diff --git a/src/res/drawable-hdpi/list_blue_middle.9.png b/src/res/drawable-hdpi/list_blue_middle.9.png
new file mode 100644
index 0000000..96b1c8b
Binary files /dev/null and b/src/res/drawable-hdpi/list_blue_middle.9.png differ
diff --git a/src/res/drawable-hdpi/list_blue_single.9.png b/src/res/drawable-hdpi/list_blue_single.9.png
new file mode 100644
index 0000000..d7e7206
Binary files /dev/null and b/src/res/drawable-hdpi/list_blue_single.9.png differ
diff --git a/src/res/drawable-hdpi/list_blue_up.9.png b/src/res/drawable-hdpi/list_blue_up.9.png
new file mode 100644
index 0000000..632e88c
Binary files /dev/null and b/src/res/drawable-hdpi/list_blue_up.9.png differ
diff --git a/src/res/drawable-hdpi/list_folder.9.png b/src/res/drawable-hdpi/list_folder.9.png
new file mode 100644
index 0000000..829f61b
Binary files /dev/null and b/src/res/drawable-hdpi/list_folder.9.png differ
diff --git a/src/res/drawable-hdpi/list_footer_bg.9.png b/src/res/drawable-hdpi/list_footer_bg.9.png
new file mode 100644
index 0000000..5325c25
Binary files /dev/null and b/src/res/drawable-hdpi/list_footer_bg.9.png differ
diff --git a/src/res/drawable-hdpi/list_green_down.9.png b/src/res/drawable-hdpi/list_green_down.9.png
new file mode 100644
index 0000000..64a39d9
Binary files /dev/null and b/src/res/drawable-hdpi/list_green_down.9.png differ
diff --git a/src/res/drawable-hdpi/list_green_middle.9.png b/src/res/drawable-hdpi/list_green_middle.9.png
new file mode 100644
index 0000000..897325a
Binary files /dev/null and b/src/res/drawable-hdpi/list_green_middle.9.png differ
diff --git a/src/res/drawable-hdpi/list_green_single.9.png b/src/res/drawable-hdpi/list_green_single.9.png
new file mode 100644
index 0000000..c83405f
Binary files /dev/null and b/src/res/drawable-hdpi/list_green_single.9.png differ
diff --git a/src/res/drawable-hdpi/list_green_up.9.png b/src/res/drawable-hdpi/list_green_up.9.png
new file mode 100644
index 0000000..141f9e1
Binary files /dev/null and b/src/res/drawable-hdpi/list_green_up.9.png differ
diff --git a/src/res/drawable-hdpi/list_red_down.9.png b/src/res/drawable-hdpi/list_red_down.9.png
new file mode 100644
index 0000000..4224309
Binary files /dev/null and b/src/res/drawable-hdpi/list_red_down.9.png differ
diff --git a/src/res/drawable-hdpi/list_red_middle.9.png b/src/res/drawable-hdpi/list_red_middle.9.png
new file mode 100644
index 0000000..9988f17
Binary files /dev/null and b/src/res/drawable-hdpi/list_red_middle.9.png differ
diff --git a/src/res/drawable-hdpi/list_red_single.9.png b/src/res/drawable-hdpi/list_red_single.9.png
new file mode 100644
index 0000000..587c348
Binary files /dev/null and b/src/res/drawable-hdpi/list_red_single.9.png differ
diff --git a/src/res/drawable-hdpi/list_red_up.9.png b/src/res/drawable-hdpi/list_red_up.9.png
new file mode 100644
index 0000000..46b4757
Binary files /dev/null and b/src/res/drawable-hdpi/list_red_up.9.png differ
diff --git a/src/res/drawable-hdpi/list_white_down.9.png b/src/res/drawable-hdpi/list_white_down.9.png
new file mode 100644
index 0000000..29f9d8c
Binary files /dev/null and b/src/res/drawable-hdpi/list_white_down.9.png differ
diff --git a/src/res/drawable-hdpi/list_white_middle.9.png b/src/res/drawable-hdpi/list_white_middle.9.png
new file mode 100644
index 0000000..77a4ab4
Binary files /dev/null and b/src/res/drawable-hdpi/list_white_middle.9.png differ
diff --git a/src/res/drawable-hdpi/list_white_single.9.png b/src/res/drawable-hdpi/list_white_single.9.png
new file mode 100644
index 0000000..3e79189
Binary files /dev/null and b/src/res/drawable-hdpi/list_white_single.9.png differ
diff --git a/src/res/drawable-hdpi/list_white_up.9.png b/src/res/drawable-hdpi/list_white_up.9.png
new file mode 100644
index 0000000..e23cd5c
Binary files /dev/null and b/src/res/drawable-hdpi/list_white_up.9.png differ
diff --git a/src/res/drawable-hdpi/list_yellow_down.9.png b/src/res/drawable-hdpi/list_yellow_down.9.png
new file mode 100644
index 0000000..31cfc1e
Binary files /dev/null and b/src/res/drawable-hdpi/list_yellow_down.9.png differ
diff --git a/src/res/drawable-hdpi/list_yellow_middle.9.png b/src/res/drawable-hdpi/list_yellow_middle.9.png
new file mode 100644
index 0000000..b6549b2
Binary files /dev/null and b/src/res/drawable-hdpi/list_yellow_middle.9.png differ
diff --git a/src/res/drawable-hdpi/list_yellow_single.9.png b/src/res/drawable-hdpi/list_yellow_single.9.png
new file mode 100644
index 0000000..3faf507
Binary files /dev/null and b/src/res/drawable-hdpi/list_yellow_single.9.png differ
diff --git a/src/res/drawable-hdpi/list_yellow_up.9.png b/src/res/drawable-hdpi/list_yellow_up.9.png
new file mode 100644
index 0000000..4ae791c
Binary files /dev/null and b/src/res/drawable-hdpi/list_yellow_up.9.png differ
diff --git a/src/res/drawable-hdpi/menu_delete.png b/src/res/drawable-hdpi/menu_delete.png
new file mode 100644
index 0000000..ccdfc4b
Binary files /dev/null and b/src/res/drawable-hdpi/menu_delete.png differ
diff --git a/src/res/drawable-hdpi/menu_move.png b/src/res/drawable-hdpi/menu_move.png
new file mode 100644
index 0000000..1140b71
Binary files /dev/null and b/src/res/drawable-hdpi/menu_move.png differ
diff --git a/src/res/drawable-hdpi/new_note_normal.png b/src/res/drawable-hdpi/new_note_normal.png
new file mode 100644
index 0000000..e24e0d1
Binary files /dev/null and b/src/res/drawable-hdpi/new_note_normal.png differ
diff --git a/src/res/drawable-hdpi/new_note_pressed.png b/src/res/drawable-hdpi/new_note_pressed.png
new file mode 100644
index 0000000..c748936
Binary files /dev/null and b/src/res/drawable-hdpi/new_note_pressed.png differ
diff --git a/src/res/drawable-hdpi/note_edit_color_selector_panel.png b/src/res/drawable-hdpi/note_edit_color_selector_panel.png
new file mode 100644
index 0000000..fc49552
Binary files /dev/null and b/src/res/drawable-hdpi/note_edit_color_selector_panel.png differ
diff --git a/src/res/drawable-hdpi/notification.png b/src/res/drawable-hdpi/notification.png
new file mode 100644
index 0000000..b13ab4a
Binary files /dev/null and b/src/res/drawable-hdpi/notification.png differ
diff --git a/src/res/drawable-hdpi/search_result.png b/src/res/drawable-hdpi/search_result.png
new file mode 100644
index 0000000..ff2befd
Binary files /dev/null and b/src/res/drawable-hdpi/search_result.png differ
diff --git a/src/res/drawable-hdpi/selected.png b/src/res/drawable-hdpi/selected.png
new file mode 100644
index 0000000..b889bef
Binary files /dev/null and b/src/res/drawable-hdpi/selected.png differ
diff --git a/src/res/drawable-hdpi/splash.png b/src/res/drawable-hdpi/splash.png
new file mode 100644
index 0000000..8fc31bb
Binary files /dev/null and b/src/res/drawable-hdpi/splash.png differ
diff --git a/src/res/drawable-hdpi/title_alert.png b/src/res/drawable-hdpi/title_alert.png
new file mode 100644
index 0000000..544ee9c
Binary files /dev/null and b/src/res/drawable-hdpi/title_alert.png differ
diff --git a/src/res/drawable-hdpi/title_bar_bg.9.png b/src/res/drawable-hdpi/title_bar_bg.9.png
new file mode 100644
index 0000000..eb6bff0
Binary files /dev/null and b/src/res/drawable-hdpi/title_bar_bg.9.png differ
diff --git a/src/res/drawable-hdpi/widget_2x_blue.png b/src/res/drawable-hdpi/widget_2x_blue.png
new file mode 100644
index 0000000..a1707f4
Binary files /dev/null and b/src/res/drawable-hdpi/widget_2x_blue.png differ
diff --git a/src/res/drawable-hdpi/widget_2x_green.png b/src/res/drawable-hdpi/widget_2x_green.png
new file mode 100644
index 0000000..f86886c
Binary files /dev/null and b/src/res/drawable-hdpi/widget_2x_green.png differ
diff --git a/src/res/drawable-hdpi/widget_2x_red.png b/src/res/drawable-hdpi/widget_2x_red.png
new file mode 100644
index 0000000..0e66c29
Binary files /dev/null and b/src/res/drawable-hdpi/widget_2x_red.png differ
diff --git a/src/res/drawable-hdpi/widget_2x_white.png b/src/res/drawable-hdpi/widget_2x_white.png
new file mode 100644
index 0000000..5f0619a
Binary files /dev/null and b/src/res/drawable-hdpi/widget_2x_white.png differ
diff --git a/src/res/drawable-hdpi/widget_2x_yellow.png b/src/res/drawable-hdpi/widget_2x_yellow.png
new file mode 100644
index 0000000..12d1c2b
Binary files /dev/null and b/src/res/drawable-hdpi/widget_2x_yellow.png differ
diff --git a/src/res/drawable-hdpi/widget_4x_blue.png b/src/res/drawable-hdpi/widget_4x_blue.png
new file mode 100644
index 0000000..9183738
Binary files /dev/null and b/src/res/drawable-hdpi/widget_4x_blue.png differ
diff --git a/src/res/drawable-hdpi/widget_4x_green.png b/src/res/drawable-hdpi/widget_4x_green.png
new file mode 100644
index 0000000..fa8b452
Binary files /dev/null and b/src/res/drawable-hdpi/widget_4x_green.png differ
diff --git a/src/res/drawable-hdpi/widget_4x_red.png b/src/res/drawable-hdpi/widget_4x_red.png
new file mode 100644
index 0000000..62de074
Binary files /dev/null and b/src/res/drawable-hdpi/widget_4x_red.png differ
diff --git a/src/res/drawable-hdpi/widget_4x_white.png b/src/res/drawable-hdpi/widget_4x_white.png
new file mode 100644
index 0000000..a37d67c
Binary files /dev/null and b/src/res/drawable-hdpi/widget_4x_white.png differ
diff --git a/src/res/drawable-hdpi/widget_4x_yellow.png b/src/res/drawable-hdpi/widget_4x_yellow.png
new file mode 100644
index 0000000..d7c5fa4
Binary files /dev/null and b/src/res/drawable-hdpi/widget_4x_yellow.png differ
diff --git a/src/res/drawable/new_note.xml b/src/res/drawable/new_note.xml
new file mode 100644
index 0000000..2154ebc
--- /dev/null
+++ b/src/res/drawable/new_note.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
diff --git a/src/res/layout/account_dialog_title.xml b/src/res/layout/account_dialog_title.xml
new file mode 100644
index 0000000..7717112
--- /dev/null
+++ b/src/res/layout/account_dialog_title.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/activity_change_password.xml b/src/res/layout/activity_change_password.xml
new file mode 100644
index 0000000..30b0dcb
--- /dev/null
+++ b/src/res/layout/activity_change_password.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/activity_delete_password.xml b/src/res/layout/activity_delete_password.xml
new file mode 100644
index 0000000..e6883fc
--- /dev/null
+++ b/src/res/layout/activity_delete_password.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/activity_login.xml b/src/res/layout/activity_login.xml
new file mode 100644
index 0000000..52fb16f
--- /dev/null
+++ b/src/res/layout/activity_login.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/activity_set_loginpassword.xml b/src/res/layout/activity_set_loginpassword.xml
new file mode 100644
index 0000000..0686219
--- /dev/null
+++ b/src/res/layout/activity_set_loginpassword.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/activity_splash.xml b/src/res/layout/activity_splash.xml
new file mode 100644
index 0000000..5f5400d
--- /dev/null
+++ b/src/res/layout/activity_splash.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/add_account_text.xml b/src/res/layout/add_account_text.xml
new file mode 100644
index 0000000..c799178
--- /dev/null
+++ b/src/res/layout/add_account_text.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/datetime_picker.xml b/src/res/layout/datetime_picker.xml
new file mode 100644
index 0000000..f10d592
--- /dev/null
+++ b/src/res/layout/datetime_picker.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/dialog_edit_text.xml b/src/res/layout/dialog_edit_text.xml
new file mode 100644
index 0000000..361b39a
--- /dev/null
+++ b/src/res/layout/dialog_edit_text.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/folder_list_item.xml b/src/res/layout/folder_list_item.xml
new file mode 100644
index 0000000..77e8148
--- /dev/null
+++ b/src/res/layout/folder_list_item.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/note_edit.xml b/src/res/layout/note_edit.xml
new file mode 100644
index 0000000..29e406d
--- /dev/null
+++ b/src/res/layout/note_edit.xml
@@ -0,0 +1,410 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/res/layout/note_edit_list_item.xml b/src/res/layout/note_edit_list_item.xml
new file mode 100644
index 0000000..a885f9c
--- /dev/null
+++ b/src/res/layout/note_edit_list_item.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/res/layout/note_item.xml b/src/res/layout/note_item.xml
new file mode 100644
index 0000000..d541f6a
--- /dev/null
+++ b/src/res/layout/note_item.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/res/layout/note_list.xml b/src/res/layout/note_list.xml
new file mode 100644
index 0000000..6b25d38
--- /dev/null
+++ b/src/res/layout/note_list.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/res/layout/note_list_dropdown_menu.xml b/src/res/layout/note_list_dropdown_menu.xml
new file mode 100644
index 0000000..3fa271d
--- /dev/null
+++ b/src/res/layout/note_list_dropdown_menu.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/note_list_footer.xml b/src/res/layout/note_list_footer.xml
new file mode 100644
index 0000000..5ca7b22
--- /dev/null
+++ b/src/res/layout/note_list_footer.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/settings_header.xml b/src/res/layout/settings_header.xml
new file mode 100644
index 0000000..5eb8c50
--- /dev/null
+++ b/src/res/layout/settings_header.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/layout/widget_2x.xml b/src/res/layout/widget_2x.xml
new file mode 100644
index 0000000..55970ce
--- /dev/null
+++ b/src/res/layout/widget_2x.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
diff --git a/src/res/layout/widget_4x.xml b/src/res/layout/widget_4x.xml
new file mode 100644
index 0000000..dc9bb51
--- /dev/null
+++ b/src/res/layout/widget_4x.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/res/menu/call_note_edit.xml b/src/res/menu/call_note_edit.xml
new file mode 100644
index 0000000..02c0528
--- /dev/null
+++ b/src/res/menu/call_note_edit.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
diff --git a/src/res/menu/call_record_folder.xml b/src/res/menu/call_record_folder.xml
new file mode 100644
index 0000000..c664346
--- /dev/null
+++ b/src/res/menu/call_record_folder.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
diff --git a/src/res/menu/note_edit.xml b/src/res/menu/note_edit.xml
new file mode 100644
index 0000000..35cacd1
--- /dev/null
+++ b/src/res/menu/note_edit.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/menu/note_list.xml b/src/res/menu/note_list.xml
new file mode 100644
index 0000000..42ea736
--- /dev/null
+++ b/src/res/menu/note_list.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
diff --git a/src/res/menu/note_list_dropdown.xml b/src/res/menu/note_list_dropdown.xml
new file mode 100644
index 0000000..7cbaadc
--- /dev/null
+++ b/src/res/menu/note_list_dropdown.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/menu/note_list_options.xml b/src/res/menu/note_list_options.xml
new file mode 100644
index 0000000..daac008
--- /dev/null
+++ b/src/res/menu/note_list_options.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/menu/sub_folder.xml b/src/res/menu/sub_folder.xml
new file mode 100644
index 0000000..b00de26
--- /dev/null
+++ b/src/res/menu/sub_folder.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/raw-zh-rCN/introduction b/src/res/raw-zh-rCN/introduction
new file mode 100644
index 0000000..7188359
--- /dev/null
+++ b/src/res/raw-zh-rCN/introduction
@@ -0,0 +1,7 @@
+欢迎使用MIUI便签!
+
+ 无论从软件中直接添加,还是从桌面拖出widget,MIUI便签能让你快速建立和保存便签;
+
+ 除了调整文字大小、便签背景、文件夹等基础功能外,你会发现MIUI便签也提供了清单模式、便签提醒、软件加密、导出到SD卡、同步google task的高级功能,让你的生活记录更加美好和安全;
+
+ 来分享你的使用体验吧:http://www.miui.com/index.php
diff --git a/src/res/raw/introduction b/src/res/raw/introduction
new file mode 100644
index 0000000..269cf7b
--- /dev/null
+++ b/src/res/raw/introduction
@@ -0,0 +1 @@
+Welcome to use MIUI notes!
\ No newline at end of file
diff --git a/src/res/values-zh-rCN/arrays.xml b/src/res/values-zh-rCN/arrays.xml
new file mode 100644
index 0000000..a092386
--- /dev/null
+++ b/src/res/values-zh-rCN/arrays.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ - 短信
+ - 邮件
+
+
\ No newline at end of file
diff --git a/src/res/values-zh-rCN/strings.xml b/src/res/values-zh-rCN/strings.xml
new file mode 100644
index 0000000..09f75ed
--- /dev/null
+++ b/src/res/values-zh-rCN/strings.xml
@@ -0,0 +1,126 @@
+
+
+
+
+
+ 便签
+ 便签2x2
+ 便签4x4
+ 没有关联内容,点击新建便签。
+ 访客模式下,便签内容不可见
+ ...
+ 新建便签
+ 成功删除提醒
+ 创建提醒
+ 已过期
+ yyyyMMdd
+ MM月dd日 kk:mm
+ 知道了
+ 查看
+ 呼叫电话
+ 发送邮件
+ 浏览网页
+ 打开地图
+
+ 新建文件夹
+ 导出文本
+ 同步
+ 取消同步
+ 设置
+ 搜索
+ 删除
+ 移动到文件夹
+ 选中了 %d 项
+ 没有选中项,操作无效
+ 全选
+ 取消全选
+ 文字大小
+ 小
+ 正常
+ 大
+ 超大
+ 进入清单模式
+ 退出清单模式
+ 查看文件夹
+ 刪除文件夹
+ 修改文件夹名称
+ 文件夹 %1$s 已存在,请重新命名
+ 分享
+ 发送到桌面
+ 提醒我
+ 删除提醒
+ 选择文件夹
+ 上一级文件夹
+ 已添加到桌面
+ 删除
+ 确认要删除所选的 %d 条便签吗?
+ 确认要删除该条便签吗?
+ 确认删除文件夹及所包含的便签吗?
+ 已将所选 %1$d 条便签移到 %2$s 文件夹
+
+ SD卡被占用,不能操作
+ 导出文本时发生错误,请检查SD卡
+ 要查看的便签不存在
+ 不能为空便签设置闹钟提醒
+ 不能将空便签发送到桌面
+ 导出成功
+ 导出失败
+ 已将文本文件(%1$s)输出至SD卡(%2$s)目录
+
+ 同步便签...
+ 同步成功
+ 同步失败
+ 同步已取消
+ 与%1$s同步成功
+ 同步失败,请检查网络和帐号设置
+ 同步失败,发生内部错误
+ 同步已取消
+ 登录%1$s...
+ 正在获取服务器便签列表...
+ 正在同步本地便签...
+
+ 设置
+ 同步账号
+ 与google task同步便签记录
+ 上次同步于 %1$s
+ 添加账号
+ 更换账号
+ 删除账号
+ 取消
+ 立即同步
+ 取消同步
+ 当前帐号 %1$s
+ 如更换同步帐号,过去的帐号同步信息将被清空,再次切换的同时可能会造成数据重复
+ 同步便签
+ 请选择google帐号,便签将与该帐号的google task内容同步。
+ 正在同步中,不能修改同步帐号
+ 同步帐号已设置为%1$s
+ 新建便签背景颜色随机
+ 删除
+ 通话便签
+ 请输入名称
+ 正在搜索便签
+ 搜索便签
+ 便签中的文字
+ 便签
+ 设置
+ 取消
+
+ - %1$s 条符合“%2$s”的搜索结果
+
+
+
diff --git a/src/res/values-zh-rTW/arrays.xml b/src/res/values-zh-rTW/arrays.xml
new file mode 100644
index 0000000..5297209
--- /dev/null
+++ b/src/res/values-zh-rTW/arrays.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ - 短信
+ - 郵件
+
+
\ No newline at end of file
diff --git a/src/res/values-zh-rTW/strings.xml b/src/res/values-zh-rTW/strings.xml
new file mode 100644
index 0000000..e29b79b
--- /dev/null
+++ b/src/res/values-zh-rTW/strings.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ 便簽
+ 便簽2x2
+ 便簽4x4
+ 沒有關聯內容,點擊新建便簽。
+ 訪客模式下,便籤內容不可見
+ ...
+ 新建便簽
+ 成功刪除提醒
+ 創建提醒
+ 已過期
+ yyyyMMdd
+ MM月dd日 kk:mm
+ 知道了
+ 查看
+ 呼叫電話
+ 發送郵件
+ 浏覽網頁
+ 打開地圖
+ 已將所選 %1$d 便籤移到 %2$s 文件夾
+
+ 新建文件夾
+ 導出文本
+ 同步
+ 取消同步
+ 設置
+ 搜尋
+ 刪除
+ 移動到文件夾
+ 選中了 %d 項
+ 沒有選中項,操作無效
+ 全選
+ 取消全選
+ 文字大小
+ 小
+ 正常
+ 大
+ 超大
+ 進入清單模式
+ 退出清單模式
+ 查看文件夾
+ 刪除文件夾
+ 修改文件夾名稱
+ 文件夾 %1$s 已存在,請重新命名
+ 分享
+ 發送到桌面
+ 提醒我
+ 刪除提醒
+ 選擇文件夾
+ 上一級文件夾
+ 已添加到桌面
+ 刪除
+ 确认要刪除所選的 %d 條便籤嗎?
+ 确认要删除該條便籤嗎?
+ 確認刪除檔夾及所包含的便簽嗎?
+ SD卡被佔用,不能操作
+ 導出TXT時發生錯誤,請檢查SD卡
+ 要查看的便籤不存在
+ 不能爲空便籤設置鬧鐘提醒
+ 不能將空便籤發送到桌面
+ 導出成功
+ 導出失敗
+ 已將文本文件(%1$s)導出至SD(%2$s)目錄
+
+ 同步便簽...
+ 同步成功
+ 同步失敗
+ 同步已取消
+ 與%1$s同步成功
+ 同步失敗,請檢查網絡和帳號設置
+ 同步失敗,發生內部錯誤
+ 同步已取消
+ 登陸%1$s...
+ 正在獲取服務器便籤列表...
+ 正在同步本地便籤...
+
+ 設置
+ 同步賬號
+ 与google task同步便簽記錄
+ 上次同步于 %1$s
+ 添加賬號
+ 更換賬號
+ 刪除賬號
+ 取消
+ 立即同步
+ 取消同步
+ 當前帳號 %1$s
+ 如更換同步帳號,過去的帳號同步信息將被清空,再次切換的同時可能會造成數據重復
+ 同步便簽
+ 請選擇google帳號,便簽將與該帳號的google task內容同步。
+ 正在同步中,不能修改同步帳號
+ 同步帳號已設置為%1$s
+ 新建便籤背景顏色隨機
+
+ 刪除
+ 通話便籤
+ 請輸入名稱
+
+ 正在搜索便籤
+ 搜索便籤
+ 便籤中的文字
+ 便籤
+ 設置
+ 取消
+
+ - %1$s 條符合”%2$s“的搜尋結果
+
+
+
diff --git a/src/res/values/arrays.xml b/src/res/values/arrays.xml
new file mode 100644
index 0000000..e00210b
--- /dev/null
+++ b/src/res/values/arrays.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+ - -%s
+ - --%s
+ - --%s
+ - --%s
+
+
+
+ - Messaging
+ - Email
+
+
\ No newline at end of file
diff --git a/src/res/values/attrs.xml b/src/res/values/attrs.xml
new file mode 100644
index 0000000..e52391d
--- /dev/null
+++ b/src/res/values/attrs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/values/colors.xml b/src/res/values/colors.xml
new file mode 100644
index 0000000..9d7362b
--- /dev/null
+++ b/src/res/values/colors.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+ #335b5b5b
+ #FFO39BE5
+ #FF01579B
+ #FF40C4FF
+ #FFOOBOFF
+ #66000000
+
\ No newline at end of file
diff --git a/src/res/values/dimens.xml b/src/res/values/dimens.xml
new file mode 100644
index 0000000..194e84f
--- /dev/null
+++ b/src/res/values/dimens.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+ 33sp
+ 26sp
+ 20sp
+ 17sp
+ 14sp
+
\ No newline at end of file
diff --git a/src/res/values/strings.xml b/src/res/values/strings.xml
new file mode 100644
index 0000000..55df868
--- /dev/null
+++ b/src/res/values/strings.xml
@@ -0,0 +1,135 @@
+
+
+
+
+
+ Notes
+ Notes 2x2
+ Notes 4x4
+ No associated note found, click to create associated note.
+ Privacy mode,can not see note content
+ ...
+ Add note
+ Delete reminder successfully
+ Set reminder
+ Expired
+ yyyyMMdd
+ MMMd kk:mm
+ Got it
+ Take a look
+ Call
+ Send email
+ Browse web
+ Open map
+
+ /MIUI/notes/
+ notes_%s.txt
+
+ (%d)
+ New Folder
+ Export text
+ Sync
+ Cancel syncing
+ Settings
+ Search
+ Delete
+ Move to folder
+ %d selected
+ Nothing selected, the operation is invalid
+ Select all
+ Deselect all
+ Font size
+ Small
+ Medium
+ Large
+ Super
+ Enter check list
+ Leave check list
+ View folder
+ Delete folder
+ Change folder name
+ The folder %1$s exist, please rename
+ Share
+ Send to home
+ Remind me
+ Delete reminder
+ Select folder
+ Parent folder
+ Note added to home
+ Confirm to delete folder and its notes?
+ Delete selected notes
+ Confirm to delete the selected %d notes?
+ Confirm to delete this note?
+ Have moved selected %1$d notes to %2$s folder
+
+ SD card busy, not available now
+ Export failed, please check SD card
+ The note is not exist
+ Sorry, can not set clock on empty note
+ Sorry, can not send and empty note to home
+ Export successful
+ Export fail
+ Export text file (%1$s) to SD (%2$s) directory
+
+ Syncing notes...
+ Sync is successful
+ Sync is failed
+ Sync is canceled
+ Sync is successful with account %1$s
+ Sync failed, please check network and account settings
+ Sync failed, internal error occurs
+ Sync is canceled
+ Logging into %1$s...
+ Getting remote note list...
+ Synchronize local notes with Google Task...
+
+ Settings
+ Sync account
+ Sync notes with google task
+ Last sync time %1$s
+ yyyy-MM-dd hh:mm:ss
+ Add account
+ Change sync account
+ Remove sync account
+ Cancel
+ Sync immediately
+ Cancel syncing
+ Current account %1$s
+ All sync related information will be deleted, which may result in duplicated items sometime
+ Sync notes
+ Please select a google account. Local notes will be synced with google task.
+ Cannot change the account because sync is in progress
+ %1$s has been set as the sync account
+ New note background color random
+
+ Delete
+ Call notes
+ Input name
+
+ Searching Notes
+ Search notes
+ Text in your notes
+ Notes
+ set
+ cancel
+
+ - %1$s result for \"%2$s\"
+
+ - %1$s results for \"%2$s\"
+
+
+
diff --git a/src/res/values/styles.xml b/src/res/values/styles.xml
new file mode 100644
index 0000000..ad0d90d
--- /dev/null
+++ b/src/res/values/styles.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/values/themes.xml b/src/res/values/themes.xml
new file mode 100644
index 0000000..d082219
--- /dev/null
+++ b/src/res/values/themes.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/res/values/themes/themes.xml b/src/res/values/themes/themes.xml
new file mode 100644
index 0000000..36fc502
--- /dev/null
+++ b/src/res/values/themes/themes.xml
@@ -0,0 +1,6 @@
+
+
+
\ No newline at end of file
diff --git a/src/res/xml/preferences.xml b/src/res/xml/preferences.xml
new file mode 100644
index 0000000..fe58f8f
--- /dev/null
+++ b/src/res/xml/preferences.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/res/xml/searchable.xml b/src/res/xml/searchable.xml
new file mode 100644
index 0000000..bf74f14
--- /dev/null
+++ b/src/res/xml/searchable.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
diff --git a/src/res/xml/widget_2x_info.xml b/src/res/xml/widget_2x_info.xml
new file mode 100644
index 0000000..ac8b225
--- /dev/null
+++ b/src/res/xml/widget_2x_info.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
diff --git a/src/res/xml/widget_4x_info.xml b/src/res/xml/widget_4x_info.xml
new file mode 100644
index 0000000..cf79f9c
--- /dev/null
+++ b/src/res/xml/widget_4x_info.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+