|
|
|
@ -1,18 +1,4 @@
|
|
|
|
/*
|
|
|
|
|
|
|
|
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
|
|
|
|
* limitations under the License.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package net.micode.notes.widget;
|
|
|
|
package net.micode.notes.widget;
|
|
|
|
|
|
|
|
|
|
|
|
@ -38,11 +24,11 @@ import net.micode.notes.ui.NotesListActivity;
|
|
|
|
* 所有具体尺寸的小部件提供者都应继承此类
|
|
|
|
* 所有具体尺寸的小部件提供者都应继承此类
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public abstract class NoteWidgetProvider extends AppWidgetProvider {
|
|
|
|
public abstract class NoteWidgetProvider extends AppWidgetProvider {
|
|
|
|
// 查询笔记信息的投影,指定需要返回的列
|
|
|
|
|
|
|
|
public static final String [] PROJECTION = new String [] {
|
|
|
|
public static final String [] PROJECTION = new String [] {
|
|
|
|
NoteColumns.ID, // 笔记ID
|
|
|
|
NoteColumns.ID, // 笔记ID
|
|
|
|
NoteColumns.BG_COLOR_ID, // 背景颜色ID
|
|
|
|
NoteColumns.BG_COLOR_ID, // 背景颜色ID
|
|
|
|
NoteColumns.SNIPPET // 笔记摘要
|
|
|
|
NoteColumns.SNIPPET
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 投影列的索引位置,用于快速访问查询结果
|
|
|
|
// 投影列的索引位置,用于快速访问查询结果
|
|
|
|
|