|
|
|
|
@ -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
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|
@ -169,6 +171,36 @@ public class Notes {
|
|
|
|
|
* <P> Type : INTEGER (long) </P>
|
|
|
|
|
*/
|
|
|
|
|
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");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|