diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-04-09 01:47:02 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-04-09 01:47:02 +0000 |
commit | fd86448f72f75a430e50ef5c05357609946d8c3d (patch) | |
tree | d91a1e0fee08c648acfcd650248358cef337755a | |
parent | 73025a5a13de21c07b6a2cb45d4df3d5475deb37 (diff) | |
download | infinity-for-reddit-fd86448f72f75a430e50ef5c05357609946d8c3d.tar infinity-for-reddit-fd86448f72f75a430e50ef5c05357609946d8c3d.tar.gz infinity-for-reddit-fd86448f72f75a430e50ef5c05357609946d8c3d.tar.bz2 infinity-for-reddit-fd86448f72f75a430e50ef5c05357609946d8c3d.tar.lz infinity-for-reddit-fd86448f72f75a430e50ef5c05357609946d8c3d.tar.xz infinity-for-reddit-fd86448f72f75a430e50ef5c05357609946d8c3d.tar.zst infinity-for-reddit-fd86448f72f75a430e50ef5c05357609946d8c3d.zip |
Add a progress bar for autoplay video control.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/layout/exo_autoplay_playback_control_view.xml | 134 |
1 files changed, 74 insertions, 60 deletions
diff --git a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml index efdd1ac4..42382179 100644 --- a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml +++ b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml @@ -1,76 +1,90 @@ <?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" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_centerVertical="true" - android:includeFontPadding="false" - android:textColor="#FFFFFF" - android:textSize="12sp" - android:textStyle="bold" - android:fontFamily="?attr/font_family" /> + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <TextView - android:id="@+id/slash" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_toEndOf="@id/exo_position" - android:layout_centerVertical="true" - android:text="/" - android:textColor="#FFFFFF" - android:textSize="12sp" - android:textStyle="bold" - android:fontFamily="?attr/font_family" /> + <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" + android:fontFamily="?attr/font_family" /> - <TextView android:id="@id/exo_duration" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_toEndOf="@id/slash" - android:layout_centerVertical="true" - android:includeFontPadding="false" - android:textColor="#FFFFFF" - android:textSize="12sp" - android:textStyle="bold" - android:fontFamily="?attr/font_family" /> + <TextView + android:id="@+id/slash" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toEndOf="@id/exo_position" + android:layout_centerVertical="true" + android:text="/" + android:textColor="#FFFFFF" + android:textSize="12sp" + android:textStyle="bold" + android:fontFamily="?attr/font_family" /> - <ImageView android:id="@id/exo_play" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="8dp" - android:layout_centerInParent="true" - android:src="@drawable/ic_play_arrow_white_rounded_18dp" /> + <TextView android:id="@id/exo_duration" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toEndOf="@id/slash" + android:layout_centerVertical="true" + android:includeFontPadding="false" + android:textColor="#FFFFFF" + android:textSize="12sp" + android:textStyle="bold" + android:fontFamily="?attr/font_family" /> - <ImageView android:id="@id/exo_pause" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="8dp" - android:layout_centerInParent="true" - android:src="@drawable/ic_pause_white_rounded_18dp" /> + <ImageView android:id="@id/exo_play" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" + android:layout_centerInParent="true" + android:src="@drawable/ic_play_arrow_white_rounded_18dp" /> - <ImageView - android:id="@+id/mute_exo_playback_control_view" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="8dp" - android:layout_toStartOf="@id/fullscreen_exo_playback_control_view" - android:src="@drawable/ic_mute_white_rounded_18dp" - android:visibility="gone" /> + <ImageView android:id="@id/exo_pause" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" + android:layout_centerInParent="true" + android:src="@drawable/ic_pause_white_rounded_18dp" /> + + <ImageView + android:id="@+id/mute_exo_playback_control_view" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" + android:layout_toStartOf="@id/fullscreen_exo_playback_control_view" + android:src="@drawable/ic_mute_white_rounded_18dp" + android:visibility="gone" /> + + <ImageView + android:id="@+id/fullscreen_exo_playback_control_view" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" + android:layout_alignParentEnd="true" + android:src="@drawable/ic_fullscreen_white_rounded_18dp" /> + + </RelativeLayout> - <ImageView - android:id="@+id/fullscreen_exo_playback_control_view" + <com.google.android.exoplayer2.ui.DefaultTimeBar + android:id="@id/exo_progress" android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="8dp" - android:layout_alignParentEnd="true" - android:src="@drawable/ic_fullscreen_white_rounded_18dp" /> + android:layout_height="26dp"/> -</RelativeLayout>
\ No newline at end of file +</LinearLayout>
\ No newline at end of file |