|
|
|
@ -78,6 +78,7 @@ import android.widget.Toast;
|
|
|
|
|
import net.micode.notes.R;
|
|
|
|
|
import net.micode.notes.data.Notes;
|
|
|
|
|
import net.micode.notes.data.Notes.TextNote;
|
|
|
|
|
import net.micode.notes.data.NotesDatabaseHelper;
|
|
|
|
|
import net.micode.notes.model.WorkingNote;
|
|
|
|
|
import net.micode.notes.model.WorkingNote.NoteSettingChangedListener;
|
|
|
|
|
import net.micode.notes.tool.DataUtils;
|
|
|
|
@ -250,7 +251,7 @@ public class NoteEditActivity extends AppCompatActivity implements OnClickListen
|
|
|
|
|
mWorkingNote = null;
|
|
|
|
|
if (TextUtils.equals(Intent.ACTION_VIEW, intent.getAction())) {
|
|
|
|
|
long noteId = intent.getLongExtra(Intent.EXTRA_UID, 0);
|
|
|
|
|
mUserQuery = "";
|
|
|
|
|
mUserQuery = "";//要高亮的字符串
|
|
|
|
|
//如果用户实例化标签时,系统并未给出标签ID
|
|
|
|
|
/**
|
|
|
|
|
* Starting from the searched result
|
|
|
|
@ -326,7 +327,14 @@ public class NoteEditActivity extends AppCompatActivity implements OnClickListen
|
|
|
|
|
getWindow().setSoftInputMode(
|
|
|
|
|
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
|
|
|
|
|
| WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
|
|
|
|
} else {
|
|
|
|
|
}else if (TextUtils.equals(Intent.ACTION_SEARCH,intent.getAction())){//点击搜索按钮响应
|
|
|
|
|
String querystring = intent.getStringExtra(SearchManager.QUERY);//获取搜索框的字符
|
|
|
|
|
NotesDatabaseHelper dbhelper = new NotesDatabaseHelper(this);
|
|
|
|
|
dbhelper.dosearch(querystring);
|
|
|
|
|
finish();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
Log.e(TAG, "Intent not specified action, should not support");
|
|
|
|
|
finish();
|
|
|
|
|
return false;
|
|
|
|
@ -603,7 +611,8 @@ public class NoteEditActivity extends AppCompatActivity implements OnClickListen
|
|
|
|
|
menu.findItem(R.id.menu_alert).setVisible(false);
|
|
|
|
|
} else {
|
|
|
|
|
menu.findItem(R.id.menu_delete_remind).setVisible(false);
|
|
|
|
|
}if (mWorkingNote.getTopId() == 1){
|
|
|
|
|
}
|
|
|
|
|
if (mWorkingNote.getTopId() == 1){
|
|
|
|
|
menu.findItem(R.id.menu_top).setTitle("Cancel top");
|
|
|
|
|
}else {
|
|
|
|
|
menu.findItem(R.id.menu_top).setTitle("Top");
|
|
|
|
@ -1471,5 +1480,4 @@ public class NoteEditActivity extends AppCompatActivity implements OnClickListen
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|