summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2023-02-24 16:53:14 +0100
committerGitHub <noreply@github.com>2023-02-24 16:53:14 +0100
commit7753c500dbfdd4e73fdb8517d3e740ee4b69a48c (patch)
tree2535404e369dbff66cce70f9c6e832931d0519f5 /app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java
parente20d11e130938dd4bf30c2500fb5afc0993a7ed7 (diff)
downloadAntennaPod-7753c500dbfdd4e73fdb8517d3e740ee4b69a48c.zip
Do not jump bottom sheet when playing (#6342)
Whenever some view calls requestLayout(), the bottom view jumps. This happens during slide when setting the player from GONE to VISIBLE. Also, it happens every time the position changes because the TextView has a dynamic width. We are not actually interested in the dynamic width and can simply keep the initial width. This avoids requestLayout() calls every time the position is updated.
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java
index e93db2d2a..51cb28eb8 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java
@@ -528,7 +528,7 @@ public class AudioPlayerFragment extends Fragment implements
float playerFadeProgress = Math.max(0.0f, Math.min(0.2f, slideOffset - 0.2f)) / 0.2f;
View player = getView().findViewById(R.id.playerFragment);
player.setAlpha(1 - playerFadeProgress);
- player.setVisibility(playerFadeProgress > 0.99f ? View.GONE : View.VISIBLE);
+ player.setVisibility(playerFadeProgress > 0.99f ? View.INVISIBLE : View.VISIBLE);
float toolbarFadeProgress = Math.max(0.0f, Math.min(0.2f, slideOffset - 0.6f)) / 0.2f;
toolbar.setAlpha(toolbarFadeProgress);
toolbar.setVisibility(toolbarFadeProgress < 0.01f ? View.INVISIBLE : View.VISIBLE);