use of org.odk.collect.android.tasks.DeleteInstancesTask in project collect by opendatakit.
the class DataManagerList method deleteSelectedInstances.
/**
* Deletes the selected files. Content provider handles removing the files
* from the filesystem.
*/
private void deleteSelectedInstances() {
if (deleteInstancesTask == null) {
progressDialog = new ProgressDialog(getContext());
progressDialog.setMessage(getResources().getString(R.string.form_delete_message));
progressDialog.setIndeterminate(true);
progressDialog.setCancelable(false);
progressDialog.show();
deleteInstancesTask = new DeleteInstancesTask();
deleteInstancesTask.setContentResolver(getActivity().getContentResolver());
deleteInstancesTask.setDeleteListener(this);
deleteInstancesTask.execute(getCheckedIdObjects());
} else {
ToastUtils.showLongToast(R.string.file_delete_in_progress);
}
}
use of org.odk.collect.android.tasks.DeleteInstancesTask in project collect by opendatakit.
the class SavedFormListFragment method deleteSelectedInstances.
/**
* Deletes the selected files. Content provider handles removing the files
* from the filesystem.
*/
private void deleteSelectedInstances() {
if (deleteInstancesTask == null) {
progressDialog = new DayNightProgressDialog(getContext());
progressDialog.setMessage(getResources().getString(R.string.form_delete_message));
progressDialog.setIndeterminate(true);
progressDialog.setCancelable(false);
progressDialog.show();
deleteInstancesTask = new DeleteInstancesTask(instancesRepositoryProvider.get(), formsRepositoryProvider.get());
deleteInstancesTask.setDeleteListener(this);
deleteInstancesTask.execute(getCheckedIdObjects());
} else {
ToastUtils.showLongToast(requireContext(), R.string.file_delete_in_progress);
}
}
Aggregations