Add a progress bar for autoplay video control.

This commit is contained in:
Alex Ning 2021-04-09 09:47:02 +08:00
parent 73025a5a13
commit fd86448f72

View File

@ -1,19 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linear_layout_exo_playback_control_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:layout_gravity="bottom"
android:orientation="vertical"
android:background="@drawable/background_autoplay">
<TextView android:id="@id/exo_position"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@id/exo_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:includeFontPadding="false"
android:layout_marginStart="8dp"
android:textColor="#FFFFFF"
android:textSize="12sp"
android:textStyle="bold"
@ -73,4 +80,11 @@
android:layout_alignParentEnd="true"
android:src="@drawable/ic_fullscreen_white_rounded_18dp" />
</RelativeLayout>
</RelativeLayout>
<com.google.android.exoplayer2.ui.DefaultTimeBar
android:id="@id/exo_progress"
android:layout_width="wrap_content"
android:layout_height="26dp"/>
</LinearLayout>