diff options
6 files changed, 10 insertions, 12 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 -> { diff --git a/app/src/main/res/layout/activity_view_video_zoomable.xml b/app/src/main/res/layout/activity_view_video_zoomable.xml index ea2ff8eb..c561ed82 100644 --- a/app/src/main/res/layout/activity_view_video_zoomable.xml +++ b/app/src/main/res/layout/activity_view_video_zoomable.xml @@ -34,8 +34,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - app:controller_layout_id="@layout/exo_playback_control_view" - app:show_timeout="1500" /> + app:controller_layout_id="@layout/exo_playback_control_view" /> <ProgressBar android:id="@+id/progress_bar_view_video_activity" diff --git a/app/src/main/res/layout/exo_playback_control_view.xml b/app/src/main/res/layout/exo_playback_control_view.xml index 5bcbb41f..47ef6ff1 100644 --- a/app/src/main/res/layout/exo_playback_control_view.xml +++ b/app/src/main/res/layout/exo_playback_control_view.xml @@ -55,14 +55,14 @@ app:backgroundTint="#444141" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toStartOf="@+id/exo_play" + app:layout_constraintEnd_toStartOf="@+id/exo_play_pause" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" app:layout_constraintHorizontal_chainStyle="packed" style="?attr/materialIconButtonOutlinedStyle" /> <com.google.android.material.button.MaterialButton - android:id="@id/exo_play" + android:id="@+id/exo_play_pause" android:layout_width="wrap_content" android:layout_height="wrap_content" app:strokeWidth="0dp" @@ -90,7 +90,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" - app:layout_constraintStart_toEndOf="@+id/exo_play" + app:layout_constraintStart_toEndOf="@+id/exo_play_pause" style="?attr/materialIconButtonOutlinedStyle" /> <com.google.android.material.button.MaterialButton |