From ab41e8045b7784f411114910693043e6b4405c9b Mon Sep 17 00:00:00 2001 From: GenshinGanyu <1437099831@qq.com> Date: Fri, 14 Apr 2023 14:30:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E5=AF=B9Notes?= =?UTF-8?q?=E7=B1=BB=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/net/micode/notes/data/Notes.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/net/micode/notes/data/Notes.java b/app/src/main/java/net/micode/notes/data/Notes.java index 87e60c3..af04c10 100644 --- a/app/src/main/java/net/micode/notes/data/Notes.java +++ b/app/src/main/java/net/micode/notes/data/Notes.java @@ -67,6 +67,9 @@ public class Notes { */ public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data"); + /** + * 定义了NoteColumns中的常量,将用于后面创建数据库的表头 + */ public interface NoteColumns { /** * The unique ID for a row @@ -172,6 +175,9 @@ public class Notes { */ public static final String VERSION = "version"; } + /** + * 以上这些常量主要是用于定义便签的属性 + */ public interface DataColumns { /** @@ -245,7 +251,9 @@ public class Notes { *

Type: TEXT

*/ public static final String DATA5 = "data5"; - } + }/** + * 以上DATA主要是定义存储便签内容数据 + */ public static final class TextNote implements DataColumns { /** @@ -261,7 +269,9 @@ public class Notes { public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/text_note"; public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note"); - } + }/** + * 文本内容的数据结构 + */ public static final class CallNote implements DataColumns { /** @@ -281,5 +291,7 @@ public class Notes { public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/call_note"; public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/call_note"); - } + }/** + * 电话内容的数据结构 + */ }