More and less toast

This commit is contained in:
M66B
2022-04-28 10:57:13 +02:00
parent b4e9927d10
commit 25630cd063
11 changed files with 140 additions and 23 deletions

View File

@@ -152,9 +152,18 @@ public class FragmentOperations extends FragmentBase {
args.putBoolean("delete", cbDelete.isChecked());
new SimpleTask<Integer>() {
private Toast toast = null;
@Override
protected void onPostExecute(Bundle args) {
ToastEx.makeText(context, R.string.title_executing, Toast.LENGTH_LONG).show();
toast = ToastEx.makeText(context, R.string.title_executing, Toast.LENGTH_LONG);
toast.show();
}
@Override
protected void onPreExecute(Bundle args) {
if (toast != null)
toast.cancel();
}
@Override