Merge pull request #5076 from ByteHamster/fix-miniplayer-state

Fixed miniplayer state sometimes being wrong
This commit is contained in:
ByteHamster 2021-04-02 17:08:46 +02:00 committed by GitHub
commit 7b49cab684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -166,10 +166,15 @@ public class MainActivity extends CastEnabledActivity {
outState.putInt(KEY_GENERATED_VIEW_ID, ViewCompat.generateViewId());
}
private BottomSheetBehavior.BottomSheetCallback bottomSheetCallback =
private final BottomSheetBehavior.BottomSheetCallback bottomSheetCallback =
new BottomSheetBehavior.BottomSheetCallback() {
@Override
public void onStateChanged(@NonNull View view, int state) {
if (state == BottomSheetBehavior.STATE_COLLAPSED) {
onSlide(view, 0.0f);
} else if (state == BottomSheetBehavior.STATE_EXPANDED) {
onSlide(view, 1.0f);
}
}
@Override