|
|
@ -17,6 +17,7 @@
|
|
|
|
package net.micode.notes.ui;
|
|
|
|
package net.micode.notes.ui;
|
|
|
|
|
|
|
|
|
|
|
|
import android.R.menu;
|
|
|
|
import android.R.menu;
|
|
|
|
|
|
|
|
import android.annotation.SuppressLint;
|
|
|
|
import android.app.Activity;
|
|
|
|
import android.app.Activity;
|
|
|
|
import android.app.AlertDialog;
|
|
|
|
import android.app.AlertDialog;
|
|
|
|
import android.app.Dialog;
|
|
|
|
import android.app.Dialog;
|
|
|
@ -158,6 +159,10 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 从raw资源文件中读取应用信息,保存到SharedPreferences中,
|
|
|
|
|
|
|
|
* 并在保存完成后将PREFERENCE_ADD_INTRODUCTION值设为true,以标识应用信息已经读取并保存。
|
|
|
|
|
|
|
|
*/
|
|
|
|
private void setAppInfoFromRawRes() {
|
|
|
|
private void setAppInfoFromRawRes() {
|
|
|
|
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
|
|
|
|
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
|
|
|
|
if (!sp.getBoolean(PREFERENCE_ADD_INTRODUCTION, false)) {
|
|
|
|
if (!sp.getBoolean(PREFERENCE_ADD_INTRODUCTION, false)) {
|
|
|
@ -233,6 +238,9 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
mModeCallBack = new ModeCallback();
|
|
|
|
mModeCallBack = new ModeCallback();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
*处理ListView的多选模式下的操作
|
|
|
|
|
|
|
|
*/
|
|
|
|
private class ModeCallback implements ListView.MultiChoiceModeListener, OnMenuItemClickListener {
|
|
|
|
private class ModeCallback implements ListView.MultiChoiceModeListener, OnMenuItemClickListener {
|
|
|
|
private DropdownMenu mDropDownMenu;
|
|
|
|
private DropdownMenu mDropDownMenu;
|
|
|
|
private ActionMode mActionMode;
|
|
|
|
private ActionMode mActionMode;
|
|
|
@ -498,6 +506,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
this.startActivityForResult(intent, REQUEST_CODE_NEW_NODE);
|
|
|
|
this.startActivityForResult(intent, REQUEST_CODE_NEW_NODE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressLint("StaticFieldLeak")
|
|
|
|
private void batchDelete() {
|
|
|
|
private void batchDelete() {
|
|
|
|
new AsyncTask<Void, Void, HashSet<AppWidgetAttribute>>() {
|
|
|
|
new AsyncTask<Void, Void, HashSet<AppWidgetAttribute>>() {
|
|
|
|
protected HashSet<AppWidgetAttribute> doInBackground(Void... unused) {
|
|
|
|
protected HashSet<AppWidgetAttribute> doInBackground(Void... unused) {
|
|
|
|