fix progress bar offset

Changelog: changed
This commit is contained in:
Kai 2025-04-08 18:43:40 -05:00
parent 830d3a9022
commit c7c3ddfc96
No known key found for this signature in database
4 changed files with 5 additions and 11 deletions

View file

@ -2869,7 +2869,7 @@ class VideoDetailView : ConstraintLayout {
}
else if(isOverlayed) {
_playerProgress.layoutParams = _playerProgress.layoutParams.apply {
(this as MarginLayoutParams).bottomMargin = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, -2f, resources.displayMetrics).toInt();
(this as MarginLayoutParams).bottomMargin = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, -6f, resources.displayMetrics).toInt();
};
_playerProgress.elevation = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 5f, resources.displayMetrics);
}

View file

@ -7,13 +7,9 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.animation.LinearInterpolator
import androidx.annotation.OptIn
import androidx.media3.common.C
import androidx.media3.common.PlaybackParameters
import androidx.media3.common.Player
import androidx.media3.common.util.UnstableApi
import androidx.media3.exoplayer.DefaultLoadControl
import androidx.media3.exoplayer.ExoPlayer
import androidx.media3.exoplayer.upstream.DefaultAllocator
import androidx.media3.ui.DefaultTimeBar
import androidx.media3.ui.PlayerView
import androidx.media3.ui.TimeBar

View file

@ -69,7 +69,7 @@ import java.io.ByteArrayInputStream
import java.io.File
import kotlin.math.abs
abstract class FutoVideoPlayerBase : ConstraintLayout {
abstract class FutoVideoPlayerBase : RelativeLayout {
private val TAG = "FutoVideoPlayerBase"
// private val TEMP_DIRECTORY = StateApp.instance.getTempDirectory();

View file

@ -5,11 +5,10 @@
<androidx.media3.ui.PlayerView
android:id="@+id/short_player_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="match_parent"
android:layout_above="@+id/short_player_progress_bar"
android:background="@color/black"
app:default_artwork="@drawable/placeholder_video_thumbnail"
app:layout_constraintBottom_toTopOf="@id/short_player_progress_bar"
app:layout_constraintTop_toTopOf="parent"
app:resize_mode="fit"
app:show_buffering="when_playing"
app:use_artwork="true"
@ -19,10 +18,9 @@
android:id="@+id/short_player_progress_bar"
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_alignParentBottom="true"
app:bar_height="6dp"
app:buffered_color="#DDEEEEEE"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/video_player"
app:played_color="@color/colorPrimary"
app:scrubber_disabled_size="0dp"
app:scrubber_dragged_size="0dp"