app/src/main/java/com/adroitdevs/belanja/MainActivity.java
public void updateTaskAt(int position, String description) {
        try {
            Task t = (Task) mTaskAdapter.getItem(position);
            t.setDescription(description);
            sTasks.updateDocument(t);
            reloadTasksFromModel();
            Toast.makeText(MainActivity.this,
                    "Updated item : " + t.getDescription(),
                    Toast.LENGTH_SHORT).show();
        } catch (ConflictException e) {
            throw new RuntimeException(e);
        }
    }
// Update task at given location when update is confirmed.
Update task at given location when update is confirmed.
Update task at given location when update is confirmed .
public void updateTaskAt(int position, String description) {
        try {
            Task t = (Task) mTaskAdapter.getItem(position);
            t.setDescription(description);
            sTasks.updateDocument(t);
            reloadTasksFromModel();
            Toast.makeText(MainActivity.this,
                    "Updated item : " + t.getDescription(),
                    Toast.LENGTH_SHORT).show();
        } catch (ConflictException e) {
            throw new RuntimeException(e);
        }
    }
public void updateTaskAt ( int position , String description ) { try { Task t = ( Task ) mTaskAdapter . getItem ( position ) ; t . setDescription ( description ) ; sTasks . updateDocument ( t ) ; reloadTasksFromModel ( ) ; Toast . makeText ( MainActivity . this , "Updated item : " + t . getDescription ( ) , Toast . LENGTH_SHORT ) . show ( ) ; } catch ( ConflictException e ) { throw new RuntimeException ( e ) ; } }
Update task at given location when update is confirmed.
Update task at given location when update is confirmed .