2017-10-03 06:38:46 +00:00
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
2020-10-09 18:24:02 +00:00
xmlns:tools="http://schemas.android.com/tools"
2017-10-03 06:38:46 +00:00
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
2021-01-12 20:15:06 +00:00
tools:context="org.schabi.newpipe.player.PlayQueueActivity">
2017-10-03 06:38:46 +00:00
2019-10-04 12:59:08 +00:00
<com.google.android.material.appbar.AppBarLayout
2017-10-03 06:38:46 +00:00
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2021-03-26 14:12:20 +00:00
android:theme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar">
2017-10-03 06:38:46 +00:00
2019-10-04 12:59:08 +00:00
<androidx.appcompat.widget.Toolbar
2017-10-03 06:38:46 +00:00
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_weight="1"
android:background="?attr/colorPrimary"
2021-03-28 17:44:20 +00:00
android:theme="@style/ToolbarTheme"
2017-10-03 06:38:46 +00:00
app:layout_scrollFlags="scroll|enterAlways"
2020-10-09 18:24:02 +00:00
app:title="@string/app_name" />
2017-10-03 06:38:46 +00:00
2019-10-04 12:59:08 +00:00
</com.google.android.material.appbar.AppBarLayout>
2017-10-03 06:38:46 +00:00
2019-10-04 12:59:08 +00:00
<androidx.recyclerview.widget.RecyclerView
2017-10-03 06:38:46 +00:00
android:id="@+id/play_queue"
android:layout_width="match_parent"
android:layout_height="match_parent"
2021-08-09 18:05:33 +00:00
android:layout_above="@id/metadata"
2020-10-09 18:24:02 +00:00
android:layout_below="@id/appbar"
2017-10-03 06:38:46 +00:00
android:scrollbars="vertical"
app:layoutManager="LinearLayoutManager"
2020-10-09 18:24:02 +00:00
tools:listitem="@layout/play_queue_item" />
2017-10-03 06:38:46 +00:00
2021-08-09 18:05:33 +00:00
<TextView
android:id="@+id/seek_display"
android:layout_width="wrap_content"
2021-08-01 22:46:13 +00:00
android:layout_height="wrap_content"
2021-08-09 18:05:33 +00:00
android:layout_centerInParent="true"
android:layout_above="@id/metadata"
android:background="#c0000000"
android:paddingLeft="30dp"
android:paddingTop="5dp"
android:paddingRight="30dp"
android:paddingBottom="5dp"
android:textColor="@android:color/white"
android:textSize="22sp"
android:textStyle="bold"
android:visibility="gone"
tools:ignore="RtlHardcoded"
tools:text="1:06:29"
tools:visibility="visible" />
2021-08-01 22:46:13 +00:00
2021-08-09 18:05:33 +00:00
<LinearLayout
android:id="@+id/metadata"
2017-10-03 06:38:46 +00:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2021-08-01 22:46:13 +00:00
android:layout_above="@id/progress_bar"
2021-08-09 18:05:33 +00:00
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:orientation="vertical"
android:padding="8dp"
tools:ignore="RtlHardcoded,RtlSymmetry">
2017-10-03 06:38:46 +00:00
2021-08-09 18:05:33 +00:00
<TextView
android:id="@+id/song_name"
2017-10-28 17:08:01 +00:00
android:layout_width="match_parent"
2017-10-03 06:38:46 +00:00
android:layout_height="wrap_content"
2021-08-09 18:05:33 +00:00
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="14sp"
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis nec aliquam augue, eget cursus est. Ut id tristique enim, ut scelerisque tellus. Sed ultricies ipsum non mauris ultricies, commodo malesuada velit porta." />
2017-10-27 02:59:25 +00:00
2021-08-09 18:05:33 +00:00
<TextView
android:id="@+id/artist_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="12sp"
tools:text="Duis posuere arcu condimentum lobortis mattis." />
</LinearLayout>
2017-10-03 06:38:46 +00:00
<LinearLayout
android:id="@+id/progress_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
2017-10-28 17:08:01 +00:00
android:paddingLeft="12dp"
2021-08-01 22:46:13 +00:00
android:paddingRight="12dp"
android:layout_above="@+id/playback_controls">
2017-10-03 06:38:46 +00:00
<TextView
android:id="@+id/current_time"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:minHeight="40dp"
android:text="-:--:--"
android:textColor="?attr/colorAccent"
tools:ignore="HardcodedText"
2020-10-09 18:24:02 +00:00
tools:text="1:06:29" />
2017-10-03 06:38:46 +00:00
2019-10-04 12:59:08 +00:00
<androidx.appcompat.widget.AppCompatSeekBar
2017-10-03 06:38:46 +00:00
android:id="@+id/seek_bar"
style="@style/Widget.AppCompat.SeekBar"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
2017-10-28 17:08:01 +00:00
android:paddingStart="12dp"
2020-10-09 18:24:02 +00:00
android:paddingTop="6dp"
2017-10-28 17:08:01 +00:00
android:paddingEnd="12dp"
2017-10-03 06:38:46 +00:00
android:paddingBottom="4dp"
tools:progress="25"
2020-10-09 18:24:02 +00:00
tools:secondaryProgress="50" />
2017-10-03 06:38:46 +00:00
<TextView
android:id="@+id/end_time"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="-:--:--"
android:textColor="?attr/colorAccent"
tools:ignore="HardcodedText"
2020-10-09 18:24:02 +00:00
tools:text="1:23:49" />
2018-02-27 03:57:59 +00:00
<TextView
android:id="@+id/live_sync"
android:layout_width="wrap_content"
android:layout_height="match_parent"
2020-10-09 18:24:02 +00:00
android:background="?attr/selectableItemBackground"
android:gravity="center"
2018-03-14 03:25:22 +00:00
android:paddingLeft="4dp"
android:paddingRight="4dp"
Multiple localization fixes
With the extractor PR, fixes title & description shown in the wrong language.
Fixed views / spectators counts possibly in the wrong language
Fixed live spectators not showing full count on detail page
Fixed LIVE shown on players, it shows translated instead
Fixed Videos string in search / three dots not available in Weblate
(because it was videos, but there already was a plural string named videos, in Weblate)
Subscriber count is always giving the short count.
We can't get exact number since this YouTube update: https://support.google.com/youtube/thread/6543166
But only short count (B, M, k), so showing full number, eg for 1.9M: 1,900,000, is wrong because the number could be 1,923,490 or 1,897,789…
Added a « sytem default » option to content language and country language selector.
It's the one selected by default (not en-GB anymore then), and correspond to the
language of the system / country of the system
By system I mean phone, tablet, TV…
Fixed russian showing - before time ago (eg 19hrs ago)
This is a workaround fix, I opened an issue on prettytime library repo.
Fixed russian plurals:
other was used instead of many for videos and subscribers
Fixed seek_duration english only
2020-02-14 17:19:35 +00:00
android:text="@string/duration_live"
2018-03-14 03:25:22 +00:00
android:textAllCaps="true"
2018-02-27 03:57:59 +00:00
android:textColor="?attr/colorAccent"
2020-10-09 18:24:02 +00:00
android:visibility="gone" />
2017-10-03 06:38:46 +00:00
</LinearLayout>
<RelativeLayout
android:id="@+id/playback_controls"
android:layout_width="match_parent"
2017-10-28 17:08:01 +00:00
android:layout_height="wrap_content"
2017-10-03 06:38:46 +00:00
android:orientation="horizontal"
2021-08-01 22:46:13 +00:00
android:layout_alignParentBottom="true"
android:layout_marginBottom="12dp"
2017-10-03 06:38:46 +00:00
tools:ignore="RtlHardcoded">
<ImageButton
android:id="@+id/control_repeat"
2017-10-28 17:08:01 +00:00
android:layout_width="30dp"
android:layout_height="30dp"
2017-10-03 06:38:46 +00:00
android:layout_centerVertical="true"
2017-10-10 01:20:11 +00:00
android:layout_marginLeft="5dp"
2017-10-28 17:08:01 +00:00
android:layout_marginRight="5dp"
2020-10-09 18:24:02 +00:00
android:layout_toLeftOf="@+id/control_backward"
2017-10-27 02:59:25 +00:00
android:background="?attr/selectableItemBackgroundBorderless"
2017-10-03 06:38:46 +00:00
android:clickable="true"
android:focusable="true"
android:scaleType="fitXY"
2017-10-28 17:08:01 +00:00
android:tint="?attr/colorAccent"
2021-03-27 14:45:49 +00:00
app:srcCompat="@drawable/ic_repeat"
2020-10-09 18:24:02 +00:00
tools:ignore="ContentDescription" />
2017-10-03 06:38:46 +00:00
2020-07-15 22:15:24 +00:00
<androidx.appcompat.widget.AppCompatImageButton
2017-10-03 06:38:46 +00:00
android:id="@+id/control_backward"
2020-07-21 22:20:30 +00:00
android:layout_width="32dp"
android:layout_height="32dp"
2017-10-03 06:38:46 +00:00
android:layout_centerVertical="true"
2017-10-10 01:20:11 +00:00
android:layout_marginLeft="5dp"
2020-04-14 20:05:51 +00:00
android:layout_toLeftOf="@+id/control_fast_rewind"
2017-10-27 02:59:25 +00:00
android:background="?attr/selectableItemBackgroundBorderless"
2017-10-03 06:38:46 +00:00
android:clickable="true"
android:focusable="true"
android:scaleType="fitCenter"
2017-10-28 17:08:01 +00:00
android:tint="?attr/colorAccent"
2021-03-27 14:45:49 +00:00
app:srcCompat="@drawable/ic_previous"
2020-10-09 18:24:02 +00:00
tools:ignore="ContentDescription" />
2017-10-03 06:38:46 +00:00
2020-04-14 20:05:51 +00:00
<ImageButton
android:id="@+id/control_fast_rewind"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:layout_toLeftOf="@id/control_play_pause"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:focusable="true"
android:scaleType="fitCenter"
2020-10-09 18:24:02 +00:00
android:src="@drawable/exo_controls_rewind"
android:tint="?attr/colorAccent" />
2020-04-14 20:05:51 +00:00
2017-10-03 06:38:46 +00:00
<ImageButton
android:id="@+id/control_play_pause"
android:layout_width="50dp"
2017-10-28 17:08:01 +00:00
android:layout_height="50dp"
2017-10-10 01:20:11 +00:00
android:layout_centerHorizontal="true"
2020-10-09 18:24:02 +00:00
android:layout_centerVertical="true"
2017-10-10 01:20:11 +00:00
android:layout_marginLeft="5dp"
2017-10-03 06:38:46 +00:00
android:layout_marginRight="5dp"
2017-10-27 02:59:25 +00:00
android:background="?attr/selectableItemBackgroundBorderless"
2017-10-03 06:38:46 +00:00
android:clickable="true"
android:focusable="true"
android:scaleType="fitCenter"
2017-10-28 17:08:01 +00:00
android:tint="?attr/colorAccent"
2021-03-27 14:45:49 +00:00
app:srcCompat="@drawable/ic_pause"
2020-10-09 18:24:02 +00:00
tools:ignore="ContentDescription" />
2017-10-03 06:38:46 +00:00
2017-10-13 00:02:07 +00:00
<ProgressBar
android:id="@+id/control_progress_bar"
style="?android:attr/progressBarStyleLargeInverse"
android:layout_width="50dp"
2017-10-28 17:08:01 +00:00
android:layout_height="50dp"
2017-10-13 00:02:07 +00:00
android:layout_centerInParent="true"
2020-10-09 18:24:02 +00:00
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
2017-10-13 00:02:07 +00:00
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#00000000"
android:clickable="false"
android:indeterminate="true"
2020-10-09 18:24:02 +00:00
android:padding="2dp"
android:scaleType="fitCenter"
android:tint="?attr/colorAccent"
2017-10-28 17:08:01 +00:00
android:visibility="invisible"
2020-10-09 18:24:02 +00:00
tools:visibility="visible" />
2017-10-13 00:02:07 +00:00
2020-04-14 20:05:51 +00:00
<ImageButton
android:id="@+id/control_fast_forward"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:layout_toRightOf="@id/control_play_pause"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:focusable="true"
android:scaleType="fitCenter"
2020-10-09 18:24:02 +00:00
android:src="@drawable/exo_controls_fastforward"
android:tint="?attr/colorAccent" />
2020-04-14 20:05:51 +00:00
2020-07-15 22:15:24 +00:00
<androidx.appcompat.widget.AppCompatImageButton
2017-10-03 06:38:46 +00:00
android:id="@+id/control_forward"
2020-07-21 22:20:30 +00:00
android:layout_width="32dp"
android:layout_height="32dp"
2017-10-03 06:38:46 +00:00
android:layout_centerVertical="true"
2017-10-10 01:20:11 +00:00
android:layout_marginRight="5dp"
2020-04-14 20:05:51 +00:00
android:layout_toRightOf="@+id/control_fast_forward"
2017-10-27 02:59:25 +00:00
android:background="?attr/selectableItemBackgroundBorderless"
2017-10-03 06:38:46 +00:00
android:clickable="true"
android:focusable="true"
android:scaleType="fitCenter"
2017-10-28 17:08:01 +00:00
android:tint="?attr/colorAccent"
2021-03-27 14:45:49 +00:00
app:srcCompat="@drawable/ic_next"
2020-10-09 18:24:02 +00:00
tools:ignore="ContentDescription" />
2017-10-10 01:20:11 +00:00
<ImageButton
android:id="@+id/control_shuffle"
2017-10-28 17:08:01 +00:00
android:layout_width="30dp"
android:layout_height="30dp"
2017-10-10 01:20:11 +00:00
android:layout_centerVertical="true"
2017-10-28 17:08:01 +00:00
android:layout_marginLeft="5dp"
2017-10-10 01:20:11 +00:00
android:layout_marginRight="5dp"
2020-10-09 18:24:02 +00:00
android:layout_toRightOf="@+id/control_forward"
2017-10-27 02:59:25 +00:00
android:background="?attr/selectableItemBackgroundBorderless"
2017-10-10 01:20:11 +00:00
android:clickable="true"
android:focusable="true"
android:scaleType="fitXY"
2017-10-28 17:08:01 +00:00
android:tint="?attr/colorAccent"
2021-03-27 14:45:49 +00:00
app:srcCompat="@drawable/ic_shuffle"
2020-10-09 18:24:02 +00:00
tools:ignore="ContentDescription" />
2017-10-10 02:52:23 +00:00
2017-10-03 06:38:46 +00:00
</RelativeLayout>
2020-10-09 18:24:02 +00:00
</RelativeLayout>