Merge pull request #5076 from ByteHamster/fix-miniplayer-state
Fixed miniplayer state sometimes being wrong
This commit is contained in:
commit
7b49cab684
|
@ -166,10 +166,15 @@ public class MainActivity extends CastEnabledActivity {
|
||||||
outState.putInt(KEY_GENERATED_VIEW_ID, ViewCompat.generateViewId());
|
outState.putInt(KEY_GENERATED_VIEW_ID, ViewCompat.generateViewId());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BottomSheetBehavior.BottomSheetCallback bottomSheetCallback =
|
private final BottomSheetBehavior.BottomSheetCallback bottomSheetCallback =
|
||||||
new BottomSheetBehavior.BottomSheetCallback() {
|
new BottomSheetBehavior.BottomSheetCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onStateChanged(@NonNull View view, int state) {
|
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
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue