[Android] Fix FAB visibility on network root level
Geoffrey Métais
git at videolan.org
Thu Feb 7 17:40:35 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 7 17:40:09 2019 +0100| [de4db076c0709b73d40011641c2973fde47c67af] | committer: Geoffrey Métais
Fix FAB visibility on network root level
> https://code.videolan.org/videolan/vlc-android/commit/de4db076c0709b73d40011641c2973fde47c67af
---
.../org/videolan/vlc/gui/browser/NetworkBrowserFragment.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 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 d65e96c87..5d4254fe9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
@@ -34,6 +34,7 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
+import org.jetbrains.annotations.NotNull;
import org.videolan.medialibrary.media.MediaWrapper;
import org.videolan.vlc.ExternalMonitor;
import org.videolan.vlc.R;
@@ -51,6 +52,7 @@ import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
+import androidx.recyclerview.widget.RecyclerView;
public class NetworkBrowserFragment extends BaseBrowserFragment {
@@ -129,8 +131,6 @@ public class NetworkBrowserFragment extends BaseBrowserFragment {
@Override
public void onStop() {
super.onStop();
- setFabPlayVisibility(false);
- mFabPlay.setOnClickListener(null);
if (!isRootDirectory()) LocalBroadcastManager.getInstance(VLCApplication.getAppContext()).unregisterReceiver(mLocalReceiver);
setGoBack(false);
}
@@ -213,4 +213,10 @@ public class NetworkBrowserFragment extends BaseBrowserFragment {
else setGoBack(true);
}
};
+
+ @Override
+ public void onUpdateFinished(@NotNull RecyclerView.Adapter<?> adapter) {
+ super.onUpdateFinished(adapter);
+ if (isRootDirectory()) mFabPlay.show();
+ }
}
More information about the Android
mailing list