@Override public boolean onLongClick(View view) { Toast toast = Toast.makeText(view.getContext(), "Result Deleted", Toast.LENGTH_SHORT); toast.setGravity(Gravity.CENTER, 0, 0); toast.show(); //get the listView position of this answer/query int position = getListView().getPositionForView((View) view.getParent()); //delete associated previous expression mResultArray.remove(position); mCallback.updateScreen(true); return false; } });
mCallback.selectUnitAtUnitArrayPos(unitPosPassBack, thisResult.getUnitTypeKey()); mCallback.updateScreen(false);