From d49785212d203212b9316231eaca67671b6e0466 Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Wed, 10 Apr 2013 16:44:16 +0200 Subject: [PATCH] Correct showing/hiding of details screen list/empty text/loading progress. --- core/src/org/transdroid/core/gui/DetailsFragment.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/org/transdroid/core/gui/DetailsFragment.java b/core/src/org/transdroid/core/gui/DetailsFragment.java index 15250beb..a93834cb 100644 --- a/core/src/org/transdroid/core/gui/DetailsFragment.java +++ b/core/src/org/transdroid/core/gui/DetailsFragment.java @@ -75,8 +75,8 @@ public class DetailsFragment extends SherlockFragment { ((DetailsAdapter) detailsList.getAdapter()).updateTorrent(newTorrent); // Make the list (with details header) visible detailsList.setVisibility(View.VISIBLE); - emptyText.setVisibility(isLoadingTorrent? View.INVISIBLE: View.VISIBLE); - loadingProgress.setVisibility(!isLoadingTorrent? View.VISIBLE: View.INVISIBLE); + emptyText.setVisibility(View.GONE); + loadingProgress.setVisibility(View.GONE); // Also update the available actions in the action bar getActivity().supportInvalidateOptionsMenu(); } @@ -122,8 +122,9 @@ public class DetailsFragment extends SherlockFragment { */ public void clear() { detailsList.setAdapter(new DetailsAdapter(getActivity())); - detailsList.setVisibility(View.INVISIBLE); - emptyText.setVisibility(View.VISIBLE); + detailsList.setVisibility(View.GONE); + emptyText.setVisibility(!isLoadingTorrent? View.VISIBLE: View.GONE); + loadingProgress.setVisibility(isLoadingTorrent? View.VISIBLE: View.GONE); torrent = null; torrentDetails = null; torrentFiles = null;