@Override public void onItemMoved(final int originalPosition, final int newPosition) { ArrayList<Set> swapped = swapSets((ArrayList<Set>) mAdapter.getItems(), originalPosition, newPosition); updateDBSet(swapped); mAdapter.notifyDataSetChanged(); }
@Override public void onItemClick( final AdapterView<?> parent, final View view, final int position, final long id) { EditSetDialogFragment dialog = new EditSetDialogFragment(); Bundle arg = new Bundle(); arg.putLong(EditSetDialogFragment.ARG_SET_ID, ((Set) mAdapter.getItem(position)).getId()); dialog.setArguments(arg); dialog.setmAdapter(mAdapter); dialog.show(getActivity().getSupportFragmentManager(), "TAG"); }