cnz 3 months ago
parent 175b8cc51a
commit 0043f8dc7c

@ -45,25 +45,25 @@ public class Notes {//定义了三种类型常量:普通笔记、文件夹和
public static final String INTENT_EXTRA_FOLDER_ID = "net.micode.notes.folder_id";
public static final String INTENT_EXTRA_CALL_DATE = "net.micode.notes.call_date";
//定义了笔记小部件的类型常量
public static final int TYPE_WIDGET_INVALIDE = -1;
public static final int TYPE_WIDGET_2X = 0;
public static final int TYPE_WIDGET_4X = 1;
//定义了数据类型常量,包括普通笔记和通话笔记
public static class DataConstants {
public static final String NOTE = TextNote.CONTENT_ITEM_TYPE;
public static final String CALL_NOTE = CallNote.CONTENT_ITEM_TYPE;
}
//定义了访问笔记和数据的ContentProvider URI
/**
* Uri to query all notes and folders
*/
public static final Uri CONTENT_NOTE_URI = Uri.parse("content://" + AUTHORITY + "/note");
/**
* Uri to query data
*/
public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data");
//定义了笔记表的列名常量包括ID、父ID、创建日期、修改日期等
public interface NoteColumns {
/**
* The unique ID for a row
@ -170,6 +170,7 @@ public class Notes {//定义了三种类型常量:普通笔记、文件夹和
public static final String VERSION = "version";
}
//定义了数据表的列名常量包括ID、MIME类型、笔记ID等
public interface DataColumns {
/**
* The unique ID for a row
@ -244,6 +245,7 @@ public class Notes {//定义了三种类型常量:普通笔记、文件夹和
public static final String DATA5 = "data5";
}
//表示文本笔记的数据结构,定义了检查列表模式和内容类型
public static final class TextNote implements DataColumns {
/**
* Mode to indicate the text in check list mode or not
@ -260,6 +262,7 @@ public class Notes {//定义了三种类型常量:普通笔记、文件夹和
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note");
}
//表示通话笔记的数据结构,定义了通话日期和电话号码字段
public static final class CallNote implements DataColumns {
/**
* Call date for this record

Loading…
Cancel
Save