From 019970d5fefd19cf6860de039634762542e9b49b Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Thu, 9 May 2024 18:06:54 -0400 Subject: Fix controller animation issues in StyledPlayerView in ExoPlayer. --- .../infinityforreddit/activities/ViewVideoActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java index 54eecf43..0600191a 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java @@ -57,6 +57,7 @@ import com.google.android.exoplayer2.source.hls.HlsMediaSource; import com.google.android.exoplayer2.trackselection.DefaultTrackSelector; import com.google.android.exoplayer2.trackselection.TrackSelectionOverride; import com.google.android.exoplayer2.ui.PlayerControlView; +import com.google.android.exoplayer2.ui.StyledPlayerControlView; import com.google.android.exoplayer2.ui.StyledPlayerView; import com.google.android.exoplayer2.ui.TrackSelectionDialogBuilder; import com.google.android.exoplayer2.upstream.DataSource; @@ -464,9 +465,9 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe } else { StyledPlayerView videoPlayerView = findViewById(R.id.player_view_view_video_activity); videoPlayerView.setPlayer(player); - videoPlayerView.setControllerVisibilityListener(new StyledPlayerView.ControllerVisibilityListener() { + videoPlayerView.setControllerVisibilityListener(new StyledPlayerControlView.VisibilityListener() { @Override - public void onVisibilityChanged(int visibility) { + public void onVisibilityChange(int visibility) { switch (visibility) { case View.GONE: getWindow().getDecorView().setSystemUiVisibility( -- cgit v1.2.3