app/src/main/java/com/adroitdevs/belanja/MainActivity.java
private void deleteTaskAt(int position) {
        try {
            Task t = (Task) mTaskAdapter.getItem(position);
            sTasks.deleteDocument(t);
            mTaskAdapter.remove(position);
            Toast.makeText(MainActivity.this,
                    "Deleted item : " + t.getDescription(),
                    Toast.LENGTH_SHORT).show();
        } catch (ConflictException e) {
            throw new RuntimeException(e);
        }
    }
// Delete task at given location when delete is pressed.
Delete task at given location when delete is pressed.
Delete task at given location when delete is pressed .
private void deleteTaskAt(int position) {
        try {
            Task t = (Task) mTaskAdapter.getItem(position);
            sTasks.deleteDocument(t);
            mTaskAdapter.remove(position);
            Toast.makeText(MainActivity.this,
                    "Deleted item : " + t.getDescription(),
                    Toast.LENGTH_SHORT).show();
        } catch (ConflictException e) {
            throw new RuntimeException(e);
        }
    }
private void deleteTaskAt ( int position ) { try { Task t = ( Task ) mTaskAdapter . getItem ( position ) ; sTasks . deleteDocument ( t ) ; mTaskAdapter . remove ( position ) ; Toast . makeText ( MainActivity . this , "Deleted item : " + t . getDescription ( ) , Toast . LENGTH_SHORT ) . show ( ) ; } catch ( ConflictException e ) { throw new RuntimeException ( e ) ; } }
Delete task at given location when delete is pressed.
Delete task at given location when delete is pressed .