|
|
|
|
@ -67,6 +67,7 @@ import net.micode.notes.gtask.remote.GTaskSyncService;
|
|
|
|
|
import net.micode.notes.model.WorkingNote;
|
|
|
|
|
import net.micode.notes.tool.BackupUtils;
|
|
|
|
|
import net.micode.notes.tool.DataUtils;
|
|
|
|
|
import net.micode.notes.tool.ElderModeUtils;
|
|
|
|
|
import net.micode.notes.tool.ResourceParser;
|
|
|
|
|
import net.micode.notes.ui.NotesListAdapter.AppWidgetAttribute;
|
|
|
|
|
import net.micode.notes.widget.NoteWidgetProvider_2x;
|
|
|
|
|
@ -227,6 +228,13 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
// 启动异步查询笔记列表
|
|
|
|
|
startAsyncNotesListQuery();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void onResume() {
|
|
|
|
|
super.onResume();
|
|
|
|
|
// 每次恢复时应用老年人模式
|
|
|
|
|
ElderModeUtils.applyElderMode(this, findViewById(android.R.id.content));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 初始化资源
|
|
|
|
|
@ -252,6 +260,9 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
mTitleBar = (TextView) findViewById(R.id.tv_title_bar);
|
|
|
|
|
mState = ListEditState.NOTE_LIST; // 初始状态为普通笔记列表
|
|
|
|
|
mModeCallBack = new ModeCallback(); // 多选模式回调
|
|
|
|
|
|
|
|
|
|
// 应用老年人模式
|
|
|
|
|
ElderModeUtils.applyElderMode(this, findViewById(android.R.id.content));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -551,7 +562,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
} else {
|
|
|
|
|
// 同步模式下将笔记移动到回收站
|
|
|
|
|
if (!DataUtils.batchMoveToFolder(mContentResolver, mNotesListAdapter
|
|
|
|
|
.getSelectedItemIds(), Notes.ID_TRASH_FOLER)) {
|
|
|
|
|
.getSelectedItemIds(), Notes.ID_TRASH_FOLDER)) {
|
|
|
|
|
Log.e(TAG, "Move notes to trash folder error, should not happens");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -593,7 +604,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
DataUtils.batchDeleteNotes(mContentResolver, ids);
|
|
|
|
|
} else {
|
|
|
|
|
// 同步模式下将文件夹移动到回收站
|
|
|
|
|
DataUtils.batchMoveToFolder(mContentResolver, ids, Notes.ID_TRASH_FOLER);
|
|
|
|
|
DataUtils.batchMoveToFolder(mContentResolver, ids, Notes.ID_TRASH_FOLDER);
|
|
|
|
|
}
|
|
|
|
|
// 更新相关小部件
|
|
|
|
|
if (widgets != null) {
|
|
|
|
|
@ -1049,7 +1060,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
selection,
|
|
|
|
|
new String[] {
|
|
|
|
|
String.valueOf(Notes.TYPE_FOLDER),
|
|
|
|
|
String.valueOf(Notes.ID_TRASH_FOLER),
|
|
|
|
|
String.valueOf(Notes.ID_TRASH_FOLDER),
|
|
|
|
|
String.valueOf(mCurrentFolderId)
|
|
|
|
|
},
|
|
|
|
|
NoteColumns.MODIFIED_DATE + " DESC");
|
|
|
|
|
@ -1074,4 +1085,4 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|