diff options
Diffstat (limited to 'app')
6 files changed, 73 insertions, 43 deletions
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 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > + + <solid + android:color="#40000000" /> + + <corners + android:topLeftRadius="16dp" + android:topRightRadius="16dp" /> + +</shape>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" > + <size android:width="16dp" android:height="16dp"/> + <solid + android:color="#40000000" /> +</shape>
\ 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"> <ImageView android:id="@+id/mute_exo_playback_control_view" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="16dp" + android:padding="8dp" android:layout_toStartOf="@id/fullscreen_exo_playback_control_view" android:src="@drawable/ic_mute_white_rounded_24dp" - android:background="?actionBarItemBackground" + android:background="@drawable/exo_player_control_button_circular_background" android:clickable="true" android:focusable="true" android:visibility="gone" @@ -30,10 +29,10 @@ android:id="@+id/fullscreen_exo_playback_control_view" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="16dp" + android:padding="8dp" android:layout_alignParentEnd="true" android:src="@drawable/ic_fullscreen_white_rounded_24dp" - android:background="?actionBarItemBackground" + android:background="@drawable/exo_player_control_button_circular_background" android:clickable="true" android:focusable="true" app:layout_constraintTop_toTopOf="parent" @@ -53,60 +52,71 @@ <ImageView android:id="@id/exo_play" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="16dp" + android:padding="8dp" android:layout_centerInParent="true" android:src="@drawable/ic_play_arrow_white_rounded_24dp" - android:background="?actionBarItemBackground" + android:background="@drawable/exo_player_control_button_circular_background" android:clickable="true" android:focusable="true" /> <ImageView android:id="@id/exo_pause" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="16dp" + android:padding="8dp" android:layout_centerInParent="true" android:src="@drawable/ic_pause_white_rounded_24dp" - android:background="?actionBarItemBackground" + android:background="@drawable/exo_player_control_button_circular_background" android:clickable="true" android:focusable="true" /> </FrameLayout> - <TextView - android:id="@id/exo_position" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:includeFontPadding="false" - android:layout_marginStart="16dp" - android:textColor="#FFFFFF" - android:textSize="?attr/font_default" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - app:layout_constraintBottom_toTopOf="@id/exo_progress" - app:layout_constraintStart_toStartOf="parent" /> - - <TextView android:id="@id/exo_duration" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:includeFontPadding="false" - android:layout_marginEnd="16dp" - android:textColor="#FFFFFF" - android:textSize="?attr/font_default" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - app:layout_constraintBottom_toTopOf="@id/exo_progress" - app:layout_constraintEnd_toEndOf="parent" /> - - <com.google.android.exoplayer2.ui.DefaultTimeBar - android:id="@id/exo_progress" + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="24dp" - android:layout_marginBottom="8dp" - android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" + android:layout_height="wrap_content" + android:paddingTop="16dp" + android:background="@drawable/background_autoplay" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:bar_height="2dp" /> + app:layout_constraintEnd_toEndOf="parent"> + + <TextView + android:id="@id/exo_position" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:includeFontPadding="false" + android:layout_marginStart="16dp" + android:textColor="#FFFFFF" + android:textSize="?attr/font_default" + android:textStyle="bold" + android:fontFamily="?attr/font_family" + app:layout_constraintBottom_toTopOf="@id/exo_progress" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView android:id="@id/exo_duration" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:includeFontPadding="false" + android:layout_marginEnd="16dp" + android:textColor="#FFFFFF" + android:textSize="?attr/font_default" + android:textStyle="bold" + android:fontFamily="?attr/font_family" + app:layout_constraintBottom_toTopOf="@id/exo_progress" + app:layout_constraintEnd_toEndOf="parent" /> + + <com.google.android.exoplayer2.ui.DefaultTimeBar + android:id="@id/exo_progress" + android:layout_width="match_parent" + android:layout_height="24dp" + android:layout_marginBottom="8dp" + android:layout_marginStart="8dp" + android:layout_marginEnd="8dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:bar_height="2dp" /> + + </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ 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" /> <pl.droidsonroids.gif.GifImageView diff --git a/app/src/main/res/layout/item_post_detail_video_autoplay.xml b/app/src/main/res/layout/item_post_detail_video_autoplay.xml index c2398517..78396e50 100644 --- a/app/src/main/res/layout/item_post_detail_video_autoplay.xml +++ b/app/src/main/res/layout/item_post_detail_video_autoplay.xml @@ -213,6 +213,7 @@ android:id="@+id/player_view_item_post_detail_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" /> <pl.droidsonroids.gif.GifImageView diff --git a/app/src/main/res/layout/item_post_video_type_autoplay.xml b/app/src/main/res/layout/item_post_video_type_autoplay.xml index e09decaf..0d83ca9f 100644 --- a/app/src/main/res/layout/item_post_video_type_autoplay.xml +++ b/app/src/main/res/layout/item_post_video_type_autoplay.xml @@ -206,6 +206,7 @@ android:id="@+id/player_view_item_post_video_type_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" /> <pl.droidsonroids.gif.GifImageView |