aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2024-05-09 22:59:31 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2024-05-09 22:59:31 +0000
commit3f6842f27ac8bd406647c58c0cc640779b1bb15e (patch)
treed6ed528cd2f04311ae501b85346de7956fbfcba5 /app/src/main/java
parent019970d5fefd19cf6860de039634762542e9b49b (diff)
downloadinfinity-for-reddit-3f6842f27ac8bd406647c58c0cc640779b1bb15e.tar
infinity-for-reddit-3f6842f27ac8bd406647c58c0cc640779b1bb15e.tar.gz
infinity-for-reddit-3f6842f27ac8bd406647c58c0cc640779b1bb15e.tar.bz2
infinity-for-reddit-3f6842f27ac8bd406647c58c0cc640779b1bb15e.tar.lz
infinity-for-reddit-3f6842f27ac8bd406647c58c0cc640779b1bb15e.tar.xz
infinity-for-reddit-3f6842f27ac8bd406647c58c0cc640779b1bb15e.tar.zst
infinity-for-reddit-3f6842f27ac8bd406647c58c0cc640779b1bb15e.zip
Fix play button not shown in ViewVideoActivity when pinch to zoom video is enabled.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java7
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivityBindingAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurVideoFragment.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryVideoFragment.java2
4 files changed, 6 insertions, 7 deletions
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 0600191a..fc9562e0 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
@@ -57,7 +57,6 @@ 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;
@@ -465,9 +464,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 StyledPlayerControlView.VisibilityListener() {
+ videoPlayerView.setControllerVisibilityListener(new StyledPlayerView.ControllerVisibilityListener() {
@Override
- public void onVisibilityChange(int visibility) {
+ public void onVisibilityChanged(int visibility) {
switch (visibility) {
case View.GONE:
getWindow().getDecorView().setSystemUiVisibility(
@@ -488,7 +487,7 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe
});
}
- MaterialButton playPauseButton = findViewById(R.id.exo_play);
+ MaterialButton playPauseButton = findViewById(R.id.exo_play_pause);
Drawable playDrawable = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_play_arrow_24dp, null);
Drawable pauseDrawable = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_pause_24dp, null);
playPauseButton.setOnClickListener(view -> {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivityBindingAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivityBindingAdapter.java
index f37fcb7b..e28c8a19 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivityBindingAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivityBindingAdapter.java
@@ -64,7 +64,7 @@ public class ViewVideoActivityBindingAdapter {
}
public MaterialButton getMuteButton() {
- return binding.getRoot().findViewById(R.id.mute_exo_playback_control_view);
+ return getRoot().findViewById(R.id.mute_exo_playback_control_view);
}
public MaterialButton getHdButton() {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurVideoFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurVideoFragment.java
index 961c30b0..c52ab690 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurVideoFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurVideoFragment.java
@@ -289,7 +289,7 @@ public class ViewImgurVideoFragment extends Fragment {
binding.getMuteButton().setIconResource(R.drawable.ic_unmute_24dp);
}
- MaterialButton playPauseButton = binding.getRoot().findViewById(R.id.exo_play);
+ MaterialButton playPauseButton = binding.getRoot().findViewById(R.id.exo_play_pause);
Drawable playDrawable = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_play_arrow_24dp, null);
Drawable pauseDrawable = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_pause_24dp, null);
playPauseButton.setOnClickListener(view -> {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryVideoFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryVideoFragment.java
index 0430b848..f597068a 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryVideoFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryVideoFragment.java
@@ -290,7 +290,7 @@ public class ViewRedditGalleryVideoFragment extends Fragment {
binding.getMuteButton().setImageResource(R.drawable.ic_unmute_24dp);
}
- MaterialButton playPauseButton = binding.getRoot().findViewById(R.id.exo_play);
+ MaterialButton playPauseButton = binding.getRoot().findViewById(R.id.exo_play_pause);
Drawable playDrawable = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_play_arrow_24dp, null);
Drawable pauseDrawable = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_pause_24dp, null);
playPauseButton.setOnClickListener(view -> {