From 2c5fd752177e0d662164f5747268984f71187b9c Mon Sep 17 00:00:00 2001 From: gy <2293314358@qq.com> Date: Fri, 30 Jan 2026 19:08:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E5=AE=9A=E4=B9=89=E4=BB=A5=E9=80=82=E5=BA=94?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/net/micode/notes/data/Notes.java | 49 +++++++++++++++++-- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/src/Notes-master/src/net/micode/notes/data/Notes.java b/src/Notes-master/src/net/micode/notes/data/Notes.java index 296d7cb..0ee1e98 100644 --- a/src/Notes-master/src/net/micode/notes/data/Notes.java +++ b/src/Notes-master/src/net/micode/notes/data/Notes.java @@ -17,10 +17,6 @@ package net.micode.notes.data; import android.net.Uri; -/** - * 笔记应用的核心配置类,定义了所有常量、数据类型和URI - * 包含笔记和文件夹的类型定义、系统文件夹ID、Intent额外参数、数据库列名等 - */ public class Notes { public static final String AUTHORITY = "micode_notes"; public static final String TAG = "Notes"; @@ -103,6 +99,12 @@ public class Notes { */ public static final String SNIPPET = "snippet"; + /** + * 新增:便签标题 + * Type: TEXT + */ + public static final String TITLE = "title"; + /** * Note's widget id *
Type: INTEGER (long)
@@ -169,6 +171,36 @@ public class Notes { *Type : INTEGER (long)
*/ public static final String VERSION = "version"; + + /** + * 新增:是否置顶 (0-普通, 1-置顶) + * Type: INTEGER + */ + public static final String IS_PINNED = "is_pinned"; + + /** + * 新增:是否私密 (0-公开, 1-私密) + * Type: INTEGER + */ + public static final String IS_PRIVATE = "is_private"; + + /** + * 新增:视图模式 (0-列表, 1-瀑布流) + * Type: INTEGER + */ + public static final String VIEW_MODE = "view_mode"; + + /** + * 新增:自定义背景图片URI + * Type: TEXT + */ + public static final String CUSTOM_BG_URI = "custom_bg_uri"; + + /** + * 新增:扩展字段1 (预留) + * Type: TEXT + */ + public static final String EXPAND_1 = "expand_1"; } public interface DataColumns { @@ -280,4 +312,13 @@ public class Notes { public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/call_note"); } + + public static final class ImageNote implements DataColumns { + // 借用 CONTENT 字段存储图片的 URI 字符串 + public static final String IMAGE_URI = CONTENT; + + public static final String CONTENT_TYPE = "vnd.android.cursor.dir/image_note"; + public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/image_note"; + public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/image_note"); + } } -- 2.34.1