1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-25 12:32:31 +01:00

Added seekbar-preview to the player layout

This commit is contained in:
litetex 2021-06-08 21:33:44 +02:00
parent 43133df2ad
commit 2e2dbaf77f
2 changed files with 104 additions and 54 deletions

View File

@ -103,8 +103,8 @@
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
android:visibility="gone" android:visibility="gone"
app:tint="@color/white"
app:srcCompat="@drawable/ic_close" app:srcCompat="@drawable/ic_close"
app:tint="@color/white"
tools:ignore="ContentDescription,RtlHardcoded" /> tools:ignore="ContentDescription,RtlHardcoded" />
<LinearLayout <LinearLayout
@ -189,8 +189,8 @@
android:paddingBottom="3dp" android:paddingBottom="3dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:visibility="gone" android:visibility="gone"
app:tint="@color/white"
app:srcCompat="@drawable/ic_list" app:srcCompat="@drawable/ic_list"
app:tint="@color/white"
tools:ignore="ContentDescription,RtlHardcoded" tools:ignore="ContentDescription,RtlHardcoded"
tools:visibility="visible" /> tools:visibility="visible" />
@ -208,8 +208,8 @@
android:paddingBottom="3dp" android:paddingBottom="3dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:visibility="gone" android:visibility="gone"
app:tint="@color/white"
app:srcCompat="@drawable/ic_format_list_numbered" app:srcCompat="@drawable/ic_format_list_numbered"
app:tint="@color/white"
tools:ignore="ContentDescription,RtlHardcoded" tools:ignore="ContentDescription,RtlHardcoded"
tools:visibility="visible" /> tools:visibility="visible" />
@ -222,8 +222,8 @@
android:focusable="true" android:focusable="true"
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
app:tint="@color/white"
app:srcCompat="@drawable/ic_expand_more" app:srcCompat="@drawable/ic_expand_more"
app:tint="@color/white"
tools:ignore="ContentDescription,RtlHardcoded" /> tools:ignore="ContentDescription,RtlHardcoded" />
</LinearLayout> </LinearLayout>
@ -287,8 +287,8 @@
android:focusable="true" android:focusable="true"
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
app:tint="@color/white"
app:srcCompat="@drawable/ic_cast" app:srcCompat="@drawable/ic_cast"
app:tint="@color/white"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
@ -302,8 +302,8 @@
android:focusable="true" android:focusable="true"
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
app:tint="@color/white"
app:srcCompat="@drawable/ic_language" app:srcCompat="@drawable/ic_language"
app:tint="@color/white"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
@ -317,8 +317,8 @@
android:focusable="true" android:focusable="true"
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
app:tint="@color/white"
app:srcCompat="@drawable/ic_share" app:srcCompat="@drawable/ic_share"
app:tint="@color/white"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
@ -331,8 +331,8 @@
android:focusable="true" android:focusable="true"
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
app:tint="@color/white"
app:srcCompat="@drawable/ic_volume_off" app:srcCompat="@drawable/ic_volume_off"
app:tint="@color/white"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
@ -345,8 +345,8 @@
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:visibility="gone" android:visibility="gone"
app:tint="@color/white"
app:srcCompat="@drawable/ic_fullscreen" app:srcCompat="@drawable/ic_fullscreen"
app:tint="@color/white"
tools:ignore="ContentDescription,RtlHardcoded" tools:ignore="ContentDescription,RtlHardcoded"
tools:visibility="visible" /> tools:visibility="visible" />
@ -354,6 +354,49 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/bottomSeekbarPreviewLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/bottomControls"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/seekbarPreviewContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/currentSeekbarPreviewThumbnail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="3dp"
android:visibility="gone"
app:srcCompat="@drawable/dummy_thumbnail"
tools:visibility="visible" />
<TextView
android:id="@+id/currentDisplaySeek"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#60000000"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:textColor="@android:color/white"
android:textSize="14sp"
android:textStyle="bold"
android:visibility="gone"
tools:ignore="RtlHardcoded"
tools:text="1:06:29"
tools:visibility="visible" />
</LinearLayout>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/bottomControls" android:id="@+id/bottomControls"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -685,24 +728,6 @@
tools:src="@drawable/ic_brightness_high" /> tools:src="@drawable/ic_brightness_high" />
</RelativeLayout> </RelativeLayout>
<TextView
android:id="@+id/currentDisplaySeek"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="58dp"
android:background="#64000000"
android:paddingLeft="30dp"
android:paddingTop="10dp"
android:paddingRight="30dp"
android:paddingBottom="10dp"
android:textColor="@android:color/white"
android:textSize="26sp"
android:textStyle="bold"
android:visibility="gone"
tools:ignore="RtlHardcoded"
tools:text="1:06:29"
tools:visibility="visible" />
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>

