Merge pull request #8669 from Isira-Seneviratne/Remove_setBottomSheetCallback
Remove uses of setBottomSheetCallback().
This commit is contained in:
commit
24ec642181
1 changed files with 11 additions and 6 deletions
|
@ -191,6 +191,7 @@ public final class VideoDetailFragment
|
||||||
private Disposable positionSubscriber = null;
|
private Disposable positionSubscriber = null;
|
||||||
|
|
||||||
private BottomSheetBehavior<FrameLayout> bottomSheetBehavior;
|
private BottomSheetBehavior<FrameLayout> bottomSheetBehavior;
|
||||||
|
private BottomSheetBehavior.BottomSheetCallback bottomSheetCallback;
|
||||||
private BroadcastReceiver broadcastReceiver;
|
private BroadcastReceiver broadcastReceiver;
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
/*//////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -385,7 +386,7 @@ public final class VideoDetailFragment
|
||||||
disposables.clear();
|
disposables.clear();
|
||||||
positionSubscriber = null;
|
positionSubscriber = null;
|
||||||
currentWorker = null;
|
currentWorker = null;
|
||||||
bottomSheetBehavior.setBottomSheetCallback(null);
|
bottomSheetBehavior.removeBottomSheetCallback(bottomSheetCallback);
|
||||||
|
|
||||||
if (activity.isFinishing()) {
|
if (activity.isFinishing()) {
|
||||||
playQueue = null;
|
playQueue = null;
|
||||||
|
@ -2288,7 +2289,7 @@ public final class VideoDetailFragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomSheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
|
bottomSheetCallback = new BottomSheetBehavior.BottomSheetCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onStateChanged(@NonNull final View bottomSheet, final int newState) {
|
public void onStateChanged(@NonNull final View bottomSheet, final int newState) {
|
||||||
bottomSheetState = newState;
|
bottomSheetState = newState;
|
||||||
|
@ -2348,6 +2349,8 @@ public final class VideoDetailFragment
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case BottomSheetBehavior.STATE_HALF_EXPANDED:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2355,7 +2358,9 @@ public final class VideoDetailFragment
|
||||||
public void onSlide(@NonNull final View bottomSheet, final float slideOffset) {
|
public void onSlide(@NonNull final View bottomSheet, final float slideOffset) {
|
||||||
setOverlayLook(binding.appBarLayout, behavior, slideOffset);
|
setOverlayLook(binding.appBarLayout, behavior, slideOffset);
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
bottomSheetBehavior.addBottomSheetCallback(bottomSheetCallback);
|
||||||
|
|
||||||
// User opened a new page and the player will hide itself
|
// User opened a new page and the player will hide itself
|
||||||
activity.getSupportFragmentManager().addOnBackStackChangedListener(() -> {
|
activity.getSupportFragmentManager().addOnBackStackChangedListener(() -> {
|
||||||
|
|
Loading…
Reference in a new issue