From f267d55d986d20d7d667ea18bfa4a4e4e5965101 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 5 Aug 2018 13:12:50 +0000 Subject: [PATCH] Added spinner to folder save Deleting messages can take some time --- .../main/java/eu/faircode/email/FragmentFolder.java | 5 +++++ app/src/main/res/layout/fragment_folder.xml | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentFolder.java b/app/src/main/java/eu/faircode/email/FragmentFolder.java index c3c1f331..16b39c05 100644 --- a/app/src/main/java/eu/faircode/email/FragmentFolder.java +++ b/app/src/main/java/eu/faircode/email/FragmentFolder.java @@ -43,6 +43,7 @@ public class FragmentFolder extends FragmentEx { private CheckBox cbSynchronize; private EditText etAfter; private Button btnOk; + private ProgressBar pbSave; private ProgressBar pbWait; private Group grpReady; @@ -60,6 +61,7 @@ public class FragmentFolder extends FragmentEx { // Get controls cbSynchronize = view.findViewById(R.id.cbSynchronize); etAfter = view.findViewById(R.id.etAfter); + pbSave = view.findViewById(R.id.pbSave); btnOk = view.findViewById(R.id.btnOk); pbWait = view.findViewById(R.id.pbWait); grpReady = view.findViewById(R.id.grpReady); @@ -68,6 +70,7 @@ public class FragmentFolder extends FragmentEx { @Override public void onClick(View v) { btnOk.setEnabled(false); + pbSave.setVisibility(View.VISIBLE); Bundle args = new Bundle(); args.putLong("id", id); @@ -79,6 +82,7 @@ public class FragmentFolder extends FragmentEx { }); // Initialize + pbSave.setVisibility(View.GONE); grpReady.setVisibility(View.GONE); pbWait.setVisibility(View.VISIBLE); @@ -152,6 +156,7 @@ public class FragmentFolder extends FragmentEx { getLoaderManager().destroyLoader(loader.getId()); btnOk.setEnabled(true); + pbSave.setVisibility(View.GONE); if (ex == null) getFragmentManager().popBackStack(); diff --git a/app/src/main/res/layout/fragment_folder.xml b/app/src/main/res/layout/fragment_folder.xml index 408ab688..16938e84 100644 --- a/app/src/main/res/layout/fragment_folder.xml +++ b/app/src/main/res/layout/fragment_folder.xml @@ -53,6 +53,17 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/etAfter" /> + +