View File

@ -101,8 +101,8 @@
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
android:visibility="gone" android:visibility="gone"
app:tint="@color/white"
app:srcCompat="@drawable/ic_close" app:srcCompat="@drawable/ic_close"
app:tint="@color/white"
tools:ignore="ContentDescription,RtlHardcoded" /> tools:ignore="ContentDescription,RtlHardcoded" />
<LinearLayout <LinearLayout
@ -191,8 +191,8 @@
android:paddingBottom="3dp" android:paddingBottom="3dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:visibility="gone" android:visibility="gone"
app:tint="@color/white"
app:srcCompat="@drawable/ic_list" app:srcCompat="@drawable/ic_list"
app:tint="@color/white"
tools:ignore="ContentDescription,RtlHardcoded" /> tools:ignore="ContentDescription,RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
@ -209,8 +209,8 @@
android:paddingBottom="3dp" android:paddingBottom="3dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:visibility="gone" android:visibility="gone"
app:tint="@color/white"
app:srcCompat="@drawable/ic_format_list_numbered" app:srcCompat="@drawable/ic_format_list_numbered"
app:tint="@color/white"
tools:ignore="ContentDescription,RtlHardcoded" /> tools:ignore="ContentDescription,RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
@ -222,8 +222,8 @@
android:focusable="true" android:focusable="true"
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
app:tint="@color/white"
app:srcCompat="@drawable/ic_expand_more" app:srcCompat="@drawable/ic_expand_more"
app:tint="@color/white"
tools:ignore="ContentDescription,RtlHardcoded" /> tools:ignore="ContentDescription,RtlHardcoded" />
</LinearLayout> </LinearLayout>
@ -286,8 +286,8 @@
android:focusable="true" android:focusable="true"
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
app:tint="@color/white"
app:srcCompat="@drawable/ic_cast" app:srcCompat="@drawable/ic_cast"
app:tint="@color/white"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
@ -301,8 +301,8 @@
android:focusable="true" android:focusable="true"
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
app:tint="@color/white"
app:srcCompat="@drawable/ic_language" app:srcCompat="@drawable/ic_language"
app:tint="@color/white"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
@ -316,8 +316,8 @@
android:focusable="true" android:focusable="true"
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
app:tint="@color/white"
app:srcCompat="@drawable/ic_share" app:srcCompat="@drawable/ic_share"
app:tint="@color/white"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
@ -330,8 +330,8 @@
android:focusable="true" android:focusable="true"
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitXY" android:scaleType="fitXY"
app:tint="@color/white"
app:srcCompat="@drawable/ic_volume_off" app:srcCompat="@drawable/ic_volume_off"
app:tint="@color/white"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
@ -344,8 +344,8 @@
android:padding="@dimen/player_main_buttons_padding" android:padding="@dimen/player_main_buttons_padding"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:visibility="gone" android:visibility="gone"
app:tint="@color/white"
app:srcCompat="@drawable/ic_fullscreen" app:srcCompat="@drawable/ic_fullscreen"
app:tint="@color/white"
tools:ignore="ContentDescription,RtlHardcoded" tools:ignore="ContentDescription,RtlHardcoded"
tools:visibility="visible" /> tools:visibility="visible" />
@ -353,6 +353,49 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/bottomSeekbarPreviewLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/bottomControls"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/seekbarPreviewContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/currentSeekbarPreviewThumbnail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="3dp"
android:visibility="gone"
app:srcCompat="@drawable/dummy_thumbnail"
tools:visibility="visible" />
<TextView
android:id="@+id/currentDisplaySeek"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#60000000"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:textColor="@android:color/white"
android:textSize="14sp"
android:textStyle="bold"
android:visibility="gone"
tools:ignore="RtlHardcoded"
tools:text="1:06:29"
tools:visibility="visible" />
</LinearLayout>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/bottomControls" android:id="@+id/bottomControls"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -681,24 +724,6 @@
tools:src="@drawable/ic_brightness" /> tools:src="@drawable/ic_brightness" />
</RelativeLayout> </RelativeLayout>
<TextView
android:id="@+id/currentDisplaySeek"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="58dp"
android:background="#64000000"
android:paddingLeft="30dp"
android:paddingTop="10dp"
android:paddingRight="30dp"
android:paddingBottom="10dp"
android:textColor="@android:color/white"
android:textSize="26sp"
android:textStyle="bold"
android:visibility="gone"
tools:ignore="RtlHardcoded"
tools:text="1:06:29"
tools:visibility="visible" />
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>