Skip to content

Commit cc24208

Browse files
authored
Merge pull request #2188 from Luna712/player-scroll-fix
Reset player hide delay when scrolling controls
2 parents 7b5e213 + f834c85 commit cc24208

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
943943
if (!isCurrentTouchValid && isShowing && index == currentTapIndex && player.getIsPlaying()) {
944944
onClickChange()
945945
}
946-
}, 2000)
946+
}, 3000)
947947
}
948948

949949
// this is used because you don't want to hide UI when double tap seeking
@@ -1989,6 +1989,10 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
19891989
return@setOnTouchListener handleMotionEvent(callView, event)
19901990
}
19911991

1992+
playerControlsScroll.setOnScrollChangeListener { _, _, _, _, _ ->
1993+
autoHide()
1994+
}
1995+
19921996
exoProgress.setOnTouchListener { _, event ->
19931997
// this makes the bar not disappear when sliding
19941998
when (event.action) {

app/src/main/res/layout/player_custom_layout.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@
711711
</androidx.constraintlayout.widget.ConstraintLayout>
712712

713713
<HorizontalScrollView
714+
android:id="@+id/player_controls_scroll"
714715
android:layout_width="wrap_content"
715716
android:layout_height="wrap_content"
716717
android:layout_gravity="center">

app/src/main/res/layout/player_custom_layout_tv.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,7 @@
852852

853853

854854
<HorizontalScrollView
855+
android:id="@+id/player_controls_scroll"
855856
android:layout_width="wrap_content"
856857
android:layout_height="wrap_content"
857858
android:layout_gravity="center">

app/src/main/res/layout/trailer_custom_layout.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@
698698

699699

700700
<HorizontalScrollView
701+
android:id="@+id/player_controls_scroll"
701702
android:layout_width="wrap_content"
702703
android:layout_height="wrap_content"
703704
android:layout_gravity="center"

0 commit comments

Comments
 (0)