fix: configureInsets() for lockedControls, volume progress bar smoothness, gesture not working if the player was locked (#408)
* fix: volume progress bar smoothness * fix: configureInsets() for lockedControls * fix: gesture not working if the player was locked and used back gesture
This commit is contained in:
parent
fcc1a30f66
commit
7932216105
3 changed files with 6 additions and 5 deletions
|
@ -55,8 +55,12 @@ class PlayerActivity : BasePlayerActivity() {
|
|||
binding.playerView.player = viewModel.player
|
||||
|
||||
val playerControls = binding.playerView.findViewById<View>(R.id.player_controls)
|
||||
val lockedControls = binding.playerView.findViewById<View>(R.id.locked_player_view)
|
||||
|
||||
isControlsLocked = false
|
||||
|
||||
configureInsets(playerControls)
|
||||
configureInsets(lockedControls)
|
||||
|
||||
if (appPreferences.playerGestures) {
|
||||
playerGestureHelper = PlayerGestureHelper(
|
||||
|
@ -73,7 +77,6 @@ class PlayerActivity : BasePlayerActivity() {
|
|||
|
||||
binding.playerView.findViewById<View>(R.id.back_button_alt).setOnClickListener {
|
||||
finish()
|
||||
isControlsLocked = false
|
||||
}
|
||||
|
||||
val videoNameTextView = binding.playerView.findViewById<TextView>(R.id.video_name)
|
||||
|
|
|
@ -163,8 +163,8 @@ class PlayerGestureHelper(
|
|||
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, swipeGestureValueTrackerVolume.toInt(), 0)
|
||||
|
||||
activity.binding.gestureVolumeLayout.visibility = View.VISIBLE
|
||||
activity.binding.gestureVolumeProgressBar.max = maxVolume
|
||||
activity.binding.gestureVolumeProgressBar.progress = swipeGestureValueTrackerVolume.toInt()
|
||||
activity.binding.gestureVolumeProgressBar.max = maxVolume.times(100)
|
||||
activity.binding.gestureVolumeProgressBar.progress = swipeGestureValueTrackerVolume.times(100).toInt()
|
||||
val process = (swipeGestureValueTrackerVolume / maxVolume.toFloat()).times(100).toInt()
|
||||
activity.binding.gestureVolumeText.text = "$process%"
|
||||
activity.binding.gestureVolumeImage.setImageLevel(process)
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="38dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toStartOf="@id/extra_buttons_alt"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -42,7 +41,6 @@
|
|||
android:id="@+id/extra_buttons_alt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
|
Loading…
Reference in a new issue