[Android] Improve Network browser empty view
Geoffrey Métais
git at videolan.org
Wed Feb 21 16:25:34 CET 2018
vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Feb 21 15:13:21 2018 +0100| [faa0bfbc319685a1948f1cdc566148c280c2e0ad] | committer: Geoffrey Métais
Improve Network browser empty view
Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>
> https://code.videolan.org/videolan/vlc-android/commit/faa0bfbc319685a1948f1cdc566148c280c2e0ad
---
.../src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
index b13bd7ea2..8532dd1cf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
@@ -80,8 +80,10 @@ public class NetworkBrowserFragment extends BaseBrowserFragment implements Exter
public void refresh() {
if (ExternalMonitor.isConnected())
super.refresh();
- else
+ else {
+ updateEmptyView();
mAdapter.clear();
+ }
}
@Override
@@ -186,12 +188,12 @@ public class NetworkBrowserFragment extends BaseBrowserFragment implements Exter
}
private void updateFavorites() {
+ updateEmptyView();
if (!ExternalMonitor.isConnected()) {
if (mFavorites != 0) {
mAdapter.clear();
mFavorites = 0;
}
- updateEmptyView();
return;
}
@@ -239,7 +241,6 @@ public class NetworkBrowserFragment extends BaseBrowserFragment implements Exter
mFavorites = newSize; //update count
if (newSize != 0)
mHandler.sendEmptyMessage(BrowserFragmentHandler.MSG_HIDE_LOADING);
- updateEmptyView();
}
public void toggleFavorite() {
More information about the Android
mailing list