diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-09-22 03:15:34 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-09-22 03:15:34 +0000 |
commit | e5b65a5aecdeb0d6a5c4eb7cbfd06c29eb7ac75b (patch) | |
tree | a6ff28ece0b028b69b9520615a80b991641e9c36 /app/src/main/res | |
parent | a2c794fd17e6103358529daf9a0bd363d7fba95e (diff) | |
download | infinity-for-reddit-e5b65a5aecdeb0d6a5c4eb7cbfd06c29eb7ac75b.tar infinity-for-reddit-e5b65a5aecdeb0d6a5c4eb7cbfd06c29eb7ac75b.tar.gz infinity-for-reddit-e5b65a5aecdeb0d6a5c4eb7cbfd06c29eb7ac75b.tar.bz2 infinity-for-reddit-e5b65a5aecdeb0d6a5c4eb7cbfd06c29eb7ac75b.tar.lz infinity-for-reddit-e5b65a5aecdeb0d6a5c4eb7cbfd06c29eb7ac75b.tar.xz infinity-for-reddit-e5b65a5aecdeb0d6a5c4eb7cbfd06c29eb7ac75b.tar.zst infinity-for-reddit-e5b65a5aecdeb0d6a5c4eb7cbfd06c29eb7ac75b.zip |
Start changing video control UI.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/drawable/exo_player_control_view_background.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_fast_forward_24dp.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_fast_rewind_24dp.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_mute_24dp.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_mute_white_rounded_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_pause_24dp.xml (renamed from app/src/main/res/drawable/ic_pause_white_rounded_24dp.xml) | 0 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_play_arrow_24dp.xml (renamed from app/src/main/res/drawable/ic_play_arrow_white_rounded_24dp.xml) | 0 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_unmute_24dp.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_unmute_white_rounded_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/exo_autoplay_playback_control_view.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/layout/exo_autoplay_playback_control_view_legacy.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/layout/exo_playback_control_view.xml | 137 |
12 files changed, 138 insertions, 56 deletions
diff --git a/app/src/main/res/drawable/exo_player_control_view_background.xml b/app/src/main/res/drawable/exo_player_control_view_background.xml new file mode 100644 index 00000000..839c0a8e --- /dev/null +++ b/app/src/main/res/drawable/exo_player_control_view_background.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <gradient android:startColor="#000000" + android:endColor="@android:color/transparent" + android:angle="90" + android:type="linear" + android:useLevel="true" /> +</shape>
\ No newline at end of file diff --git a/app/src/main/res/drawable/ic_fast_forward_24dp.xml b/app/src/main/res/drawable/ic_fast_forward_24dp.xml new file mode 100644 index 00000000..51869b89 --- /dev/null +++ b/app/src/main/res/drawable/ic_fast_forward_24dp.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#FFFFFF" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M5.58,16.89l5.77,-4.07c0.56,-0.4 0.56,-1.24 0,-1.63L5.58,7.11C4.91,6.65 4,7.12 4,7.93v8.14c0,0.81 0.91,1.28 1.58,0.82zM13,7.93v8.14c0,0.81 0.91,1.28 1.58,0.82l5.77,-4.07c0.56,-0.4 0.56,-1.24 0,-1.63l-5.77,-4.07c-0.67,-0.47 -1.58,0 -1.58,0.81z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_fast_rewind_24dp.xml b/app/src/main/res/drawable/ic_fast_rewind_24dp.xml new file mode 100644 index 00000000..1a97291c --- /dev/null +++ b/app/src/main/res/drawable/ic_fast_rewind_24dp.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#FFFFFF" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M11,16.07L11,7.93c0,-0.81 -0.91,-1.28 -1.58,-0.82l-5.77,4.07c-0.56,0.4 -0.56,1.24 0,1.63l5.77,4.07c0.67,0.47 1.58,0 1.58,-0.81zM12.66,12.82l5.77,4.07c0.66,0.47 1.58,-0.01 1.58,-0.82L20.01,7.93c0,-0.81 -0.91,-1.28 -1.58,-0.82l-5.77,4.07c-0.57,0.4 -0.57,1.24 0,1.64z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_mute_24dp.xml b/app/src/main/res/drawable/ic_mute_24dp.xml index ff764c78..bc45d400 100644 --- a/app/src/main/res/drawable/ic_mute_24dp.xml +++ b/app/src/main/res/drawable/ic_mute_24dp.xml @@ -4,6 +4,6 @@ android:viewportWidth="24" android:viewportHeight="24"> <path - android:fillColor="#FFFFFFFF" - android:pathData="M4.34,2.93L2.93,4.34 7.29,8.7 7,9L3,9v6h4l5,5v-6.59l4.18,4.18c-0.65,0.49 -1.38,0.88 -2.18,1.11v2.06c1.34,-0.3 2.57,-0.92 3.61,-1.75l2.05,2.05 1.41,-1.41L4.34,2.93zM10,15.17L7.83,13L5,13v-2h2.83l0.88,-0.88L10,11.41v3.76zM19,12c0,0.82 -0.15,1.61 -0.41,2.34l1.53,1.53c0.56,-1.17 0.88,-2.48 0.88,-3.87 0,-4.28 -2.99,-7.86 -7,-8.77v2.06c2.89,0.86 5,3.54 5,6.71zM12,4l-1.88,1.88L12,7.76zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v1.79l2.48,2.48c0.01,-0.08 0.02,-0.16 0.02,-0.24z"/> + android:fillColor="@android:color/white" + android:pathData="M3.63,3.63c-0.39,0.39 -0.39,1.02 0,1.41L7.29,8.7 7,9L4,9c-0.55,0 -1,0.45 -1,1v4c0,0.55 0.45,1 1,1h3l3.29,3.29c0.63,0.63 1.71,0.18 1.71,-0.71v-4.17l4.18,4.18c-0.49,0.37 -1.02,0.68 -1.6,0.91 -0.36,0.15 -0.58,0.53 -0.58,0.92 0,0.72 0.73,1.18 1.39,0.91 0.8,-0.33 1.55,-0.77 2.22,-1.31l1.34,1.34c0.39,0.39 1.02,0.39 1.41,0 0.39,-0.39 0.39,-1.02 0,-1.41L5.05,3.63c-0.39,-0.39 -1.02,-0.39 -1.42,0zM19,12c0,0.82 -0.15,1.61 -0.41,2.34l1.53,1.53c0.56,-1.17 0.88,-2.48 0.88,-3.87 0,-3.83 -2.4,-7.11 -5.78,-8.4 -0.59,-0.23 -1.22,0.23 -1.22,0.86v0.19c0,0.38 0.25,0.71 0.61,0.85C17.18,6.54 19,9.06 19,12zM10.29,5.71l-0.17,0.17L12,7.76L12,6.41c0,-0.89 -1.08,-1.33 -1.71,-0.7zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v1.79l2.48,2.48c0.01,-0.08 0.02,-0.16 0.02,-0.24z"/> </vector> diff --git a/app/src/main/res/drawable/ic_mute_white_rounded_24dp.xml b/app/src/main/res/drawable/ic_mute_white_rounded_24dp.xml deleted file mode 100644 index bc45d400..00000000 --- a/app/src/main/res/drawable/ic_mute_white_rounded_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" - android:viewportWidth="24" - android:viewportHeight="24"> - <path - android:fillColor="@android:color/white" - android:pathData="M3.63,3.63c-0.39,0.39 -0.39,1.02 0,1.41L7.29,8.7 7,9L4,9c-0.55,0 -1,0.45 -1,1v4c0,0.55 0.45,1 1,1h3l3.29,3.29c0.63,0.63 1.71,0.18 1.71,-0.71v-4.17l4.18,4.18c-0.49,0.37 -1.02,0.68 -1.6,0.91 -0.36,0.15 -0.58,0.53 -0.58,0.92 0,0.72 0.73,1.18 1.39,0.91 0.8,-0.33 1.55,-0.77 2.22,-1.31l1.34,1.34c0.39,0.39 1.02,0.39 1.41,0 0.39,-0.39 0.39,-1.02 0,-1.41L5.05,3.63c-0.39,-0.39 -1.02,-0.39 -1.42,0zM19,12c0,0.82 -0.15,1.61 -0.41,2.34l1.53,1.53c0.56,-1.17 0.88,-2.48 0.88,-3.87 0,-3.83 -2.4,-7.11 -5.78,-8.4 -0.59,-0.23 -1.22,0.23 -1.22,0.86v0.19c0,0.38 0.25,0.71 0.61,0.85C17.18,6.54 19,9.06 19,12zM10.29,5.71l-0.17,0.17L12,7.76L12,6.41c0,-0.89 -1.08,-1.33 -1.71,-0.7zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v1.79l2.48,2.48c0.01,-0.08 0.02,-0.16 0.02,-0.24z"/> -</vector> diff --git a/app/src/main/res/drawable/ic_pause_white_rounded_24dp.xml b/app/src/main/res/drawable/ic_pause_24dp.xml index a5e498b5..a5e498b5 100644 --- a/app/src/main/res/drawable/ic_pause_white_rounded_24dp.xml +++ b/app/src/main/res/drawable/ic_pause_24dp.xml diff --git a/app/src/main/res/drawable/ic_play_arrow_white_rounded_24dp.xml b/app/src/main/res/drawable/ic_play_arrow_24dp.xml index 78fbfbba..78fbfbba 100644 --- a/app/src/main/res/drawable/ic_play_arrow_white_rounded_24dp.xml +++ b/app/src/main/res/drawable/ic_play_arrow_24dp.xml diff --git a/app/src/main/res/drawable/ic_unmute_24dp.xml b/app/src/main/res/drawable/ic_unmute_24dp.xml index d2c9bb24..3afb6532 100644 --- a/app/src/main/res/drawable/ic_unmute_24dp.xml +++ b/app/src/main/res/drawable/ic_unmute_24dp.xml @@ -4,6 +4,6 @@ android:viewportWidth="24" android:viewportHeight="24"> <path - android:fillColor="#FFFFFFFF" - android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM10,8.83v6.34L7.83,13L5,13v-2h2.83L10,8.83zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77 0,-4.28 -2.99,-7.86 -7,-8.77z"/> + android:fillColor="@android:color/white" + android:pathData="M3,10v4c0,0.55 0.45,1 1,1h3l3.29,3.29c0.63,0.63 1.71,0.18 1.71,-0.71L12,6.41c0,-0.89 -1.08,-1.34 -1.71,-0.71L7,9L4,9c-0.55,0 -1,0.45 -1,1zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,4.45v0.2c0,0.38 0.25,0.71 0.6,0.85C17.18,6.53 19,9.06 19,12s-1.82,5.47 -4.4,6.5c-0.36,0.14 -0.6,0.47 -0.6,0.85v0.2c0,0.63 0.63,1.07 1.21,0.85C18.6,19.11 21,15.84 21,12s-2.4,-7.11 -5.79,-8.4c-0.58,-0.23 -1.21,0.22 -1.21,0.85z"/> </vector> diff --git a/app/src/main/res/drawable/ic_unmute_white_rounded_24dp.xml b/app/src/main/res/drawable/ic_unmute_white_rounded_24dp.xml deleted file mode 100644 index 3afb6532..00000000 --- a/app/src/main/res/drawable/ic_unmute_white_rounded_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" - android:viewportWidth="24" - android:viewportHeight="24"> - <path - android:fillColor="@android:color/white" - android:pathData="M3,10v4c0,0.55 0.45,1 1,1h3l3.29,3.29c0.63,0.63 1.71,0.18 1.71,-0.71L12,6.41c0,-0.89 -1.08,-1.34 -1.71,-0.71L7,9L4,9c-0.55,0 -1,0.45 -1,1zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,4.45v0.2c0,0.38 0.25,0.71 0.6,0.85C17.18,6.53 19,9.06 19,12s-1.82,5.47 -4.4,6.5c-0.36,0.14 -0.6,0.47 -0.6,0.85v0.2c0,0.63 0.63,1.07 1.21,0.85C18.6,19.11 21,15.84 21,12s-2.4,-7.11 -5.79,-8.4c-0.58,-0.23 -1.21,0.22 -1.21,0.85z"/> -</vector> 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 4f7020c4..14c2b017 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 @@ -14,7 +14,7 @@ android:layout_height="wrap_content" android:padding="8dp" android:layout_toStartOf="@id/fullscreen_exo_playback_control_view" - android:src="@drawable/ic_mute_white_rounded_24dp" + android:src="@drawable/ic_mute_24dp" android:background="@drawable/exo_player_control_button_circular_background" android:clickable="true" android:focusable="true" @@ -54,7 +54,7 @@ android:layout_height="wrap_content" android:padding="8dp" android:layout_centerInParent="true" - android:src="@drawable/ic_play_arrow_white_rounded_24dp" + android:src="@drawable/ic_play_arrow_24dp" android:background="@drawable/exo_player_control_button_circular_background" android:clickable="true" android:focusable="true" /> @@ -64,7 +64,7 @@ android:layout_height="wrap_content" android:padding="8dp" android:layout_centerInParent="true" - android:src="@drawable/ic_pause_white_rounded_24dp" + android:src="@drawable/ic_pause_24dp" android:background="@drawable/exo_player_control_button_circular_background" android:clickable="true" android:focusable="true" /> diff --git a/app/src/main/res/layout/exo_autoplay_playback_control_view_legacy.xml b/app/src/main/res/layout/exo_autoplay_playback_control_view_legacy.xml index 52899132..bcdcb1cb 100644 --- a/app/src/main/res/layout/exo_autoplay_playback_control_view_legacy.xml +++ b/app/src/main/res/layout/exo_autoplay_playback_control_view_legacy.xml @@ -54,14 +54,14 @@ android:layout_height="wrap_content" android:padding="8dp" android:layout_centerInParent="true" - android:src="@drawable/ic_play_arrow_white_rounded_24dp" /> + android:src="@drawable/ic_play_arrow_24dp" /> <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_24dp" /> + android:src="@drawable/ic_pause_24dp" /> <ImageView android:id="@+id/mute_exo_playback_control_view" @@ -69,7 +69,7 @@ android:layout_height="wrap_content" android:padding="8dp" android:layout_toStartOf="@id/fullscreen_exo_playback_control_view" - android:src="@drawable/ic_mute_white_rounded_24dp" + android:src="@drawable/ic_mute_24dp" android:visibility="gone" /> <ImageView diff --git a/app/src/main/res/layout/exo_playback_control_view.xml b/app/src/main/res/layout/exo_playback_control_view.xml index ff97f5dc..096a6f5b 100644 --- a/app/src/main/res/layout/exo_playback_control_view.xml +++ b/app/src/main/res/layout/exo_playback_control_view.xml @@ -1,6 +1,7 @@ <?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:id="@+id/linear_layout_exo_playback_control_view" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -8,40 +9,120 @@ android:paddingStart="16dp" android:paddingEnd="16dp" android:paddingBottom="16dp" - android:background="@color/transparentActionBarAndExoPlayerControllerColor" + android:background="@drawable/trending_search_title_background" android:orientation="vertical"> - <LinearLayout + <TextView + android:id="@+id/title_text_view_exo_playback_control_view" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="center_vertical" + android:gravity="center_vertical" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:textColor="#FFFFFF" + android:textSize="?attr/font_20" + android:fontFamily="?attr/font_family" + android:maxLines="1" + android:ellipsize="end" /> + + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" - android:paddingTop="4dp" - android:orientation="horizontal"> - - <ImageButton android:id="@id/exo_rew" - style="@style/ExoMediaButton.Rewind" /> + android:orientation="horizontal" + android:paddingTop="4dp"> - <ImageButton android:id="@id/exo_play" - style="@style/ExoMediaButton.Play"/> - - <ImageButton android:id="@id/exo_pause" - style="@style/ExoMediaButton.Pause" /> - - <ImageButton android:id="@id/exo_ffwd" - style="@style/ExoMediaButton.FastForward" /> - - <ImageButton + <com.google.android.material.button.MaterialButton android:id="@+id/mute_exo_playback_control_view" - style="@style/ExoMediaButton" - android:visibility="gone" /> - - <ImageButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:strokeWidth="0dp" + app:iconSize="24dp" + app:iconTint="@null" + android:visibility="gone" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + style="?attr/materialIconButtonOutlinedStyle" /> + + <com.google.android.material.button.MaterialButton + android:id="@id/exo_rew" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:strokeWidth="0dp" + app:icon="@drawable/ic_fast_rewind_24dp" + app:iconSize="24dp" + app:iconTint="@null" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/exo_play" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintHorizontal_chainStyle="packed" + style="?attr/materialIconButtonOutlinedStyle" /> + + <com.google.android.material.button.MaterialButton + android:id="@id/exo_play" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:strokeWidth="0dp" + app:icon="@drawable/ic_play_arrow_24dp" + app:iconSize="24dp" + app:iconTint="@null" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/exo_pause" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/exo_rew" + style="?attr/materialIconButtonOutlinedStyle" /> + + <com.google.android.material.button.MaterialButton + android:id="@id/exo_pause" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:strokeWidth="0dp" + app:icon="@drawable/ic_pause_24dp" + app:iconSize="24dp" + app:iconTint="@null" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/exo_ffwd" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/exo_play" + style="?attr/materialIconButtonOutlinedStyle" /> + + <com.google.android.material.button.MaterialButton + android:id="@id/exo_ffwd" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:strokeWidth="0dp" + app:icon="@drawable/ic_fast_forward_24dp" + app:iconSize="24dp" + app:iconTint="@null" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/exo_pause" + style="?attr/materialIconButtonOutlinedStyle" /> + + <com.google.android.material.button.MaterialButton android:id="@+id/hd_exo_playback_control_view" - android:src="@drawable/ic_video_quality_24dp" - style="@style/ExoMediaButton" - android:visibility="gone" /> - - </LinearLayout> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="gone" + app:strokeWidth="0dp" + app:icon="@drawable/ic_video_quality_24dp" + app:iconSize="24dp" + app:iconTint="@null" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + style="?attr/materialIconButtonOutlinedStyle" /> + + </androidx.constraintlayout.widget.ConstraintLayout> <LinearLayout android:layout_width="match_parent" @@ -97,7 +178,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - <TextView + <!--<TextView android:id="@+id/title_text_view_exo_playback_control_view" android:layout_width="0dp" android:layout_height="wrap_content" @@ -110,7 +191,7 @@ android:textSize="?attr/font_20" android:fontFamily="?attr/font_family" android:maxLines="1" - android:ellipsize="end" /> + android:ellipsize="end" />--> <ImageView android:id="@+id/download_image_view_exo_playback_control_view" |