diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2021-04-02 17:08:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 17:08:46 +0200 |
commit | 7b49cab6846ffcb95bf753b303d92aa7a762bbc5 (patch) | |
tree | e144e34b23e717d836d761bcb8bafd1349fa11d2 | |
parent | 843892e34fb2ca04bf3f5b0f6fce7e45285e0ecd (diff) | |
parent | c6c509946fd5bfeed50c78d921218a0b8ac1fc30 (diff) | |
download | AntennaPod-7b49cab6846ffcb95bf753b303d92aa7a762bbc5.zip |
Merge pull request #5076 from ByteHamster/fix-miniplayer-state
Fixed miniplayer state sometimes being wrong
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index b5edcc878..e18002903 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -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 |