From 8ed6d2d2ce3f9c7535acb4164adfc8e6890068cd Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 1 Feb 2020 21:23:22 +0100 Subject: [PATCH] Small behavior improvement --- .../main/java/eu/faircode/email/FragmentDialogFolder.java | 6 ++++-- app/src/main/res/layout/dialog_folder_select.xml | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogFolder.java b/app/src/main/java/eu/faircode/email/FragmentDialogFolder.java index 03d67b56c8..ce40c72f40 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogFolder.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogFolder.java @@ -34,6 +34,7 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; +import androidx.constraintlayout.widget.Group; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -57,6 +58,7 @@ public class FragmentDialogFolder extends FragmentDialogBase { final ImageButton ibNext = dview.findViewById(R.id.ibNext); final RecyclerView rvFolder = dview.findViewById(R.id.rvFolder); final ContentLoadingProgressBar pbWait = dview.findViewById(R.id.pbWait); + final Group grpReady = dview.findViewById(R.id.grpReady); rvFolder.setHasFixedSize(false); final LinearLayoutManager llm = new LinearLayoutManager(getContext()); @@ -115,7 +117,7 @@ public class FragmentDialogFolder extends FragmentDialogBase { @Override protected void onPreExecute(Bundle args) { tvNoFolder.setVisibility(View.GONE); - rvFolder.setVisibility(View.GONE); + grpReady.setVisibility(View.GONE); pbWait.setVisibility(View.VISIBLE); } @@ -139,7 +141,7 @@ public class FragmentDialogFolder extends FragmentDialogBase { else { adapter.setDisabled(Helper.fromLongArray(disabled)); adapter.set(folders); - rvFolder.setVisibility(View.VISIBLE); + grpReady.setVisibility(View.VISIBLE); } } diff --git a/app/src/main/res/layout/dialog_folder_select.xml b/app/src/main/res/layout/dialog_folder_select.xml index df933c30a8..da96d755d8 100644 --- a/app/src/main/res/layout/dialog_folder_select.xml +++ b/app/src/main/res/layout/dialog_folder_select.xml @@ -63,4 +63,10 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> + + \ No newline at end of file