[Android] Browsers: release breadcrumb adapter
Geoffrey Métais
git at videolan.org
Mon Apr 1 17:47:59 CEST 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Apr 1 17:47:34 2019 +0200| [78ec0c3ba7eb70bb0b5e5458d3883af547d8c2d5] | committer: Geoffrey Métais
Browsers: release breadcrumb adapter
> https://code.videolan.org/videolan/vlc-android/commit/78ec0c3ba7eb70bb0b5e5458d3883af547d8c2d5
---
.../src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java
index e1c902e6f..1501e0284 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java
@@ -98,7 +98,6 @@ public abstract class MediaBrowserFragment<T extends SortableModel> extends Frag
mSwipeRefreshLayout = view.findViewById(R.id.swipeLayout);
mSwipeRefreshLayout.setColorSchemeResources(R.color.orange700);
if (hasFAB()) mFabPlay = requireActivity().findViewById(R.id.fab);
- setBreadcrumb();
}
protected boolean hasFAB() {
@@ -110,9 +109,15 @@ public abstract class MediaBrowserFragment<T extends SortableModel> extends Frag
if (ariane != null) ariane.setVisibility(View.GONE);
}
+ protected void releaseBreadCrumb() {
+ final RecyclerView ariane = requireActivity().findViewById(R.id.ariane);
+ if (ariane != null) ariane.setAdapter(null);
+ }
+
@Override
public void onStart() {
super.onStart();
+ setBreadcrumb();
updateActionBar();
if (mFabPlay != null) {
setFabPlayVisibility(true);
@@ -131,6 +136,7 @@ public abstract class MediaBrowserFragment<T extends SortableModel> extends Frag
@Override
public void onStop() {
super.onStop();
+ releaseBreadCrumb();
setFabPlayVisibility(false);
restart = true;
}
More information about the Android
mailing list