How to remove a crime and update the adapter without returning to the list of crimes?
public class CrimeFragment extends Fragment { @Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.fragment_crime, menu);
}
I think, you are removing the crime by the following code. CrimeLab.get(getActivity()).deleteCrime(mCrime);
Then the database remains to updated.
you can create updateCrime() method in CrimeLab.