forked from recloudstream/cloudstream
player stuff
This commit is contained in:
parent
8a49401dd0
commit
0f5de62e92
23 changed files with 902 additions and 5 deletions
|
@ -197,8 +197,8 @@ class ShiroProvider : MainAPI() {
|
|||
if (isDubbed) episodes else null,
|
||||
if (!isDubbed) episodes else null,
|
||||
status,
|
||||
ArrayList(data.genres ?: ArrayList()),
|
||||
data.synopsis,
|
||||
ArrayList(data.genres ?: ArrayList()),
|
||||
ArrayList(data.synonyms ?: ArrayList()),
|
||||
null,
|
||||
null,
|
||||
|
|
|
@ -111,6 +111,7 @@ class ResultFragment : Fragment() {
|
|||
}
|
||||
|
||||
observe(viewModel.episodes) { episodes ->
|
||||
if(result_episodes == null) return@observe
|
||||
(result_episodes.adapter as EpisodeAdapter).cardList = episodes
|
||||
(result_episodes.adapter as EpisodeAdapter).notifyDataSetChanged()
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ class ResultViewModel : ViewModel() {
|
|||
|
||||
val allEpisodes: LiveData<HashMap<Int, ArrayList<ExtractorLink>>> get() = _allEpisodes
|
||||
|
||||
private lateinit var _apiName: MutableLiveData<String>
|
||||
private var _apiName: MutableLiveData<String> = MutableLiveData()
|
||||
|
||||
fun loadEpisode(episode: ResultEpisode, callback: (Resource<Boolean>) -> Unit) {
|
||||
loadEpisode(episode.id, episode.data, callback)
|
||||
|
|
|
@ -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="M19,12h-2v3h-3v2h5v-5zM7,9h3L10,7L5,7v5h2L7,9zM21,3L3,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,5c0,-1.1 -0.9,-2 -2,-2zM21,19.01L3,19.01L3,4.99h18v14.02z"/>
|
||||
</vector>
|
|
@ -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="M20,8.69L20,4h-4.69L12,0.69 8.69,4L4,4v4.69L0.69,12 4,15.31L4,20h4.69L12,23.31 15.31,20L20,20v-4.69L23.31,12 20,8.69zM12,18c-3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6 6,2.69 6,6 -2.69,6 -6,6zM12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4z"/>
|
||||
</vector>
|
|
@ -0,0 +1,8 @@
|
|||
<vector android:autoMirrored="true" 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="M3,10h11v2h-11z"/>
|
||||
<path android:fillColor="@android:color/white" android:pathData="M3,6h11v2h-11z"/>
|
||||
<path android:fillColor="@android:color/white" android:pathData="M3,14h7v2h-7z"/>
|
||||
<path android:fillColor="@android:color/white" android:pathData="M16,13l0,8l6,-4z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_baseline_speed_24.xml
Normal file
5
app/src/main/res/drawable/ic_baseline_speed_24.xml
Normal file
|
@ -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="M20.38,8.57l-1.23,1.85a8,8 0,0 1,-0.22 7.58L5.07,18A8,8 0,0 1,15.58 6.85l1.85,-1.23A10,10 0,0 0,3.35 19a2,2 0,0 0,1.72 1h13.85a2,2 0,0 0,1.74 -1,10 10,0 0,0 -0.27,-10.44zM10.59,15.41a2,2 0,0 0,2.83 0l5.66,-8.49 -8.49,5.66a2,2 0,0 0,0 2.83z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_baseline_volume_up_24.xml
Normal file
5
app/src/main/res/drawable/ic_baseline_volume_up_24.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:autoMirrored="true" 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="M3,9v6h4l5,5L12,4L7,9L3,9zM16.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.77s-2.99,-7.86 -7,-8.77z"/>
|
||||
</vector>
|
12
app/src/main/res/drawable/netflix_pause.xml
Normal file
12
app/src/main/res/drawable/netflix_pause.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="850.39dp"
|
||||
android:height="850.39dp"
|
||||
android:viewportWidth="850.39"
|
||||
android:viewportHeight="850.39">
|
||||
<path
|
||||
android:pathData="M267.01,189.64h99.74v470.26h-99.74z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M463.01,188.79h99.74v470.26h-99.74z"
|
||||
android:fillColor="#fff"/>
|
||||
</vector>
|
9
app/src/main/res/drawable/netflix_play.xml
Normal file
9
app/src/main/res/drawable/netflix_play.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="850.4dp"
|
||||
android:height="850.4dp"
|
||||
android:viewportWidth="850.4"
|
||||
android:viewportHeight="850.4">
|
||||
<path
|
||||
android:pathData="M674.6,424.6l-417.7,-241.2l0,482.4z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
23
app/src/main/res/drawable/netflix_skip_back.xml
Normal file
23
app/src/main/res/drawable/netflix_skip_back.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="850.39dp"
|
||||
android:height="850.39dp"
|
||||
android:viewportWidth="850.39"
|
||||
android:viewportHeight="850.39">
|
||||
<path
|
||||
android:pathData="M143.05,279.28A317.41,317.41 0,0 0,106.3 428c0,176.13 142.77,318.9 318.9,318.9S744.09,604.16 744.09,428 601.32,109.14 425.2,109.14q-14.15,0 -28,1.2"
|
||||
android:strokeWidth="45"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M483.083,223.108l-111.666,-111.666l25.442,-25.442l111.666,111.666z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M371.421,111.662l111.666,-111.666l25.442,25.442l-111.666,111.666z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M398.087,223.272l-111.666,-111.666l25.442,-25.442l111.666,111.666z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M286.427,111.826l111.666,-111.666l25.442,25.442l-111.666,111.666z"
|
||||
android:fillColor="#fff"/>
|
||||
</vector>
|
23
app/src/main/res/drawable/netflix_skip_forward.xml
Normal file
23
app/src/main/res/drawable/netflix_skip_forward.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="850.39dp"
|
||||
android:height="850.39dp"
|
||||
android:viewportWidth="850.39"
|
||||
android:viewportHeight="850.39">
|
||||
<path
|
||||
android:pathData="M707.35,279.28A317.52,317.52 0,0 1,744.09 428c0,176.13 -142.77,318.9 -318.89,318.9S106.3,604.16 106.3,428 249.07,109.14 425.2,109.14q14.13,0 28,1.2"
|
||||
android:strokeWidth="45"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M341.86,197.665l111.666,-111.666l25.442,25.442l-111.666,111.666z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M453.524,137.111l-111.666,-111.666l25.442,-25.442l111.666,111.666z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M426.864,197.831l111.666,-111.666l25.442,25.442l-111.666,111.666z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M538.53,137.277l-111.666,-111.666l25.442,-25.442l111.666,111.666z"
|
||||
android:fillColor="#fff"/>
|
||||
</vector>
|
21
app/src/main/res/drawable/outline_card.xml
Normal file
21
app/src/main/res/drawable/outline_card.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@android:color/white">
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@android:color/white" />
|
||||
<corners android:radius="2dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="@color/grayBackground" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</ripple>
|
18
app/src/main/res/drawable/progress_drawable_vertical.xml
Normal file
18
app/src/main/res/drawable/progress_drawable_vertical.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="8dp"/>
|
||||
<solid android:color="@color/darkBarTransparent"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:id="@android:id/progress">
|
||||
<scale android:scaleGravity="bottom" android:scaleWidth="0%" android:scaleHeight="100%">
|
||||
<shape>
|
||||
<solid android:color="?attr/colorPrimary"/>
|
||||
<corners android:radius="3dp"/>
|
||||
</shape>
|
||||
</scale>
|
||||
</item>
|
||||
</layer-list>
|
31
app/src/main/res/drawable/video_locked.xml
Normal file
31
app/src/main/res/drawable/video_locked.xml
Normal file
|
@ -0,0 +1,31 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="850.39dp"
|
||||
android:height="850.39dp"
|
||||
android:viewportWidth="850.39"
|
||||
android:viewportHeight="850.39">
|
||||
<path
|
||||
android:pathData="M241.88,422.73h366.79v270h-366.79z"
|
||||
android:strokeWidth="60"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#fff"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M426.51,532.77h0.01v49.88h-0.01z"
|
||||
android:strokeWidth="60"
|
||||
android:strokeColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M299.75,260a127.5,127.5 0,0 1,255 0"
|
||||
android:strokeWidth="60"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#fff"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M554.75,253.39L554.75,399.39"
|
||||
android:strokeWidth="60"
|
||||
android:strokeColor="#fff"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M299.75,250.89L299.75,396.89"
|
||||
android:strokeWidth="60"
|
||||
android:strokeColor="#fff"/>
|
||||
</vector>
|
10
app/src/main/res/drawable/video_tap_button_always_white.xml
Normal file
10
app/src/main/res/drawable/video_tap_button_always_white.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/video_ripple">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/video_ripple"/>
|
||||
</shape>
|
||||
<color android:color="@color/video_ripple"/>
|
||||
</item>
|
||||
</ripple>
|
10
app/src/main/res/drawable/video_tap_button_skip.xml
Normal file
10
app/src/main/res/drawable/video_tap_button_skip.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/video_ripple">
|
||||
<item android:id="@android:id/mask" android:height="40dp" android:width="40dp" android:left="5dp" android:top="5dp">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/video_ripple"/>
|
||||
</shape>
|
||||
<color android:color="@color/video_ripple"/>
|
||||
</item>
|
||||
</ripple>
|
26
app/src/main/res/drawable/video_unlocked.xml
Normal file
26
app/src/main/res/drawable/video_unlocked.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="850.39dp"
|
||||
android:height="850.39dp"
|
||||
android:viewportWidth="850.39"
|
||||
android:viewportHeight="850.39">
|
||||
<path
|
||||
android:pathData="M241.88,422.73h366.79v270h-366.79z"
|
||||
android:strokeWidth="60"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#fff"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M426.51,532.77h0.01v49.88h-0.01z"
|
||||
android:strokeWidth="60"
|
||||
android:strokeColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M299.75,260a127.5,127.5 0,0 1,255 0"
|
||||
android:strokeWidth="60"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#fff"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M554.75,253.39L554.75,399.39"
|
||||
android:strokeWidth="60"
|
||||
android:strokeColor="#fff"/>
|
||||
</vector>
|
|
@ -11,8 +11,6 @@
|
|||
android:screenOrientation="userLandscape"
|
||||
app:surface_type="texture_view"
|
||||
>
|
||||
<!-- app:controller_layout_id="@layout/player_custom_layout"-->
|
||||
|
||||
<com.google.android.exoplayer2.ui.PlayerView
|
||||
android:id="@+id/player_view"
|
||||
app:show_timeout="0"
|
||||
|
@ -26,6 +24,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:controller_layout_id="@layout/player_custom_layout"
|
||||
/>
|
||||
<FrameLayout
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
|
679
app/src/main/res/layout/player_custom_layout.xml
Normal file
679
app/src/main/res/layout/player_custom_layout.xml
Normal file
|
@ -0,0 +1,679 @@
|
|||
<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:orientation="vertical"
|
||||
android:id="@+id/player_holder"
|
||||
android:screenOrientation="landscape"
|
||||
tools:orientation="vertical"
|
||||
>
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/shadow_overlay"
|
||||
android:background="@color/black_overlay"
|
||||
/>
|
||||
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:id="@+id/video_lock_holder"
|
||||
>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_margin="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="UselessParent">
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_margin="20dp"
|
||||
android:id="@+id/video_locked_img"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:src="@drawable/video_locked">
|
||||
</ImageView>
|
||||
<ImageView
|
||||
android:id="@+id/video_lock"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/video_tap_button_always_white">
|
||||
</ImageView>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:id="@+id/timeMenu"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@+id/topMenuRight"
|
||||
app:layout_constraintBottom_toTopOf="@+id/centerMenu"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/timeTextLeft"
|
||||
android:gravity="center|start"
|
||||
android:textSize="40sp"
|
||||
android:alpha="0"
|
||||
android:layout_marginStart="100dp"
|
||||
android:shadowColor="@android:color/black"
|
||||
android:shadowRadius="10.0"
|
||||
android:textColor="@android:color/white"
|
||||
>
|
||||
|
||||
</TextView>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/timeText"
|
||||
android:gravity="center"
|
||||
android:textSize="30sp"
|
||||
android:alpha="0"
|
||||
android:shadowColor="@android:color/black"
|
||||
android:shadowRadius="10.0"
|
||||
android:textColor="@android:color/white"
|
||||
>
|
||||
|
||||
</TextView>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/timeTextRight"
|
||||
android:gravity="center|end"
|
||||
android:layout_marginEnd="100dp"
|
||||
android:textSize="40sp"
|
||||
android:shadowColor="@android:color/black"
|
||||
android:shadowRadius="10.0"
|
||||
android:textColor="@android:color/white"
|
||||
>
|
||||
</TextView>
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/video_holder"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="250dp"
|
||||
android:layout_marginStart="250dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:gravity="center"
|
||||
android:textFontWeight="900"
|
||||
android:layout_marginTop="15dp"
|
||||
android:textColor="@color/white"
|
||||
android:id="@+id/video_title"
|
||||
tools:text="Hello world"
|
||||
>
|
||||
</TextView>
|
||||
<LinearLayout
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:gravity="end"
|
||||
android:layout_margin="5dp"
|
||||
android:paddingEnd="60dp"
|
||||
android:paddingStart="60dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/topMenuRight"
|
||||
>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/next_episode_btt"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="15dp"
|
||||
card_view:cardCornerRadius="2dp"
|
||||
android:foreground="@drawable/outline_card"
|
||||
card_view:cardBackgroundColor="@color/black_overlay"
|
||||
card_view:cardElevation="0dp"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/next_episode"
|
||||
android:gravity="start|center"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
>
|
||||
</TextView>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/exo_controls_next"
|
||||
android:layout_gravity="right|center"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingStart="10dp"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
</ImageView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
<FrameLayout
|
||||
android:layout_margin="5dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_baseline_arrow_back_24"
|
||||
app:tint="@android:color/white"
|
||||
>
|
||||
</ImageView>
|
||||
<ImageView
|
||||
android:id="@+id/video_go_back"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/video_tap_button_always_white">
|
||||
</ImageView>
|
||||
|
||||
</FrameLayout>
|
||||
<LinearLayout
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/centerMenu"
|
||||
>
|
||||
|
||||
<FrameLayout android:layout_width="wrap_content"
|
||||
android:layout_marginEnd="140dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/exo_rew_text"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/player_skip_button_text"
|
||||
android:textSize="15sp"
|
||||
android:layout_gravity="center"
|
||||
android:textFontWeight="900"
|
||||
android:gravity="center"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp">
|
||||
</TextView>
|
||||
<ImageButton
|
||||
android:id="@id/exo_rew"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="50dp"
|
||||
android:padding="5dp"
|
||||
android:background="@drawable/video_tap_button_skip"
|
||||
android:src="@drawable/netflix_skip_back"
|
||||
android:scaleType="fitCenter"
|
||||
android:tintMode="src_in"
|
||||
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
<!-- style="@style/ExoMediaButton.Play"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
-->
|
||||
<ImageButton
|
||||
android:id="@id/exo_play"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_height="70dp"
|
||||
android:layout_width="70dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/video_tap_button_always_white"
|
||||
android:foreground="@drawable/netflix_play"
|
||||
android:clickable="true"
|
||||
android:focusable="true"/>
|
||||
<ImageButton
|
||||
android:id="@id/exo_pause"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_height="70dp"
|
||||
android:layout_width="70dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/video_tap_button_always_white"
|
||||
android:foreground="@drawable/netflix_pause"
|
||||
android:clickable="true"
|
||||
android:focusable="true"/>
|
||||
|
||||
|
||||
<FrameLayout android:layout_width="wrap_content"
|
||||
android:layout_marginStart="140dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/exo_ffwd_text"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/player_skip_button_text"
|
||||
android:textSize="15sp"
|
||||
android:layout_gravity="center"
|
||||
android:textFontWeight="900"
|
||||
android:gravity="center"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp">
|
||||
</TextView>
|
||||
<ImageButton
|
||||
android:layout_gravity="center"
|
||||
android:id="@id/exo_ffwd"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="50dp"
|
||||
android:padding="5dp"
|
||||
android:background="@drawable/video_tap_button_skip"
|
||||
android:src="@drawable/netflix_skip_forward"
|
||||
android:scaleType="fitCenter"
|
||||
android:tintMode="src_in"
|
||||
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginBottom="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
>
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_prev"
|
||||
style="@style/ExoMediaButton.Previous"
|
||||
android:tint="?attr/colorPrimaryDark"
|
||||
android:tintMode="src_in"/>
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_repeat_toggle"
|
||||
style="@style/ExoMediaButton"
|
||||
android:tint="?attr/colorPrimaryDark"
|
||||
android:tintMode="src_in"/>
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_next"
|
||||
style="@style/ExoMediaButton.Next"
|
||||
android:tint="?attr/colorPrimaryDark"
|
||||
android:tintMode="src_in"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_vr"
|
||||
style="@style/ExoMediaButton.VR"
|
||||
android:tint="?attr/colorPrimaryDark"
|
||||
android:tintMode="src_in"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:id="@+id/bottom_player_bar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
tools:text="15:30"
|
||||
android:layout_marginStart="20dp"
|
||||
android:id="@id/exo_position"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<com.google.android.exoplayer2.ui.DefaultTimeBar
|
||||
android:id="@id/exo_progress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_weight="1"
|
||||
app:played_color="?attr/colorPrimary"
|
||||
app:unplayed_color="@color/darkBar"/>
|
||||
|
||||
<TextView
|
||||
tools:text="23:20"
|
||||
android:id="@id/exo_duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
||||
card_view:cardBackgroundColor="@color/transparent"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:id="@+id/resize_player"
|
||||
card_view:cardElevation="0dp"
|
||||
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_baseline_aspect_ratio_24"
|
||||
app:tint="@android:color/white"
|
||||
android:layout_gravity="center">
|
||||
|
||||
</ImageView>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Resize"
|
||||
android:gravity="center"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
>
|
||||
</TextView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
||||
card_view:cardBackgroundColor="@color/transparent"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:id="@+id/playback_speed_btt"
|
||||
card_view:cardElevation="0dp"
|
||||
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_baseline_speed_24"
|
||||
app:tint="@android:color/white"
|
||||
>
|
||||
|
||||
</ImageView>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Speed"
|
||||
android:gravity="center"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:id="@+id/player_speed_text"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
>
|
||||
</TextView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
||||
card_view:cardBackgroundColor="@color/transparent"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:id="@+id/sources_btt"
|
||||
card_view:cardElevation="0dp"
|
||||
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_baseline_playlist_play_24"
|
||||
app:tint="@android:color/white"
|
||||
android:layout_gravity="center">
|
||||
|
||||
</ImageView>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Source"
|
||||
android:gravity="center"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
>
|
||||
</TextView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
|
||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
||||
card_view:cardBackgroundColor="@color/transparent"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:id="@+id/skip_op"
|
||||
card_view:cardElevation="0dp"
|
||||
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/exo_controls_fastforward"
|
||||
app:tint="@android:color/white"
|
||||
android:layout_gravity="center">
|
||||
</ImageView>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Skip OP"
|
||||
android:gravity="start|center"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
>
|
||||
</TextView>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/brightness_overlay"
|
||||
android:background="@android:color/black"
|
||||
android:alpha="0"
|
||||
/>
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/click_overlay"
|
||||
android:visibility="gone"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<RelativeLayout
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="left"
|
||||
tools:alpha="1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/centerMenuView"
|
||||
android:id="@+id/progressBarLeftHolder"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0"
|
||||
>
|
||||
<!--VERY hacky layout -->
|
||||
<ImageView
|
||||
android:layout_marginBottom="220dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_baseline_volume_up_24"
|
||||
app:tint="@android:color/white"
|
||||
>
|
||||
|
||||
</ImageView>
|
||||
|
||||
<ProgressBar
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="4dp"
|
||||
android:layout_height="180dp"
|
||||
android:id="@+id/progressBarLeft"
|
||||
android:indeterminate="false"
|
||||
style="@android:style/Widget.Material.ProgressBar.Horizontal"
|
||||
android:max="100"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:progress="100"
|
||||
android:progressDrawable="@drawable/progress_drawable_vertical"
|
||||
>
|
||||
|
||||
|
||||
</ProgressBar>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="right"
|
||||
tools:alpha="1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/centerMenuView"
|
||||
android:id="@+id/progressBarRightHolder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<ImageView
|
||||
android:layout_marginBottom="220dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_baseline_brightness_7_24"
|
||||
app:tint="@android:color/white"
|
||||
>
|
||||
|
||||
</ImageView>
|
||||
|
||||
<ProgressBar
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="4dp"
|
||||
android:layout_height="180dp"
|
||||
android:id="@+id/progressBarRight"
|
||||
android:indeterminate="false"
|
||||
style="@android:style/Widget.Material.ProgressBar.Horizontal"
|
||||
android:max="100"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:progress="100"
|
||||
android:progressDrawable="@drawable/progress_drawable_vertical"
|
||||
>
|
||||
|
||||
|
||||
</ProgressBar>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
|
@ -7,7 +7,6 @@
|
|||
<color name="colorOngoing">#F53B66</color> <!--FF8181-->
|
||||
<color name="colorPrimaryDark">#3700B3</color>
|
||||
<color name="colorAccent">#3b65f5</color> <!-- 818fff-->
|
||||
<color name="video_ripple">#80FFFFFF</color>
|
||||
|
||||
<color name="darkBackground">#2B2C30</color> <!--0f0f10 0E0E10 303135 2B2C30-->
|
||||
<color name="bitDarkerGrayBackground">#1C1C20</color> <!--191a1f 19181E 202125 1C1C20-->
|
||||
|
@ -28,4 +27,9 @@
|
|||
<color name="subColorBg">#4DF53B66</color>
|
||||
<color name="typeColor">#F54A3B</color>
|
||||
<color name="typeColorBg">#4DF54A3B</color>
|
||||
|
||||
<color name="video_ripple">#80FFFFFF</color>
|
||||
<color name="black_overlay">#66000000</color>
|
||||
<color name="darkBarTransparent">#C0121212</color>
|
||||
<color name="darkBar">#121212</color>
|
||||
</resources>
|
|
@ -4,4 +4,5 @@
|
|||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="roundedImageRadius">4dp</dimen>
|
||||
<dimen name="navbarHeight">0dp</dimen>
|
||||
<dimen name="card_corner_radius">2dp</dimen>
|
||||
</resources>
|
|
@ -13,4 +13,6 @@
|
|||
<string name="episode_more_options_descript">More Options</string>
|
||||
<string name="episode_play_descript">Play Episode</string>
|
||||
<string name="go_back">Go back</string>
|
||||
<string name="next_episode">Next episode</string>
|
||||
<string name="player_skip_button_text">10</string>
|
||||
</resources>
|
Loading…
Reference in a new issue