From 10f8a7df8eea60dc59d16a389b16001cbfa7965d Mon Sep 17 00:00:00 2001 From: eazzy <1044745821@qq.com> Date: Sun, 24 Dec 2023 16:46:53 +0800 Subject: [PATCH] code --- .../net/micode/notes/ui/NoteEditText.java | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/main/java/net/micode/notes/ui/NoteEditText.java b/src/main/java/net/micode/notes/ui/NoteEditText.java index d29d3d2..ec2eda6 100644 --- a/src/main/java/net/micode/notes/ui/NoteEditText.java +++ b/src/main/java/net/micode/notes/ui/NoteEditText.java @@ -46,12 +46,28 @@ import java.util.Map; * @Version: 1.0 */ public class NoteEditText extends EditText { +<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditText.java private static final String TAG = "NoteEditText"; private int mIndex; private int mSelectionStartBeforeDelete; private static final String SCHEME_TEL = "tel:" ; private static final String SCHEME_HTTP = "http:" ; private static final String SCHEME_EMAIL = "mailto:" ; +======== + //常量标识 + private static final String TAG = "NoteEditText"; + //声明整型变量,文本索引 + private int mIndex; + //声明整型变量 + private int mSelectionStartBeforeDelete; + + //声明字符串常量,标志电话、网址、邮件 + private static final String SCHEME_TEL = "tel:" ; + private static final String SCHEME_HTTP = "http:" ; + private static final String SCHEME_EMAIL = "mailto:" ; + + //设置映射,将文本内容(电话、网址、邮件)做链接处理 +>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditText.java private static final Map sSchemaActionResMap = new HashMap(); static { sSchemaActionResMap.put(SCHEME_TEL, R.string.note_link_tel); @@ -96,9 +112,13 @@ public class NoteEditText extends EditText { mIndex = 0; } +<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditText.java /** * 设置索引号 */ +======== + //设置索引号 +>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditText.java public void setIndex(int index) { mIndex = index; } @@ -124,6 +144,17 @@ public class NoteEditText extends EditText { // TODO Auto-generated constructor stub } +<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditText.java +======== + /** + * @method onTouchEvent + * @description 处理触摸事件,根据触摸点的位置设置光标的位置 + * @date: 12/21/2023 12:41 AM + * @author: YangYizhe + * @param + * @return + */ +>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditText.java @Override /** * @method onTouchEvent @@ -235,6 +266,17 @@ public class NoteEditText extends EditText { super.onFocusChanged(focused, direction, previouslyFocusedRect); } +<<<<<<<< HEAD:src/main/java/net/micode/notes/ui/NoteEditText.java +======== + /** + * @method onCreateContextMenu + * @description + * @date: 12/21/2023 12:39 AM + * @author: YangYizhe + * @param + * @return + */ +>>>>>>>> b654a61 (code):src/Notes/app/src/main/java/net/micode/notes/ui/NoteEditText.java @Override /** * @method onCreateContextMenu