All players in one place
- main, background, popup players now connected via one service, one view, one fragment, one activity and one gesture listener - playback position is synchronized between players. Easy to switch from one to another - expandable player at the bottom of the screen with cool animation and additional features like long click to open channel of a video, play/pause/close buttons and swipe down to dismiss - in-player integrated buttons for opening in browser, playing with Kodi, sharing a video - better background playback that can be activated in settings. Allows to automatically switch to audio-only mode when going to background and then switching to video-mode when returning to the app.
This commit is contained in:
parent
f9e7873e54
commit
c45514b989
29 changed files with 4057 additions and 531 deletions
|
|
@ -2,9 +2,10 @@
|
|||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/black"
|
||||
android:gravity="center">
|
||||
|
||||
<com.google.android.exoplayer2.ui.AspectRatioFrameLayout
|
||||
|
|
@ -49,9 +50,9 @@
|
|||
<RelativeLayout
|
||||
android:id="@+id/playQueuePanel"
|
||||
android:layout_width="380dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="invisible"
|
||||
android:background="?attr/queue_background_color"
|
||||
tools:visibility="visible">
|
||||
|
|
@ -120,7 +121,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/playQueueControl"
|
||||
android:scrollbars="vertical"
|
||||
app:layoutManager="LinearLayoutManager"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/play_queue_item"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -133,37 +134,46 @@
|
|||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<!-- All top controls in this layout -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/playbackWindowRoot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/topControls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/player_top_controls_bg"
|
||||
android:orientation="vertical"
|
||||
android:gravity="top"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:baselineAligned="false"
|
||||
android:layout_toStartOf="@id/fullScreenButton">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/primaryControls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="top"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="6dp"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/metadataView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@+id/qualityTextView"
|
||||
android:gravity="top"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
tools:ignore="RtlHardcoded">
|
||||
tools:ignore="RtlHardcoded"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
|
|
@ -204,13 +214,13 @@
|
|||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_toLeftOf="@+id/playbackSpeed"
|
||||
android:gravity="center"
|
||||
android:minWidth="50dp"
|
||||
android:text="720p"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:visibility="visible"
|
||||
tools:ignore="HardcodedText,RtlHardcoded"/>
|
||||
|
||||
<TextView
|
||||
|
|
@ -218,7 +228,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_toLeftOf="@+id/queueButton"
|
||||
android:gravity="center"
|
||||
android:minHeight="35dp"
|
||||
android:minWidth="40dp"
|
||||
|
|
@ -226,7 +235,7 @@
|
|||
android:textStyle="bold"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="1x" />
|
||||
tools:text="1x"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/queueButton"
|
||||
|
|
@ -234,20 +243,19 @@
|
|||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_toLeftOf="@+id/moreOptionsButton"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_list_white_24dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
tools:ignore="ContentDescription,RtlHardcoded"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/moreOptionsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:padding="5dp"
|
||||
android:clickable="true"
|
||||
|
|
@ -256,16 +264,18 @@
|
|||
android:src="@drawable/ic_expand_more_white_24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/secondaryControls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/topControls"
|
||||
android:gravity="top"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:visibility="invisible"
|
||||
tools:ignore="RtlHardcoded"
|
||||
tools:visibility="visible">
|
||||
|
|
@ -274,9 +284,7 @@
|
|||
android:id="@+id/resizeTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:gravity="center"
|
||||
android:minWidth="50dp"
|
||||
android:textColor="@android:color/white"
|
||||
|
|
@ -291,18 +299,50 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_toLeftOf="@id/switchBackground"
|
||||
android:layout_toRightOf="@id/resizeTextView"
|
||||
android:gravity="center|left"
|
||||
android:minHeight="35dp"
|
||||
android:minWidth="40dp"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="2dp"
|
||||
android:minWidth="50dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
tools:ignore="RelativeOverlap,RtlHardcoded"
|
||||
tools:text="English" />
|
||||
tools:text="English"/>
|
||||
|
||||
<Space
|
||||
android:id="@+id/spaceBeforeButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="3"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playWithKodi"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_channel_white_24dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/play_with_kodi_title"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/openInBrowser"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_language_white_24dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/open_in_browser"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/share"
|
||||
|
|
@ -310,8 +350,6 @@
|
|||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
|
|
@ -321,56 +359,25 @@
|
|||
android:contentDescription="@string/share"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/toggleOrientation"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@id/share"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_screen_rotation_white"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/toggle_orientation"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/switchPopup"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:id="@+id/fullScreenButton"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@id/toggleOrientation"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="4dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/player_top_controls_bg"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_fullscreen_exit_white"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/switch_to_popup"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/switchBackground"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@id/switchPopup"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_headset_white_24dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/switch_to_background"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
</RelativeLayout>
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_fullscreen_white"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottomControls"
|
||||
|
|
@ -380,6 +387,7 @@
|
|||
android:background="@drawable/player_controls_bg"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="2dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
|
||||
|
|
@ -388,7 +396,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:minHeight="40dp"
|
||||
android:minHeight="30dp"
|
||||
android:text="-:--:--"
|
||||
android:textColor="@android:color/white"
|
||||
tools:ignore="HardcodedText"
|
||||
|
|
@ -433,65 +441,52 @@
|
|||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="5.5">
|
||||
<!--tools:visibility="gone">-->
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playPauseButton"
|
||||
android:layout_width="100dp"
|
||||
android:id="@+id/playPreviousButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitXY"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/exo_controls_previous"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playPauseButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_pause_white"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playPreviousButton"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toLeftOf="@id/playPauseButton"
|
||||
android:layout_toStartOf="@id/playPauseButton"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/exo_controls_previous"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playNextButton"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toRightOf="@id/playPauseButton"
|
||||
android:layout_toEndOf="@id/playPauseButton"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitXY"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/exo_controls_next"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/closeButton"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/playPauseButton"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:text="@string/close"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
@ -533,10 +528,7 @@
|
|||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_toEndOf="@+id/loading_panel"
|
||||
android:layout_toRightOf="@+id/loading_panel"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<RelativeLayout
|
||||
|
|
@ -611,4 +603,42 @@
|
|||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/resizing_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left|top"
|
||||
android:background="#6e000000"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/popup_resizing_indicator_title"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:ignore="RtlHardcoded"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:id="@+id/closingOverlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#AAFF0000"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/closeButton"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:text="@string/close"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/windowBackground">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/video_item_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -17,6 +22,30 @@
|
|||
android:layout_weight="5"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
android:fillViewport="true">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tablayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="bottom|center"
|
||||
app:tabBackground="@drawable/tab_selector"
|
||||
app:tabGravity="center"
|
||||
app:tabIndicatorHeight="0dp"/>
|
||||
|
||||
</androidx.viewpager.widget.ViewPager>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbarlayout"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -144,6 +173,13 @@
|
|||
tools:progress="40"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- Player will be inserted here in realtime -->
|
||||
<FrameLayout
|
||||
android:id="@+id/player_placeholder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
|
@ -153,7 +189,6 @@
|
|||
android:id="@+id/detail_content_root_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:windowBackground"
|
||||
app:layout_scrollFlags="scroll">
|
||||
|
||||
<!-- TITLE -->
|
||||
|
|
@ -506,26 +541,6 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tablayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:background="@color/transparent_background_color"
|
||||
app:tabBackground="@drawable/tab_selector"
|
||||
app:tabGravity="center"
|
||||
app:tabIndicatorHeight="0dp">
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<FrameLayout
|
||||
|
|
@ -537,3 +552,105 @@
|
|||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/overlay_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"
|
||||
tools:alpha="1"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:paddingRight="@dimen/video_item_search_padding"
|
||||
android:background="?attr/windowBackground" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overlay_thumbnail"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:gravity="center_vertical"
|
||||
android:contentDescription="@string/list_thumbnail_view_description"
|
||||
android:src="@drawable/dummy_thumbnail"
|
||||
android:background="@color/transparent_background_color"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/overlay_metadata_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:paddingRight="@dimen/video_item_search_padding"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_toEndOf="@+id/overlay_thumbnail"
|
||||
android:layout_toStartOf="@+id/overlay_buttons_layout"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overlay_title_text_view"
|
||||
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/textAppearanceLarge"
|
||||
android:textSize="@dimen/video_item_search_title_text_size"
|
||||
tools:ignore="RtlHardcoded"
|
||||
tools:text="The Video Title LONG very LONVideo Title LONG very LONG"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overlay_channel_text_view"
|
||||
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/textAppearanceSmall"
|
||||
android:textSize="@dimen/video_item_search_uploader_text_size"
|
||||
tools:text="The Video Artist LONG very LONG very Long"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/overlay_buttons_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overlay_play_pause_button"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:padding="10dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_pause_white_24dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overlay_close_button"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:padding="10dp"
|
||||
android:scaleType="center"
|
||||
android:src="?attr/close"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -22,6 +23,23 @@
|
|||
<include layout="@layout/toolbar_layout" />
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment_player_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:layout_behavior="org.schabi.newpipe.player.event.CustomBottomSheetBehavior">
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
<include layout="@layout/drawer_layout"/>
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@
|
|||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/black"
|
||||
android:gravity="center">
|
||||
|
||||
<com.google.android.exoplayer2.ui.AspectRatioFrameLayout
|
||||
|
|
@ -118,7 +119,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/playQueueControl"
|
||||
android:scrollbars="vertical"
|
||||
app:layoutManager="LinearLayoutManager"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/play_queue_item"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -131,37 +132,46 @@
|
|||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<!-- All top controls in this layout -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/playbackWindowRoot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/topControls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/player_top_controls_bg"
|
||||
android:orientation="vertical"
|
||||
android:gravity="top"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:baselineAligned="false"
|
||||
android:layout_toStartOf="@id/fullScreenButton">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/primaryControls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="top"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="6dp"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/metadataView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@+id/qualityTextView"
|
||||
android:gravity="top"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
tools:ignore="RtlHardcoded">
|
||||
tools:ignore="RtlHardcoded"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
|
|
@ -202,13 +212,13 @@
|
|||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_toLeftOf="@+id/playbackSpeed"
|
||||
android:gravity="center"
|
||||
android:minWidth="50dp"
|
||||
android:text="720p"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:visibility="visible"
|
||||
tools:ignore="HardcodedText,RtlHardcoded"/>
|
||||
|
||||
<TextView
|
||||
|
|
@ -216,7 +226,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_toLeftOf="@+id/queueButton"
|
||||
android:gravity="center"
|
||||
android:minHeight="35dp"
|
||||
android:minWidth="40dp"
|
||||
|
|
@ -224,7 +233,7 @@
|
|||
android:textStyle="bold"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="1x" />
|
||||
tools:text="1x"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/queueButton"
|
||||
|
|
@ -232,20 +241,19 @@
|
|||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_toLeftOf="@+id/moreOptionsButton"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_list_white_24dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
tools:ignore="ContentDescription,RtlHardcoded"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/moreOptionsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:padding="5dp"
|
||||
android:clickable="true"
|
||||
|
|
@ -254,16 +262,18 @@
|
|||
android:src="@drawable/ic_expand_more_white_24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/secondaryControls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/topControls"
|
||||
android:gravity="top"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:visibility="invisible"
|
||||
tools:ignore="RtlHardcoded"
|
||||
tools:visibility="visible">
|
||||
|
|
@ -272,9 +282,7 @@
|
|||
android:id="@+id/resizeTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:gravity="center"
|
||||
android:minWidth="50dp"
|
||||
android:textColor="@android:color/white"
|
||||
|
|
@ -289,18 +297,50 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_toLeftOf="@id/switchBackground"
|
||||
android:layout_toRightOf="@id/resizeTextView"
|
||||
android:gravity="center|left"
|
||||
android:minHeight="35dp"
|
||||
android:minWidth="40dp"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="2dp"
|
||||
android:minWidth="50dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
tools:ignore="RelativeOverlap,RtlHardcoded"
|
||||
tools:text="English" />
|
||||
tools:text="English"/>
|
||||
|
||||
<Space
|
||||
android:id="@+id/spaceBeforeButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="3"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playWithKodi"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_channel_white_24dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/play_with_kodi_title"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/openInBrowser"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_language_white_24dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/open_in_browser"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/share"
|
||||
|
|
@ -308,8 +348,6 @@
|
|||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
|
|
@ -319,56 +357,25 @@
|
|||
android:contentDescription="@string/share"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/toggleOrientation"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@id/share"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_screen_rotation_white"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/toggle_orientation"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/switchPopup"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:id="@+id/fullScreenButton"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@id/toggleOrientation"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="4dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/player_top_controls_bg"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_fullscreen_exit_white"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/switch_to_popup"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/switchBackground"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_toLeftOf="@id/switchPopup"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_headset_white_24dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/switch_to_background"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
</RelativeLayout>
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_fullscreen_white"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottomControls"
|
||||
|
|
@ -378,6 +385,7 @@
|
|||
android:background="@drawable/player_controls_bg"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="2dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
|
||||
|
|
@ -386,7 +394,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:minHeight="40dp"
|
||||
android:minHeight="30dp"
|
||||
android:text="-:--:--"
|
||||
android:textColor="@android:color/white"
|
||||
tools:ignore="HardcodedText"
|
||||
|
|
@ -431,65 +439,52 @@
|
|||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="5.5">
|
||||
<!--tools:visibility="gone">-->
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playPauseButton"
|
||||
android:layout_width="100dp"
|
||||
android:id="@+id/playPreviousButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitXY"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/exo_controls_previous"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playPauseButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_pause_white"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playPreviousButton"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toLeftOf="@id/playPauseButton"
|
||||
android:layout_toStartOf="@id/playPauseButton"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/exo_controls_previous"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playNextButton"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toRightOf="@id/playPauseButton"
|
||||
android:layout_toEndOf="@id/playPauseButton"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitXY"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/exo_controls_next"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/closeButton"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/playPauseButton"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:text="@string/close"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
@ -531,10 +526,7 @@
|
|||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_toEndOf="@+id/loading_panel"
|
||||
android:layout_toRightOf="@+id/loading_panel"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<RelativeLayout
|
||||
|
|
@ -609,4 +601,42 @@
|
|||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/resizing_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left|top"
|
||||
android:background="#6e000000"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/popup_resizing_indicator_title"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:ignore="RtlHardcoded"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:id="@+id/closingOverlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#AAFF0000"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/closeButton"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:text="@string/close"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -5,13 +5,44 @@
|
|||
android:id="@+id/video_item_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/windowBackground"
|
||||
android:focusableInTouchMode="true">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/detail_main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!--
|
||||
You may wonder why this NestedScrollView locates on top of the file. That's because BottomSheetBehavior
|
||||
can work well only with one element that implements nested scrolling. But we have two:
|
||||
one NestedScrollView for ViewPager with id = viewpager here
|
||||
second ViewPager with id = playQueue inside activity_main_player.xml.
|
||||
By placing this NestedScrollView on top of the file we are getting this ViewPager working -->
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
android:fillViewport="true">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tablayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="bottom|center"
|
||||
app:tabBackground="@drawable/tab_selector"
|
||||
app:tabGravity="center"
|
||||
app:tabIndicatorHeight="0dp"/>
|
||||
|
||||
</androidx.viewpager.widget.ViewPager>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbarlayout"
|
||||
|
|
@ -140,6 +171,13 @@
|
|||
tools:progress="40"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- Player will be inserted here in realtime -->
|
||||
<FrameLayout
|
||||
android:id="@+id/player_placeholder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
|
@ -149,7 +187,6 @@
|
|||
android:id="@+id/detail_content_root_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:windowBackground"
|
||||
app:layout_scrollFlags="scroll">
|
||||
|
||||
<!-- TITLE -->
|
||||
|
|
@ -504,25 +541,106 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tablayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:background="@color/transparent_background_color"
|
||||
app:tabBackground="@drawable/tab_selector"
|
||||
app:tabGravity="center"
|
||||
app:tabIndicatorHeight="0dp">
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/overlay_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"
|
||||
tools:alpha="1"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:paddingRight="@dimen/video_item_search_padding"
|
||||
android:background="?attr/windowBackground" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overlay_thumbnail"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:gravity="center_vertical"
|
||||
android:contentDescription="@string/list_thumbnail_view_description"
|
||||
android:src="@drawable/dummy_thumbnail"
|
||||
android:background="@color/transparent_background_color"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/overlay_metadata_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:paddingRight="@dimen/video_item_search_padding"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_toEndOf="@+id/overlay_thumbnail"
|
||||
android:layout_toStartOf="@+id/overlay_buttons_layout"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overlay_title_text_view"
|
||||
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/textAppearanceLarge"
|
||||
android:textSize="@dimen/video_item_search_title_text_size"
|
||||
tools:ignore="RtlHardcoded"
|
||||
tools:text="The Video Title LONG very LONVideo Title LONG very LONG"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overlay_channel_text_view"
|
||||
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/textAppearanceSmall"
|
||||
android:textSize="@dimen/video_item_search_uploader_text_size"
|
||||
tools:text="The Video Artist LONG very LONG very Long"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/overlay_buttons_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overlay_play_pause_button"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:padding="10dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_pause_white_24dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overlay_close_button"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:padding="10dp"
|
||||
android:scaleType="center"
|
||||
android:src="?attr/close"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
|
|||
|
|
@ -7,4 +7,9 @@
|
|||
android:orderInCategory="1999"
|
||||
android:title="@string/switch_to_popup"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item android:id="@+id/action_switch_background"
|
||||
android:orderInCategory="999"
|
||||
android:title="@string/switch_to_background"
|
||||
app:showAsAction="never"/>
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
<dimen name="video_item_detail_like_image_height">18sp</dimen>
|
||||
<dimen name="video_item_detail_like_image_width">18sp</dimen>
|
||||
<dimen name="channel_avatar_size">70dp</dimen>
|
||||
<dimen name="mini_player_height">60dp</dimen>
|
||||
<!-- Paddings & Margins -->
|
||||
<dimen name="video_item_detail_like_margin">5dp</dimen>
|
||||
<dimen name="video_item_detail_error_panel_margin">50dp</dimen>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="@string/enable_playback_resume_key"
|
||||
android:key="@string/enable_playback_state_lists_key"
|
||||
android:summary="@string/enable_playback_state_lists_summary"
|
||||
android:title="@string/enable_playback_state_lists_title"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue