mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit
synced 2024-07-05 17:30:02 +00:00
Fix controller animation issues in StyledPlayerView in ExoPlayer.
This commit is contained in:
parent
a283e39473
commit
019970d5fe
|
@ -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(
|
||||
|
|
|
@ -271,7 +271,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:visibility="gone"
|
||||
app:controller_layout_id="@layout/exo_playback_control_view" />
|
||||
android:animateLayoutChanges="true"
|
||||
app:controller_layout_id="@layout/exo_playback_control_view"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -25,7 +25,9 @@
|
|||
android:id="@+id/player_view_view_video_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:controller_layout_id="@layout/exo_playback_control_view"/>
|
||||
android:animateLayoutChanges="true"
|
||||
app:controller_layout_id="@layout/exo_playback_control_view"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar_view_video_activity"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
app:strokeWidth="0dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@null"
|
||||
app:backgroundTint="#22FFFFFF"
|
||||
app:backgroundTint="#10FFFFFF"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
@ -52,7 +52,7 @@
|
|||
app:icon="@drawable/ic_fast_rewind_24dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@null"
|
||||
app:backgroundTint="#22FFFFFF"
|
||||
app:backgroundTint="#444141"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/exo_play"
|
||||
|
@ -85,7 +85,7 @@
|
|||
app:icon="@drawable/ic_fast_forward_24dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@null"
|
||||
app:backgroundTint="#22FFFFFF"
|
||||
app:backgroundTint="#444141"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -102,7 +102,7 @@
|
|||
app:icon="@drawable/ic_video_quality_24dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@null"
|
||||
app:backgroundTint="#22FFFFFF"
|
||||
app:backgroundTint="#444141"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.exoplayer2.ui.StyledPlayerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:animateLayoutChanges="true"
|
||||
app:controller_layout_id="@layout/exo_playback_control_view"
|
||||
app:animation_enabled="false"
|
||||
tools:context=".fragments.ViewImgurVideoFragment" />
|
|
@ -10,6 +10,8 @@
|
|||
android:id="@+id/player_view_view_reddit_gallery_video_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:controller_layout_id="@layout/exo_playback_control_view"/>
|
||||
android:animateLayoutChanges="true"
|
||||
app:controller_layout_id="@layout/exo_playback_control_view"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
</RelativeLayout>
|
|
@ -30,9 +30,11 @@
|
|||
android:id="@+id/player_view_item_post_card_2_video_autoplay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
app:show_timeout="1500"
|
||||
app:auto_show="false"
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view" />
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/preview_image_view_item_post_card_2_video_autoplay"
|
||||
|
|
|
@ -30,9 +30,11 @@
|
|||
android:id="@+id/player_view_item_post_card_2_video_autoplay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
app:show_timeout="1500"
|
||||
app:auto_show="false"
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view_legacy" />
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view_legacy"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/preview_image_view_item_post_card_2_video_autoplay"
|
||||
|
|
|
@ -28,9 +28,11 @@
|
|||
android:id="@+id/player_view_item_post_card_3_video_type_autoplay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
app:show_timeout="1500"
|
||||
app:auto_show="false"
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view" />
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/preview_image_view_item_post_card_3_video_type_autoplay"
|
||||
|
|
|
@ -28,9 +28,11 @@
|
|||
android:id="@+id/player_view_item_post_card_3_video_type_autoplay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
app:show_timeout="1500"
|
||||
app:auto_show="false"
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view_legacy" />
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view_legacy"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/preview_image_view_item_post_card_3_video_type_autoplay"
|
||||
|
|
|
@ -205,9 +205,11 @@
|
|||
android:id="@+id/player_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
app:show_timeout="1500"
|
||||
app:auto_show="false"
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view" />
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/preview_image_view_item_post_detail_video_autoplay"
|
||||
|
|
|
@ -205,9 +205,11 @@
|
|||
android:id="@+id/player_view_item_post_detail_video_autoplay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
app:show_timeout="1500"
|
||||
app:auto_show="false"
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view_legacy" />
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view_legacy"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/preview_image_view_item_post_detail_video_autoplay"
|
||||
|
|
|
@ -195,9 +195,11 @@
|
|||
android:id="@+id/player_view_item_post_video_type_autoplay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
app:show_timeout="1500"
|
||||
app:auto_show="false"
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view" />
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/preview_image_view_item_post_video_type_autoplay"
|
||||
|
|
|
@ -195,9 +195,11 @@
|
|||
android:id="@+id/player_view_item_post_video_type_autoplay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
app:show_timeout="1500"
|
||||
app:auto_show="false"
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view_legacy" />
|
||||
app:controller_layout_id="@layout/exo_autoplay_playback_control_view_legacy"
|
||||
app:animation_enabled="false" />
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/preview_image_view_item_post_video_type_autoplay"
|
||||
|
|
Loading…
Reference in New Issue
Block a user