app/src/main/java/com/example/steve/todoandroid/DBHelper.java
//updates list item according to position.
updates list item according to position.
updates list item according to position .
public boolean updateListItem(Integer pos, String listItem, String priority, String dueDate, boolean completed)
    {
        SQLiteDatabase db = this.getWritableDatabase();
        ContentValues contentValues = new ContentValues();
        contentValues.put("todo_list_item", listItem);
        contentValues.put("priority", priority);
        contentValues.put("due_date", dueDate);
        contentValues.put("status", completed);
        db.update("toDoListItems", contentValues, "cur_pos = ? ", new String[] { Integer.toString(pos) } );
        return true;
    }
public boolean updateListItem ( Integer pos , String listItem , String priority , String dueDate , boolean completed ) { SQLiteDatabase db = this . getWritableDatabase ( ) ; ContentValues contentValues = new ContentValues ( ) ; contentValues . put ( "todo_list_item" , listItem ) ; contentValues . put ( "priority" , priority ) ; contentValues . put ( "due_date" , dueDate ) ; contentValues . put ( "status" , completed ) ; db . update ( "toDoListItems" , contentValues , "cur_pos = ? " , new String [ ] { Integer . toString ( pos ) } ) ; return true ; }
updates list item according to position.
updates list item according to position .