From e8386b0c4a63539adbe096d7510dc44f91208359 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 26 Aug 2021 20:27:19 +0800 Subject: Tweak the video autoplay control UI. Set show_timeout to 1s to video autoplay control UI. --- app/src/main/res/drawable/background_autoplay.xml | 11 +++ ...o_player_control_button_circular_background.xml | 6 ++ .../layout/exo_autoplay_playback_control_view.xml | 96 ++++++++++++---------- .../res/layout/item_post_card_2_video_autoplay.xml | 1 + .../res/layout/item_post_detail_video_autoplay.xml | 1 + .../res/layout/item_post_video_type_autoplay.xml | 1 + 6 files changed, 73 insertions(+), 43 deletions(-) create mode 100644 app/src/main/res/drawable/background_autoplay.xml create mode 100644 app/src/main/res/drawable/exo_player_control_button_circular_background.xml (limited to 'app') diff --git a/app/src/main/res/drawable/background_autoplay.xml b/app/src/main/res/drawable/background_autoplay.xml new file mode 100644 index 00000000..fd34b51c --- /dev/null +++ b/app/src/main/res/drawable/background_autoplay.xml @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/exo_player_control_button_circular_background.xml b/app/src/main/res/drawable/exo_player_control_button_circular_background.xml new file mode 100644 index 00000000..363fffc1 --- /dev/null +++ b/app/src/main/res/drawable/exo_player_control_button_circular_background.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file 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 e08fce18..4f7020c4 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 @@ -6,17 +6,16 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="bottom" - android:orientation="vertical" - android:background="#80000000"> + android:orientation="vertical"> - - - - - + app:layout_constraintEnd_toEndOf="parent"> + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_card_2_video_autoplay.xml b/app/src/main/res/layout/item_post_card_2_video_autoplay.xml index 08914727..8cb3ef10 100644 --- a/app/src/main/res/layout/item_post_card_2_video_autoplay.xml +++ b/app/src/main/res/layout/item_post_card_2_video_autoplay.xml @@ -29,6 +29,7 @@ android:id="@+id/player_view_item_post_card_2_video_autoplay" android:layout_width="match_parent" android:layout_height="match_parent" + app:show_timeout="1000" app:controller_layout_id="@layout/exo_autoplay_playback_control_view" />