博客目录
前言
介绍部分NotesPad的基本功能和额外添加的功能
一、NotesPad功能
Notespad是基于Android studio的一种功能,该工具是为了解决记录事件而创建的
代码
##1.NoteEditor的拓展活动:
代码如下:
public class NoteEditor extends Activity {
// For logging and debugging purposes
private static final String TAG = "NoteEditor"
/*
* Creates a projection that returns the note ID and the note contents.
*/
private static final String[] PROJECTION =
new String[] {
NotePad.Notes._ID,
NotePad.Notes.COLUMN_NAME_TITLE,
NotePad.Notes.COLUMN_NAME_NOTE
};
2.部分功能介绍
(1)Creates a projection that returns the note ID and the note contents:
代码如下:
public static class LinedEditText extends EditText {
private Rect mRect;
private Paint mPaint;
// This constructor is used by LayoutInflater
public LinedEditText(Context context, AttributeSet attrs) {
super(context, attrs);
// Creates a Rect and a Paint object, and sets the style and color of the Paint object.
mRect = new Rect();
mPaint =