use of org.odk.collect.android.views.DayNightProgressDialog 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