[Android] Fix servers FAB visibility
Geoffrey Métais
git at videolan.org
Thu Jan 12 13:04:55 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan 12 11:35:08 2017 +0100| [bec807872858a49e6f658e7945640e4fd7c8ca5e] | committer: Geoffrey Métais
Fix servers FAB visibility
> https://code.videolan.org/videolan/vlc-android/commit/bec807872858a49e6f658e7945640e4fd7c8ca5e
---
.../src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java | 5 +++--
.../src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index 9a7c33d..237f611 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -169,7 +169,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
@Override
public void onStart() {
super.onStart();
- if (mFabPlay != null) {
+ if (!mRoot && mFabPlay != null) {
mFabPlay.setImageResource(R.drawable.ic_fab_play);
updateFab();
}
@@ -755,7 +755,8 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
mSavedPosition = 0;
}
}
- updateFab();
+ if (!mRoot)
+ updateFab();
}
private void updateFab() {
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 8fb8f60..41a5a3f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
@@ -75,6 +75,7 @@ public class NetworkBrowserFragment extends BaseBrowserFragment {
if (mRoot) {
mFabPlay.setImageResource(R.drawable.ic_fab_add);
mFabPlay.setOnClickListener(this);
+ setFabPlayVisibility(true);
}
}
@@ -88,7 +89,7 @@ public class NetworkBrowserFragment extends BaseBrowserFragment {
super.onStop();
getActivity().unregisterReceiver(networkReceiver);
if (mRoot) {
- mFabPlay.setVisibility(View.INVISIBLE);
+ setFabPlayVisibility(false);
mFabPlay.setOnClickListener(null);
}
}
More information about the Android
mailing list