Skip to content

Commit

Permalink
Disable system gestures on the SeekBar component (#30)
Browse files Browse the repository at this point in the history
The `SeekBar` shouldn't receive system gestures, otherwise users aren't able to drag it when it's near the edge of the screen.

---------

Co-authored-by: Mattias Buelens <[email protected]>
  • Loading branch information
m-derakhshan and MattiasBuelens authored Aug 20, 2024
1 parent 304a6d0 commit a5fef0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
> - 🏠 Internal
> - 💅 Polish
## Unreleased

* 🐛 Disable system gestures on the `SeekBar` component. ([#30](https://github.com/THEOplayer/android-ui/pull/30))

## v1.7.0 (2024-08-12)

* 💥 Updated to Jetpack Compose version 1.6.8 ([BOM](https://developer.android.com/jetpack/compose/bom) 2024.06.00).
Expand Down
3 changes: 2 additions & 1 deletion ui/src/main/java/com/theoplayer/android/ui/SeekBar.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.theoplayer.android.ui

import androidx.compose.foundation.systemGestureExclusion
import androidx.compose.material3.Slider
import androidx.compose.material3.SliderColors
import androidx.compose.material3.SliderDefaults
Expand Down Expand Up @@ -42,7 +43,7 @@ fun SeekBar(
var wasPlayingBeforeSeek by remember { mutableStateOf(false) }

Slider(
modifier = modifier,
modifier = modifier.systemGestureExclusion(),
colors = colors,
value = seekTime ?: currentTime,
valueRange = valueRange,
Expand Down

0 comments on commit a5fef0d

Please sign in to comment.