.
Private void loadData () {
//if it is a new pattern, notebook will editText empty
If (editModel. Equals (" newAdd ")) {
Binding. AddNote. SetText (" ");
}
//if the editor is existing accounts, is to save the database data, and display in the EditText
Else if (editModel equals (" update ")) {
The binding. The title. The setText (" edit ");
The create_db ();
Cursor Cursor=notes. Query_db (item_Id);
Cursor. MoveToFirst (); .
Writing is a judgment of edit runtime of statements in newAdd that line called the null pointer errors ask god help
CodePudding user response:
No assignment editModelFor this kind of demand to determine whether editModel is empty, or change the order of the equals, with "newAdd" equals (editModel) and "update". The equals (editModel)