From 4cea143bbe247352c4d7b28b2c4bf52bc1b835c4 Mon Sep 17 00:00:00 2001 From: JackyMa <2433069615@qq.com> Date: Wed, 3 Nov 2021 10:50:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B9=9D=E5=AE=AB=E6=A0=BC=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...源-开源软件维护方案及成果.docx | Bin 0 -> 21749 bytes src/java/net/micode/notes/data/Notes.java | 2 + .../notes/data/NotesDatabaseHelper.java | 3 +- .../net/micode/notes/model/WorkingNote.java | 29 ++ src/java/net/micode/notes/tool/Point.java | 113 +++++ .../net/micode/notes/ui/LockPatternView.java | 385 ++++++++++++++++++ .../net/micode/notes/ui/NoteEditActivity.java | 48 ++- .../net/micode/notes/ui/NoteItemData.java | 6 + .../net/micode/notes/ui/NotesListItem.java | 10 + .../net/micode/notes/ui/SetLockActivity.java | 95 +++++ .../net/micode/notes/ui/UnlockActivity.java | 56 +++ src/res/color/primary_text_dark.xml | 2 +- src/res/color/secondary_text_dark.xml | 2 +- src/res/drawable-hdpi/bitmap_error.png | Bin 0 -> 3754 bytes src/res/drawable-hdpi/bitmap_normal.png | Bin 0 -> 3788 bytes src/res/drawable-hdpi/bitmap_pressed.png | Bin 0 -> 3757 bytes src/res/drawable-hdpi/line_error.png | Bin 0 -> 2806 bytes src/res/drawable-hdpi/line_pressed.png | Bin 0 -> 2807 bytes src/res/drawable-hdpi/lock.png | Bin 0 -> 1221 bytes src/res/drawable-hdpi/splash.jpg | Bin 0 -> 107507 bytes src/res/drawable-hdpi/star.png | Bin 0 -> 1221 bytes .../drawable/settings_launcher_background.xml | 74 ++++ src/res/layout/activity_lock.xml | 20 + src/res/layout/activity_set_lock.xml | 32 ++ src/res/layout/activity_splash.xml | 52 +++ src/res/layout/note_item.xml | 7 + src/res/layout/widget_lock_view.xml | 10 + src/res/menu/note_edit.xml | 8 + src/res/values-zh-rCN/strings.xml | 3 + src/res/values-zh-rTW/strings.xml | 3 + src/res/values/attrs.xml | 6 + src/res/values/colors.xml | 5 + src/res/values/strings.xml | 5 + src/res/values/styles.xml | 17 +- src/res/values/themes.xml | 16 + 35 files changed, 995 insertions(+), 14 deletions(-) create mode 100644 doc/实践资源-开源软件维护方案及成果.docx create mode 100644 src/java/net/micode/notes/tool/Point.java create mode 100644 src/java/net/micode/notes/ui/LockPatternView.java create mode 100644 src/java/net/micode/notes/ui/SetLockActivity.java create mode 100644 src/java/net/micode/notes/ui/UnlockActivity.java create mode 100644 src/res/drawable-hdpi/bitmap_error.png create mode 100644 src/res/drawable-hdpi/bitmap_normal.png create mode 100644 src/res/drawable-hdpi/bitmap_pressed.png create mode 100644 src/res/drawable-hdpi/line_error.png create mode 100644 src/res/drawable-hdpi/line_pressed.png create mode 100644 src/res/drawable-hdpi/lock.png create mode 100644 src/res/drawable-hdpi/splash.jpg create mode 100644 src/res/drawable-hdpi/star.png create mode 100644 src/res/drawable/settings_launcher_background.xml create mode 100644 src/res/layout/activity_lock.xml create mode 100644 src/res/layout/activity_set_lock.xml create mode 100644 src/res/layout/activity_splash.xml create mode 100644 src/res/layout/widget_lock_view.xml create mode 100644 src/res/values/attrs.xml create mode 100644 src/res/values/themes.xml diff --git a/doc/实践资源-开源软件维护方案及成果.docx b/doc/实践资源-开源软件维护方案及成果.docx new file mode 100644 index 0000000000000000000000000000000000000000..0b7e6eadd93ea2334378eab53576e07fc0fb462d GIT binary patch literal 21749 zcmeFZW0Yn~vo2b;%`UUcR+nwtwr$(CZQIpl+qUhls#|M)cc1g!vDX>r?%#XQF*4sb zXGALI6N$)}Q&s{P1O)&L00IC2fB@ivK8H6F5CDJ@8~^|r00Kxuz{c9q$l6gy(aqM# zL5s%K$`U^x1c*Er0O*_lf3E+=66j2llIiC~2)-u$3^A?=rm>|Pl4X0bQ$(V_ZMQ6` zwd<+p^!)HBp=KJw7viIpT1#`=HZftG?=!V>tPey;YQQ`%(n|JCqET^9u3H{8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F>|E5cF^28bK`+VAD<+rLm$~d+_qzAof8LCEpVAk+Pn`ENUA-$@ zmvq^nqTT+99^>LYD=)k|2fkM z=>og&*bn|g@+z2#uRxBWmlAvoxT}q44 z%)nr*#(-^MExG}yYfq64a8^e*0I?Dk-4xUnn8>CyYoMC~E*sDdKwZ*^Y(TLlx&dHk zU^NAOK_9}L-CEGVL|NX4?h5n;BMAMo4PcQ0Up|7a8GVoop;^TNsu^v_3*7|tVH|`B zEsjtVPzH6-^`rKQ5xRkTT^JZJddTS7QF}7T+8NxDv_tzf=(8Cn zOmqWKTNlU%y!J*;0@&Ib=w_kTQOIU}^u=x#qQ(mFW(Afapw_W4!wca4>hJy_9st_z BXbS)U literal 0 HcmV?d00001 diff --git a/src/java/net/micode/notes/data/Notes.java b/src/java/net/micode/notes/data/Notes.java index 1db29017..8d2e6c21 100644 --- a/src/java/net/micode/notes/data/Notes.java +++ b/src/java/net/micode/notes/data/Notes.java @@ -169,6 +169,8 @@ public class Notes { public static final String TOP = "top"; public static final String STAR = "star"; + + public static final String PASSCODE = "passcode"; } public interface DataColumns { diff --git a/src/java/net/micode/notes/data/NotesDatabaseHelper.java b/src/java/net/micode/notes/data/NotesDatabaseHelper.java index f5ce9566..e9619734 100644 --- a/src/java/net/micode/notes/data/NotesDatabaseHelper.java +++ b/src/java/net/micode/notes/data/NotesDatabaseHelper.java @@ -62,7 +62,8 @@ public class NotesDatabaseHelper extends SQLiteOpenHelper { NoteColumns.GTASK_ID + " TEXT NOT NULL DEFAULT 1," + NoteColumns.VERSION + " INTEGER NOT NULL DEFAULT 0," + NoteColumns.TOP + " INTEGER NOT NULL DEFAULT 0," + - NoteColumns.STAR + " INTEGER NOT NULL DEFAULT 0" + + NoteColumns.STAR + " INTEGER NOT NULL DEFAULT 0," + + NoteColumns.PASSCODE + " TEXT NOT NULL DEFAULT ''"+ ")"; private static final String CREATE_DATA_TABLE_SQL = diff --git a/src/java/net/micode/notes/model/WorkingNote.java b/src/java/net/micode/notes/model/WorkingNote.java index d886280d..df3de87a 100644 --- a/src/java/net/micode/notes/model/WorkingNote.java +++ b/src/java/net/micode/notes/model/WorkingNote.java @@ -61,8 +61,15 @@ public class WorkingNote { private boolean mIsDeleted; + /**记录便签已设置密码*/ + private String mPasscode = ""; + + /**记录已置顶便签*/ private String mTop = "0"; + /**记录便签所属类别*/ + private int mClass; + private String mStar = "0"; private NoteSettingChangedListener mNoteSettingStatusListener; @@ -86,6 +93,7 @@ public class WorkingNote { NoteColumns.MODIFIED_DATE, NoteColumns.TOP, NoteColumns.STAR, + NoteColumns.PASSCODE, }; private static final int DATA_ID_COLUMN = 0; @@ -112,6 +120,8 @@ public class WorkingNote { private static final int NOTE_STAR_COLUMN = 7; + private static final int NOTE_PASSCODE_COLUMN = 8; + // New note construct private WorkingNote(Context context, long folderId) { mContext = context; @@ -125,6 +135,7 @@ public class WorkingNote { mWidgetType = Notes.TYPE_WIDGET_INVALIDE; mTop = String.valueOf(getTopId()); mStar = String.valueOf(getStarId()); + mPasscode = String.valueOf(getPasscode()); } // Existing note construct @@ -152,6 +163,7 @@ public class WorkingNote { mModifiedDate = cursor.getLong(NOTE_MODIFIED_DATE_COLUMN); mTop = cursor.getString(NOTE_TOP_COLUMN); mStar = cursor.getString(NOTE_STAR_COLUMN); + mPasscode = cursor.getString(NOTE_PASSCODE_COLUMN); } cursor.close(); } else { @@ -268,6 +280,7 @@ public class WorkingNote { } + public void setAlertDate(long date, boolean set) { if (date != mAlertDate) { mAlertDate = date; @@ -337,6 +350,22 @@ public class WorkingNote { return (mAlertDate > 0 ? true : false); } + /**判断是否已经设置密码*/ + public boolean hasPasscode() { + return !mPasscode.equals(""); + } + + /**设置便签访问密码,并存入数据库*/ + public void setPasscode(String passcode) { + mPasscode = passcode; + mNote.setNoteValue(NoteColumns.PASSCODE, passcode); + } + + /**获取设置的密码*/ + public String getPasscode() { + return mPasscode; + } + public int getTopId() { if (mTop.equals("1")) { return 1; diff --git a/src/java/net/micode/notes/tool/Point.java b/src/java/net/micode/notes/tool/Point.java new file mode 100644 index 00000000..f3d8e4ee --- /dev/null +++ b/src/java/net/micode/notes/tool/Point.java @@ -0,0 +1,113 @@ +package net.micode.notes.tool; + +public class Point { + public static int BITMAP_NORMAL = 0; // 正常 + public static int BITMAP_ERROR = 1; // 错误 + public static int BITMAP_PRESS = 2; // 按下 + + //九宫格中的点的下标(即每个点代表一个值) + private String index; + //点的状态 + private int state; + //点的坐标 + private float x; + private float y; + + public Point() { + super(); + } + + public Point(int x, int y) { + this.x = x; + this.y = y; + } + + public String getIndex() { + return index; + } + + public int getState() { + return state; + } + + public float getX() { + return x; + } + + public float getY() { + return y; + } + + public void setIndex(String index) { + this.index = index; + } + + public void setState(int state) { + this.state = state; + } + + public void setX(float x) { + this.x = x; + } + + public void setY(float y) { + this.y = y; + } + + /** + * 判断屏幕上的九宫格中的点能否可以进行连线 + * + * @param a + * @param moveX + * @param moveY + * @param radius 点bitmap的半径 + * @return 布尔型 + */ + public boolean isWith(Point a, float moveX, float moveY, float radius) { + float result = (float) Math.sqrt((a.getX() - moveX) + * (a.getX() - moveX) + (a.getY() - moveY) + * (a.getY() - moveY)); + if (result < 5 * radius / 4) { + return true; + } + return false; + } + + public static float getDegrees(Point a, Point b) { + float degrees = 0; + float ax = a.getX(); + float ay = a.getY(); + float bx = b.getX(); + float by = b.getY(); + + if (ax == bx) { + if (by > ay) { + degrees = 90; + } else { + degrees = 270; + } + } else if (by == ay) { + if (ax > bx) { + degrees = 180; + } else { + degrees = 0; + } + } else { + if (ax > bx) { + if (ay > by) { // 第三象限 + degrees = 180 + (float) (Math.atan2(ay - by, ax - bx) * 180 / Math.PI); + } else { // 第二象限 + degrees = 180 - (float) (Math.atan2(by - ay, ax - bx) * 180 / Math.PI); + } + } else { + if (ay > by) { // 第四象限 + degrees = 360 - (float) (Math.atan2(ay - by, bx - ax) * 180 / Math.PI); + } else { // 第一象限 + degrees = (float) (Math.atan2(by - ay, bx - ax) * 180 / Math.PI); + } + } + } + return degrees; + } +} + diff --git a/src/java/net/micode/notes/ui/LockPatternView.java b/src/java/net/micode/notes/ui/LockPatternView.java new file mode 100644 index 00000000..0218d439 --- /dev/null +++ b/src/java/net/micode/notes/ui/LockPatternView.java @@ -0,0 +1,385 @@ +package net.micode.notes.ui; + +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Canvas; +import android.graphics.Matrix; +import android.graphics.Paint; +import android.util.AttributeSet; +import android.util.Log; +import android.view.MotionEvent; +import android.view.View; + +import net.micode.notes.R; +import net.micode.notes.tool.Point; + +import java.util.ArrayList; +import java.util.List; + + +public class LockPatternView extends View { + //判断线的状态 + private static boolean isLineState = true; + //判断点是否被实例化了 + private static boolean isInitPoint = false; + //判断手指是否离开屏幕 + private static boolean isFinish = false; + //判断手指点击屏幕时是否选中了九宫格中的点 + private static boolean isSelect = false; + // 创建MyPoint的数组 + private Point[][] mPoints = new Point[3][3]; + // 声明屏幕的宽和高 + private int mScreenHeight; + private int mScreenWidth; + // 声明点线的图片的半径 + private float mPointRadius; + // 声明线的图片的高(即是半径) + private float mLineHeight; + // 声明鼠标移动的x,y坐标 + private float mMoveX, mMoveY; + // 声明屏幕上的宽和高的偏移量 + private int mScreenHeightOffSet = 0; + private int mScreenWidthOffSet = 0; + // 创建一个画笔 + private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); + // 声明资源图片 + private Bitmap mBitmapNormal; + private Bitmap mBitmapPressed; + private Bitmap mBitmapError; + private Bitmap mLinePressed; + private Bitmap mLineError; + // 创建一个矩阵 + private Matrix mMatrix = new Matrix(); + // 创建MyPoint的列表 + private List mPointList = new ArrayList(); + // 实例化鼠标点 + private Point mMousePoint = new Point(); + // 用获取从activity中传过来的密码字符串 + private String mPassword = ""; + private final static String TAG = "LockPatternView"; + + private Context mContext; + private OnLockListener mListener; + + public LockPatternView(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + mContext = context; + } + + public LockPatternView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public LockPatternView(Context context) { + super(context); + } + + /** + * 画点和画线 + */ + @Override + protected void onDraw(Canvas canvas) { + super.onDraw(canvas); + if (!isInitPoint) { + initPoint(); // 先初始化 + } + + canvasPoint(canvas); // 开始画点 + + // 开始画线 + if (mPointList.size() > 0) { + Point b = null; + Point a = mPointList.get(0); + for (int i = 1; i < mPointList.size(); i++) { + b = mPointList.get(i); + canvasLine(a, b, canvas); + a = b; + } + if (!isFinish) { + canvasLine(a, mMousePoint, canvas); + } + } + } + + /** + * 手指点击手机屏幕 + */ + @Override + public boolean onTouchEvent(MotionEvent event) { + mMoveX = event.getX(); + mMoveY = event.getY(); + // 设置移动点的坐标 + mMousePoint.setX(mMoveX); + mMousePoint.setY(mMoveY); + Point mPoint = null; + switch (event.getAction()) { + case MotionEvent.ACTION_DOWN: + isLineState = true; + isFinish = false; + // 每次点击时就会将pointList中元素设置转化成正常状态 + for (int i = 0; i < mPointList.size(); i++) { + mPointList.get(i).setState(Point.BITMAP_NORMAL); + } + // 将pointList中的元素清除掉 + mPointList.clear(); + // 判断是否点中了九宫格中的点 + mPoint = getIsSelectedPoint(mMoveX, mMoveY); + if (mPoint != null) { + isSelect = true; + } + break; + case MotionEvent.ACTION_MOVE: + if (isSelect == true) { + mPoint = getIsSelectedPoint(mMoveX, mMoveY); + } + + break; + case MotionEvent.ACTION_UP: + isFinish = true; + isSelect = false; + // 规定至少要有4个点被连线才有可能是正确 + // 其他种情况都是错误的 + if (mPointList.size() >= 4) {// 正确情况 + for (int j = 0; j < mPointList.size(); j++) { + mPassword += mPointList.get(j).getIndex(); + } + //将连线后得到的密码传给activity + mListener.getStringPassword(mPassword); + mPassword = ""; + //经过activity判断传过来是否正确 + if (mListener.isPassword()) { + for (int i = 0; i < mPointList.size(); i++) { + mPointList.get(i).setState(Point.BITMAP_PRESS); + } + } else { + for (int i = 0; i < mPointList.size(); i++) { + mPointList.get(i).setState(Point.BITMAP_ERROR); + } + isLineState = false; + } + // 错误情况 + } else if (mPointList.size() < 4 && mPointList.size() > 1) { + for (int i = 0; i < mPointList.size(); i++) { + mPointList.get(i).setState(Point.BITMAP_ERROR); + } + isLineState = false; + // 如果只有一个点被点中时为正常情况 + } else if (mPointList.size() == 1) { + for (int i = 0; i < mPointList.size(); i++) { + mPointList.get(i).setState(Point.BITMAP_NORMAL); + } + } + break; + } + // 将mPoint添加到pointList中 + if (isSelect && mPoint != null) { + if (mPoint.getState() == Point.BITMAP_NORMAL) { + mPoint.setState(Point.BITMAP_PRESS); + mPointList.add(mPoint); + } + } + // 每次发生OnTouchEvent()后都刷新View + postInvalidate(); + return true; + } + + /** + * 判断九宫格中的某个点是否被点中了,或者某个点能否被连线 + * + * @param moveX + * @param moveY + * @return + */ + private Point getIsSelectedPoint(float moveX, float moveY) { + Point myPoint = null; + for (int i = 0; i < mPoints.length; i++) { + for (int j = 0; j < mPoints[i].length; j++) { + if (mPoints[i][j].isWith(mPoints[i][j], moveX, moveY, + mPointRadius)) { + myPoint = mPoints[i][j]; + } + } + } + + return myPoint; + } + + /** + * 画线 + * + * @param a 起始点 + * @param b 目的点 + * @param canvas 画布 + */ + private void canvasLine(Point a, Point b, Canvas canvas) { + // Math.sqrt(平方+平方) + float abInstance = (float) Math.sqrt( + (a.getX() - b.getX()) * (a.getX() - b.getX()) + + (a.getY() - b.getY()) * (a.getY() - b.getY()) + ); + canvas.rotate(Point.getDegrees(a, b), a.getX(), a.getY()); + + mMatrix.setScale(abInstance / mLineHeight, 1); + mMatrix.postTranslate(a.getX(), a.getY()); + if (isLineState) { + canvas.drawBitmap(mLinePressed, mMatrix, mPaint); + } else { + canvas.drawBitmap(mLineError, mMatrix, mPaint); + } + + canvas.rotate(-Point.getDegrees(a, b), a.getX(), a.getY()); + } + + /** + * 画点 + * + * @param canvas + */ + private void canvasPoint(Canvas canvas) { + for (int i = 0; i < mPoints.length; i++) { + for (int j = 0; j < mPoints[i].length; j++) { + if (mPoints[i][j]==null) { + //重启view时,new的变量被销毁,其他未被销毁,导致设置一次开启app,第二次进入时 + //isinitpoint 变量已为true,可是点实例未初始化; + initPoint(); + } + if (mPoints[i][j].getState() == Point.BITMAP_NORMAL) { + canvas.drawBitmap(mBitmapNormal, + mPoints[i][j].getX() - mPointRadius, + mPoints[i][j].getY() - mPointRadius, mPaint); + } else if (mPoints[i][j].getState() == Point.BITMAP_PRESS) { + canvas.drawBitmap(mBitmapPressed, + mPoints[i][j].getX() - mPointRadius, + mPoints[i][j].getY() - mPointRadius, mPaint); + } else { + canvas.drawBitmap(mBitmapError, + mPoints[i][j].getX() - mPointRadius, + mPoints[i][j].getY() - mPointRadius, mPaint); + } + } + } + } + + private void minitPoint(){ + /** + * 开始实例化九宫格中点 + */ + mPoints[0][0] = new Point(mScreenWidthOffSet + mScreenWidth / 4, + mScreenHeightOffSet + mScreenHeight / 4); + mPoints[0][1] = new Point(mScreenWidthOffSet + mScreenWidth / 2, + mScreenHeightOffSet + mScreenHeight / 4); + mPoints[0][2] = new Point(mScreenWidthOffSet + mScreenWidth * 3 / 4, + mScreenHeightOffSet + mScreenHeight / 4); + + mPoints[1][0] = new Point(mScreenWidthOffSet + mScreenWidth / 4, + mScreenHeightOffSet + mScreenHeight / 2); + mPoints[1][1] = new Point(mScreenWidthOffSet + mScreenWidth / 2, + mScreenHeightOffSet + mScreenHeight / 2); + mPoints[1][2] = new Point(mScreenWidthOffSet + mScreenWidth * 3 / 4, + mScreenHeightOffSet + mScreenHeight / 2); + + mPoints[2][0] = new Point(mScreenWidthOffSet + mScreenWidth / 4, + mScreenHeightOffSet + mScreenHeight * 3 / 4); + mPoints[2][1] = new Point(mScreenWidthOffSet + mScreenWidth / 2, + mScreenHeightOffSet + mScreenHeight * 3 / 4); + mPoints[2][2] = new Point(mScreenWidthOffSet + mScreenWidth * 3 / 4, + mScreenHeightOffSet + mScreenHeight * 3 / 4); + + + // 设置九宫格中的各个index + int index = 1; + for (int i = 0; i < mPoints.length; i++) { + for (int j = 0; j < mPoints[i].length; j++) { + mPoints[i][j].setIndex(index + ""); + // 在没有任何操作的情况下默認点的状态 + mPoints[i][j].setState(Point.BITMAP_NORMAL); + index++; + } + } + } + + /** + * 实例化九宫格中所有点和所有的资源图片 + */ + private void initPoint() { + // 获取View的宽高 + mScreenWidth = getWidth(); + mScreenHeight = getHeight(); + if (mScreenHeight > mScreenWidth) { + // 获取y轴上的偏移量 + mScreenHeightOffSet = (mScreenHeight - mScreenWidth) / 2; + // 将屏幕高的变量设置成与宽相等,目的是为了new Point(x,y)时方便操作 + mScreenHeight = mScreenWidth; + } else { + // 获取x轴上的偏移量 + mScreenWidthOffSet = (mScreenWidth - mScreenHeight) / 2; + // 将屏幕宽的变量设置成与高相等,目的是为了new Point(x,y)时方便操作 + mScreenWidth = mScreenHeight; + } + + /** + * 实例化所有的资源图片 + */ + mBitmapError = BitmapFactory.decodeResource(getResources(), R.drawable.bitmap_error); + mBitmapNormal = BitmapFactory.decodeResource(getResources(), R.drawable.bitmap_normal); + mBitmapPressed = BitmapFactory.decodeResource(getResources(), R.drawable.bitmap_pressed); + mLineError = BitmapFactory.decodeResource(getResources(), R.drawable.line_error); + mLinePressed = BitmapFactory.decodeResource(getResources(), R.drawable.line_pressed); + + mPointRadius = mBitmapNormal.getWidth() / 2; + mLineHeight = mLinePressed.getHeight(); + + /** + * 开始实例化九宫格中点 + */ + mPoints[0][0] = new Point(mScreenWidthOffSet + mScreenWidth / 4, + mScreenHeightOffSet + mScreenHeight / 4); + mPoints[0][1] = new Point(mScreenWidthOffSet + mScreenWidth / 2, + mScreenHeightOffSet + mScreenHeight / 4); + mPoints[0][2] = new Point(mScreenWidthOffSet + mScreenWidth * 3 / 4, + mScreenHeightOffSet + mScreenHeight / 4); + + mPoints[1][0] = new Point(mScreenWidthOffSet + mScreenWidth / 4, + mScreenHeightOffSet + mScreenHeight / 2); + mPoints[1][1] = new Point(mScreenWidthOffSet + mScreenWidth / 2, + mScreenHeightOffSet + mScreenHeight / 2); + mPoints[1][2] = new Point(mScreenWidthOffSet + mScreenWidth * 3 / 4, + mScreenHeightOffSet + mScreenHeight / 2); + + mPoints[2][0] = new Point(mScreenWidthOffSet + mScreenWidth / 4, + mScreenHeightOffSet + mScreenHeight * 3 / 4); + mPoints[2][1] = new Point(mScreenWidthOffSet + mScreenWidth / 2, + mScreenHeightOffSet + mScreenHeight * 3 / 4); + mPoints[2][2] = new Point(mScreenWidthOffSet + mScreenWidth * 3 / 4, + mScreenHeightOffSet + mScreenHeight * 3 / 4); + + + // 设置九宫格中的各个index + int index = 1; + for (int i = 0; i < mPoints.length; i++) { + for (int j = 0; j < mPoints[i].length; j++) { + mPoints[i][j].setIndex(index + ""); + // 在没有任何操作的情况下默認点的状态 + mPoints[i][j].setState(Point.BITMAP_NORMAL); + index++; + } + } + + // 将isInitPoint设置为true + isInitPoint = true; + } + + public interface OnLockListener { + public void getStringPassword(String password); + + public boolean isPassword(); + } + + + public void setLockListener(OnLockListener listener) { + this.mListener = listener; + } + +} + diff --git a/src/java/net/micode/notes/ui/NoteEditActivity.java b/src/java/net/micode/notes/ui/NoteEditActivity.java index 821ddc26..5f1658ab 100644 --- a/src/java/net/micode/notes/ui/NoteEditActivity.java +++ b/src/java/net/micode/notes/ui/NoteEditActivity.java @@ -523,6 +523,12 @@ public class NoteEditActivity extends Activity implements OnClickListener, } else { menu.findItem(R.id.menu_delete_remind).setVisible(false); } + //如果一设置密码,显示删除密码选项,否则,显示设置密码选项 + if (mWorkingNote.hasPasscode()) { + menu.findItem(R.id.menu_set_passcode).setVisible(false); + } else { + menu.findItem(R.id.menu_delete_passcode).setVisible(false); + } return true; } @@ -534,15 +540,20 @@ public class NoteEditActivity extends Activity implements OnClickListener, break; case R.id.menu_set_top: mWorkingNote.setTop((mWorkingNote.getTopId())==1 ? "0" : "1"); - finish(); break; case R.id.menu_cancel_top: mWorkingNote.setTop((mWorkingNote.getTopId())==0 ? "1" : "0"); - finish(); break; case R.id.menu_set_star: mWorkingNote.setStar(mWorkingNote.getStarId()==1? "0" : "1"); - finish(); + break; + //设置密码 + case R.id.menu_set_passcode: + setPasscode(); + break; + //删除密码 + case R.id.menu_delete_passcode: + deletePasscode(); break; case R.id.menu_delete: AlertDialog.Builder builder = new AlertDialog.Builder(this); @@ -658,9 +669,7 @@ public class NoteEditActivity extends Activity implements OnClickListener, * User could set clock to an unsaved note, so before setting the * alert clock, we should save the note first */ - if (!mWorkingNote.existInDatabase()) { - saveNote(); - } + saveNote(); if (mWorkingNote.getNoteId() > 0) { showTopHeader(); } else { @@ -679,9 +688,7 @@ public class NoteEditActivity extends Activity implements OnClickListener, * User could set clock to an unsaved note, so before setting the * alert clock, we should save the note first */ - if (!mWorkingNote.existInDatabase()) { - saveNote(); - } + saveNote(); } public void onClockAlertChanged(long date, boolean set) { @@ -893,6 +900,29 @@ public class NoteEditActivity extends Activity implements OnClickListener, return saved; } + /** + * 弹出设置密码界面 + */ + private void setPasscode() { + //确保笔记已写入数据库 + saveNote(); + //初始化一个新的意图,用以跳转至设置密码界面 + Intent intent = new Intent(this,SetLockActivity.class); + //给意图传入当前便签的id参数,便于从设置密码活动中跳转回编辑便签活动 + intent.putExtra(Intent.EXTRA_UID, mWorkingNote.getNoteId()); + startActivity(intent); + finish(); + } + + /** + * 删除便签密码 + */ + private void deletePasscode() { + mWorkingNote.setPasscode(""); + saveNote(); + Toast.makeText(NoteEditActivity.this,R.string.note_passcode_deleted,Toast.LENGTH_SHORT).show(); + } + private void sendToDesktop() { /** * Before send message to home, we should make sure that current diff --git a/src/java/net/micode/notes/ui/NoteItemData.java b/src/java/net/micode/notes/ui/NoteItemData.java index a9a90702..ac063721 100644 --- a/src/java/net/micode/notes/ui/NoteItemData.java +++ b/src/java/net/micode/notes/ui/NoteItemData.java @@ -42,6 +42,7 @@ public class NoteItemData { NoteColumns.WIDGET_TYPE, NoteColumns.TOP, NoteColumns.STAR, + NoteColumns.PASSCODE, }; private static final int ID_COLUMN = 0; @@ -58,6 +59,7 @@ public class NoteItemData { private static final int WIDGET_TYPE_COLUMN = 11; private static final int TOP_ID_COLUMN = 12; private static final int STAR_ID_COLUMN = 13; + private static final int PASSCODE_COLUMN = 14; private long mId; private long mAlertDate; @@ -75,6 +77,7 @@ public class NoteItemData { private String mPhoneNumber; private String mTop; private String mStar; + private String mPasscode; private boolean mIsLastItem; private boolean mIsFirstItem; @@ -99,6 +102,7 @@ public class NoteItemData { mWidgetType = cursor.getInt(WIDGET_TYPE_COLUMN); mTop = cursor.getString(TOP_ID_COLUMN); mStar = cursor.getString(STAR_ID_COLUMN); + mPasscode = cursor.getString(PASSCODE_COLUMN); mPhoneNumber = ""; if (mParentId == Notes.ID_CALL_RECORD_FOLDER) { @@ -186,6 +190,8 @@ public class NoteItemData { return mId; } + public boolean hasLock() { return !mPasscode.equals(""); } + public long getAlertDate() { return mAlertDate; } diff --git a/src/java/net/micode/notes/ui/NotesListItem.java b/src/java/net/micode/notes/ui/NotesListItem.java index f4691cb4..ea55907c 100644 --- a/src/java/net/micode/notes/ui/NotesListItem.java +++ b/src/java/net/micode/notes/ui/NotesListItem.java @@ -39,6 +39,7 @@ public class NotesListItem extends LinearLayout { private CheckBox mCheckBox; private ImageView mTop; private ImageView mStar; + private ImageView mLock; public NotesListItem(Context context) { super(context); @@ -50,6 +51,7 @@ public class NotesListItem extends LinearLayout { mCheckBox = (CheckBox) findViewById(android.R.id.checkbox); mTop = (ImageView) findViewById(R.id.iv_top_icon); mStar =(ImageView) findViewById(R.id.iv_star_icon); + mLock = (ImageView) findViewById(R.id.iv_lock); } public void bind(Context context, NoteItemData data, boolean choiceMode, boolean checked) { @@ -107,6 +109,14 @@ public class NotesListItem extends LinearLayout { } else{ mStar.setVisibility(View.GONE); } + if (data.hasLock()) { + mLock.setImageResource(R.drawable.lock); + mLock.setVisibility(View.VISIBLE); + String text = "已加密"; + mTitle.setText(text); + } else { + mLock.setVisibility(View.GONE); + } } mTime.setText(DateUtils.getRelativeTimeSpanString(data.getModifiedDate())); diff --git a/src/java/net/micode/notes/ui/SetLockActivity.java b/src/java/net/micode/notes/ui/SetLockActivity.java new file mode 100644 index 00000000..a45109f7 --- /dev/null +++ b/src/java/net/micode/notes/ui/SetLockActivity.java @@ -0,0 +1,95 @@ +package net.micode.notes.ui; + + +import android.content.Intent; +import android.os.Bundle; +import androidx.appcompat.app.AppCompatActivity; +import android.view.View; +import android.widget.Button; +import android.widget.TextView; +import android.widget.Toast; + +import net.micode.notes.model.WorkingNote; +import net.micode.notes.R; +import net.micode.notes.ui.LockPatternView; + +public class SetLockActivity extends AppCompatActivity { + + private TextView mTitleTv; + private LockPatternView mLockPatternView; + // private LinearLayout mBottomLayout; + private Button mClearBtn; +// private Button mConfirmBtn; + + private String mPassword; + /** + * 是否是第一次输入密码 + */ + private boolean isFirst = true; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_set_lock); + + initViews(); + initEvents(); + } + + private void initEvents() { + 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)) { + Intent pre = getIntent(); + //将密码写入数据库 + long noteId = pre.getLongExtra(Intent.EXTRA_UID, 0); + WorkingNote mWorkingNote = WorkingNote.load(SetLockActivity.this,noteId); + mWorkingNote.setPasscode(password); + boolean saved = mWorkingNote.saveNote();//保存便签 + Intent intent = new Intent(SetLockActivity.this, NoteEditActivity.class); + intent.setAction(Intent.ACTION_VIEW); + intent.putExtra("lock",0); + intent.putExtra(Intent.EXTRA_UID, noteId); + startActivity(intent); + SetLockActivity.this.finish(); + }else { + Toast.makeText(SetLockActivity.this,"两次密码不一致,请重新设置",Toast.LENGTH_SHORT).show(); + mPassword = ""; + mTitleTv.setText("设置手势密码"); + isFirst = true; + 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 initViews() { + mTitleTv = (TextView) findViewById(R.id.tv_activity_set_lock_title); + mLockPatternView = (LockPatternView) findViewById(R.id.lockView); + mClearBtn = (Button) findViewById(R.id.btn_password_clear); + } +} diff --git a/src/java/net/micode/notes/ui/UnlockActivity.java b/src/java/net/micode/notes/ui/UnlockActivity.java new file mode 100644 index 00000000..4ff18475 --- /dev/null +++ b/src/java/net/micode/notes/ui/UnlockActivity.java @@ -0,0 +1,56 @@ +package net.micode.notes.ui; + + +import android.content.Intent; +import android.os.Bundle; +import androidx.appcompat.app.AppCompatActivity; +import android.widget.Toast; + +import net.micode.notes.model.WorkingNote; +import net.micode.notes.R; +import net.micode.notes.ui.LockPatternView; + +public class UnlockActivity extends AppCompatActivity { + + private LockPatternView mLockPatternView; + private String mPasswordStr; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_lock); + + mLockPatternView = (LockPatternView) findViewById(R.id.lockView); + Intent pre = getIntent(); + final Long noteId = pre.getLongExtra(Intent.EXTRA_UID, 0); + + mLockPatternView.setLockListener(new LockPatternView.OnLockListener() { + WorkingNote mWorkingNote = WorkingNote.load(UnlockActivity.this,noteId); + String password = mWorkingNote.getPasscode(); + @Override + public void getStringPassword(String password) { + mPasswordStr = password; + } + + @Override + public boolean isPassword() { + if (mPasswordStr.equals(password)) { + Toast.makeText(UnlockActivity.this, "密码正确", Toast.LENGTH_SHORT).show(); + Intent intent = new Intent(UnlockActivity.this, NoteEditActivity.class); + intent.setAction(Intent.ACTION_VIEW); + intent.putExtra("lock",0); + intent.putExtra(Intent.EXTRA_UID, noteId); + startActivity(intent); + UnlockActivity.this.finish(); + //TODO comment or not + //return true; + } else { + Toast.makeText(UnlockActivity.this, "密码不正确", Toast.LENGTH_SHORT).show(); + } + return false; + } + }); + + } + +} diff --git a/src/res/color/primary_text_dark.xml b/src/res/color/primary_text_dark.xml index 7c854599..8ad98e31 100644 --- a/src/res/color/primary_text_dark.xml +++ b/src/res/color/primary_text_dark.xml @@ -1,4 +1,4 @@ - + }Q+yMak6Lbkf5@ zvp}SVHow$K=}ofnS;bBJo5tJ>*RRKK62;0n_FcfLXR?Ipj0tPB-#qI#%wVtR7 zfMLvo1`@YIV&kO*5v|wr4^<>(&Z+8Hs{}A((6YCE!;>S-Nyfjz4T5m_eR?;} zHG^E2Yr4rovMXL@uZOa-euoya1MBDMad50HgMfZlY~Etnhqdor)^rPr>pxvuV4{l0 zCHXN(u*H~MqdTKfd82VT3A95Y1a<^CwZ)^$#;)J&&$-#L51!R-gS997pQ=P$4J-{~ z9$kZ}or6>JKpHzh07b9;CYHEUB0oeC%+HGeXrLQC{C_-+d_^MnlMvW_Fv?Xy7$ZY) zQFYeshTz(LCxUAx0zxBQ7-73#!nnK(^%wLESWwle9gNluP9#mUYFCpv$Kl1>Dg?88 zQYd4ytfpnd?x?XVrAyCjW-PQwTDKCSs%r#BsYH_=j|eyWucZVz+%Zt!7k(6wWGq8H z!@3*#QUTVvZ(_bUAwyp#Z2{762B87_G0tNqt*j@;s~A*JII)f9KLu|4aQ3doA#1bB znsGz~cwXTXa?JqIrjnRoT6I!-^Q_jSd_KXD(0pEIIwLTw}@B(bs0 z_2n}gX)Y_#4HLDK30;hUYNxTLX{DLTcVX5yztX-opO-c>7%1)Dr}9Tjh`aB;uf(4<;o)8b=;5=mum@h)Zma@@$K6QrQR`KsBlo!$@ahVs| zUZ4~)5lzJgDx2fevP_}&ydq!qd{Rk^V~TSBQP&t^zhazTzE`hVm)t9~Mo+&^v_sXsN zJPznsFsV>LQV1h^d-u;-yW_!@ns#H#)U#79Zl+kf_U#SIkAkql&saa&@F;(bdNTA~ zh0zJSXnJ+P%%!fQ#p_#IR-5N48>>=jkg%tI5&_edZj>Vce)`vcbb9{rd9W2A6nTW< z=a5xok>7#*#{9(H#Lepw2I@?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;ic8XUChCSsdKJ5~`>y>9M)5zF{?82j&kX#}4E+B& J1LEIC{ueHO9oGN= literal 0 HcmV?d00001 diff --git a/src/res/drawable-hdpi/star.png b/src/res/drawable-hdpi/star.png new file mode 100644 index 0000000000000000000000000000000000000000..f72b66999ebbb43b3556906471c3b30e28050a0b GIT binary patch literal 1221 zcmV;$1UmbPP)Px(e@R3^RCr$PnoWosWf;f*&t&J#_9TcxshdgYX1kN!7JH~)px9MG1wRU6JrqT~ z$sY7ly|}cOp45vdNDmgOAnm~-DuO6T!A}UTLd>MQWwVnCu8X%8nn`9J32bCtlFU1K z-BotYI^fp7 zNNN)k1>j`GB`{L9>peAc04mnx!;IjYmT?30WKvs@*akS3xB%ez*5p4=Y6}tpP|8d^ zkRs#q_O%a)o|s#&e;M~tNCZH|66YCseuvpawjg!@l_~RXHt6S0llEaeGVk8}HqI@G zAAlv!G4Ns+ld*3>tN=z>{o_^bNtXmKpfGb&12pE6J zOqRh%3T~q)qgBTX`gsirlGbb1st4ly;78zezdUw zh&cVWkBheJJ=c$^C^5SZpq!h`Q4p*}Y3jc%V9L+b>R0=Tm5tdo0Hrwy^M;sa#_K)q z{hoa?aGn`&ZKS-_g(_~!nu?-R2C#C+o~fqEd4v5tGvxtH18Du610bR_(@o2aCK1*M zTm_73z+5H5D*Lot__KaRrG^xMtNU?_*EI7fqFJAD$N&y9a0ozFrMSLW{u`hwfE5t^ z7BH4guf9C<7dFFcbOo?tiMar{$iRG9l0kl-fRX_mpK-m8-$8nAz_3FIGv69q=n)uJ z2r}lS0JKEI20_-mG=O1(5XF2X0K)(ws`=KBILh!FZU-#36kf}mnv3BVvg zP&Ka%AV~;1%xeLV1O#2?wE>6|f==^V0ko1iR(ccQ+jjHeh`}2Lx3O1OjnHQS*+Q*f zfTXUAx~yJBcl~xx94VrqlA|4~4Zupyyw?xtM;%Rt<_K`7ea-tlR3{rofJ#Oj zW5OlXW}?J%5G)j~HNT4z(@CoZK-m(f2{;w8nIAyL68p`7h)#j%Xry@NSL|BjgGezQ z#99D2miQRJ3CU)PM6@)!UjJ&lzC1N?Gztg?zgut{uS(YJD$@d>l9jpvibOawyYBTo zDo%FtAq4)C#71bj36udaU^tf8>~RAWnek4c=6w=nT23zg82sRkZXjAW!3DRm?=%oZ z$-7gl44{%R?_#1~Iy6xP^ZRzKaZaT{CnKH)__aEY5zG&^^#EEv&v!0F4Mk00000NkvXXu0mjf3_C3K literal 0 HcmV?d00001 diff --git a/src/res/drawable/settings_launcher_background.xml b/src/res/drawable/settings_launcher_background.xml new file mode 100644 index 00000000..ca3826a4 --- /dev/null +++ b/src/res/drawable/settings_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/res/layout/activity_lock.xml b/src/res/layout/activity_lock.xml new file mode 100644 index 00000000..f26cd81e --- /dev/null +++ b/src/res/layout/activity_lock.xml @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/src/res/layout/activity_set_lock.xml b/src/res/layout/activity_set_lock.xml new file mode 100644 index 00000000..2d5f203f --- /dev/null +++ b/src/res/layout/activity_set_lock.xml @@ -0,0 +1,32 @@ + + + + + + + + +