- 修复拖拽时圆球消失问题 - 添加动态轨道高度变化效果(按住时4dp,松开时2dp) - 优化圆球大小设置(固定14dp) - 添加ProGuard规则保护DefaultTimeBar反射字段 - 改进触摸事件处理逻辑 - 增强拖拽体验的流畅性 修复内容: - CustomSeekView: 重构触摸事件处理和动态高度调整 - 布局文件: 统一设置圆球大小为14dp - ProGuard: 保护Media3 DefaultTimeBar字段不被混淆
47 lines
1.6 KiB
XML
47 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout 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="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/position"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/white"
|
|
android:textSize="14sp"
|
|
tools:text="00:00:00" />
|
|
|
|
<androidx.media3.ui.DefaultTimeBar
|
|
android:id="@+id/timeBar"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_weight="1"
|
|
android:focusable="true"
|
|
android:focusableInTouchMode="true"
|
|
android:nextFocusLeft="@id/timeBar"
|
|
android:nextFocusRight="@id/timeBar"
|
|
android:nextFocusUp="@id/next"
|
|
android:nextFocusDown="@id/timeBar"
|
|
app:bar_height="2dp"
|
|
app:scrubber_enabled_size="14dp"
|
|
app:scrubber_disabled_size="14dp"
|
|
app:played_color="#FFEB3B"
|
|
app:scrubber_color="#FFEB3B"
|
|
app:buffered_color="#80FFEB3B"
|
|
app:unplayed_color="@color/grey_500" />
|
|
|
|
<TextView
|
|
android:id="@+id/duration"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/white"
|
|
android:textSize="14sp"
|
|
tools:text="00:00:00" />
|
|
|
|
</LinearLayout> |