Redesigned player fragment(again)

This commit is contained in:
archroid 2022-05-07 20:52:45 +04:30
parent 4f8a84341b
commit b6ede54919
No known key found for this signature in database
GPG Key ID: D8EE5C11EDF911B1
3 changed files with 452 additions and 206 deletions

View File

@ -80,7 +80,7 @@ class PlayerFragment : Fragment() {
private lateinit var exoPlayer: ExoPlayer
private lateinit var mediaSource: MediaSource
private lateinit var relDownloadVideo: RelativeLayout
private lateinit var relDownloadVideo: LinearLayout
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -191,7 +191,7 @@ class PlayerFragment : Fragment() {
}
}
view.findViewById<ConstraintLayout>(R.id.player_title_layout).setOnClickListener {
view.findViewById<RelativeLayout>(R.id.player_title_layout).setOnClickListener {
var visible = playerDescription.isVisible
playerDescription.visibility = if (visible) View.GONE else View.VISIBLE
@ -502,7 +502,7 @@ class PlayerFragment : Fragment() {
val channelId = response.uploaderUrl?.replace("/channel/", "")
val subButton = view.findViewById<MaterialButton>(R.id.player_subscribe)
isSubscribed(subButton, channelId!!)
view.findViewById<RelativeLayout>(R.id.save).setOnClickListener {
view.findViewById<LinearLayout>(R.id.save).setOnClickListener {
val newFragment = AddtoPlaylistDialog()
var bundle = Bundle()
bundle.putString("videoId", videoId)
@ -511,7 +511,7 @@ class PlayerFragment : Fragment() {
}
}
// share button
view.findViewById<RelativeLayout>(R.id.relPlayer_share).setOnClickListener {
view.findViewById<LinearLayout>(R.id.relPlayer_share).setOnClickListener {
val sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(requireContext())
val intent = Intent()
@ -602,7 +602,7 @@ class PlayerFragment : Fragment() {
Toast.makeText(context, R.string.cannotDownload, Toast.LENGTH_SHORT).show()
}
if (response.hls != null) {
view.findViewById<RelativeLayout>(R.id.relPlayer_vlc).setOnClickListener {
view.findViewById<LinearLayout>(R.id.relPlayer_vlc).setOnClickListener {
exoPlayer.pause()
try {
val vlcRequestCode = 42
@ -644,36 +644,21 @@ class PlayerFragment : Fragment() {
Log.e(TAG, "HttpException, unexpected response")
return@launchWhenCreated
}
val colorPrimary = TypedValue()
(context as Activity).theme.resolveAttribute(
android.R.attr.colorPrimary,
colorPrimary,
true
)
val colorText = TypedValue()
(context as Activity).theme.resolveAttribute(
R.attr.colorOnSurface,
colorText,
true
)
runOnUiThread {
if (response.subscribed == true) {
isSubscribed = true
button.text = getString(R.string.unsubscribe)
button.setTextColor(colorText.data)
}
if (response.subscribed != null) {
button.setOnClickListener {
if (isSubscribed) {
unsubscribe(channel_id)
button.text = getString(R.string.subscribe)
button.setTextColor(colorPrimary.data)
} else {
subscribe(channel_id)
button.text = getString(R.string.unsubscribe)
button.setTextColor(colorText.data)
}
}
}

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="20dp"
android:viewportWidth="18"
android:viewportHeight="20">
<path
android:pathData="M8.625,0H9.375C9.5821,0 9.75,0.1679 9.75,0.375C9.75,0.5821 9.9179,0.75 10.125,0.75C10.3321,0.75 10.5,0.9179 10.5,1.125V1.875C10.5,2.4963 11.0088,3.0566 11.5685,3.3265C12.4353,3.7446 13.5132,4.5489 14.0889,5.6503C14.2067,5.8758 14.25,6.1307 14.25,6.3852V12.0512C14.25,12.9156 14.8488,13.6151 15.5614,14.1044C15.8681,14.315 16.102,14.5525 16.3642,14.8462C16.4522,14.9448 16.5,15.0728 16.5,15.2049C16.5,15.506 16.256,15.75 15.955,15.75H2.051C1.7467,15.75 1.5,15.5033 1.5,15.199C1.5,15.0704 1.5445,14.9452 1.6287,14.848C1.8916,14.5448 2.1396,14.3062 2.4619,14.0946C3.1737,13.6273 3.75,12.9293 3.75,12.0778V6.3852C3.75,6.1307 3.7933,5.8758 3.9111,5.6503C4.4868,4.5489 5.5648,3.7446 6.4316,3.3265C6.9912,3.0566 7.5,2.4963 7.5,1.875V1.125C7.5,0.9179 7.6679,0.75 7.875,0.75C8.0821,0.75 8.25,0.5821 8.25,0.375C8.25,0.1679 8.4179,0 8.625,0ZM9,19.4998C7.7574,19.4998 6.7501,18.4925 6.75,17.2499H11.25C11.2499,18.4925 10.2426,19.4998 9,19.4998ZM0.0558,7.5132C-0.1246,6.2857 0.1356,5.034 0.7902,3.9801C1.4447,2.9262 2.4513,2.1382 3.6315,1.7557L3.9552,2.7546C3.0111,3.0605 2.2058,3.691 1.6821,4.5341C1.1585,5.3772 0.9503,6.3786 1.0946,7.3605L0.0558,7.5132ZM17.1808,3.934C16.5153,2.8869 15.5006,2.1094 14.3165,1.7392L14.0032,2.7414C14.9504,3.0375 15.7623,3.6596 16.2946,4.4972C16.827,5.3348 17.0455,6.334 16.9115,7.3174L17.9519,7.4592C18.1194,6.2299 17.8463,4.981 17.1808,3.934Z"
android:fillColor="#E6E1E5"
android:fillType="evenOdd"/>
</vector>

View File

@ -6,8 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutDescription="@xml/player_scene"
tools:context=".PlayerFragment"
>
tools:context=".PlayerFragment">
<ScrollView
android:id="@+id/scrollView2"
@ -18,215 +17,196 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_container"
>
app:layout_constraintTop_toBottomOf="@+id/main_container">
<LinearLayout
android:id="@+id/linLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:orientation="vertical">
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/player_info_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/player_title_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/player_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="8dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:text="Loading..."
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/player_description_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/player_views_info"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:text=""
android:textSize="12sp"
app:layout_constraintEnd_toStartOf="@id/player_description_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/player_title" />
<ImageView
android:id="@+id/player_description_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:paddingLeft="16dp"
android:src="@drawable/ic_arrow_down"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/player_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:textSize="14sp"
android:visibility="gone"
android:autoLink="web"
android:textIsSelectable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/player_title_layout" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="5"
android:baselineAligned="false">
android:id="@+id/player_title_layout"
android:orientation="horizontal">
<RelativeLayout
<TextView
android:id="@+id/player_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:text="Video Title"
android:textSize="22sp" />
<ImageView
android:id="@+id/player_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="16dp"
android:src="@drawable/ic_like"
android:contentDescription="like"/>
<TextView
android:id="@+id/textLike"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/player_like"
android:layout_centerHorizontal="true"
android:text="1K" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/relPlayer_share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground">
<ImageView
android:id="@+id/player_share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="16dp"
android:src="@drawable/ic_share" />
<TextView
android:id="@+id/textShare"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/player_share"
android:layout_centerHorizontal="true"
android:text="@string/share" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/relPlayer_download"
android:id="@+id/player_description_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground">
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_marginEnd="10dp"
android:paddingLeft="16dp"
android:src="@drawable/ic_arrow_down" />
<ImageView
android:id="@+id/player_download"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="16dp"
android:src="@drawable/ic_download" />
</RelativeLayout>
<TextView
android:id="@+id/textDownload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/player_download"
android:layout_centerHorizontal="true"
android:text="@string/download" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/relPlayer_vlc"
android:layout_width="wrap_content"
<TextView
android:id="@+id/player_views_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp"
android:text="10M views 2 days ago " />
<TextView
android:id="@+id/player_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autoLink="web"
android:padding="8dp"
android:textIsSelectable="true"
android:textSize="14sp"
android:visibility="gone" />
<com.google.android.material.card.MaterialCardView
style="@style/Widget.Material3.CardView.Elevated"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_margin="17dp"
app:cardCornerRadius="27dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground">
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/player_vlc"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="16dp"
android:src="@drawable/ic_vlc" />
android:layout_weight=".25"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/textVlc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/player_vlc"
android:layout_centerHorizontal="true"
android:text="@string/vlc" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground">
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:src="@drawable/ic_like" />
<ImageView
android:id="@+id/player_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="16dp"
android:src="@drawable/ic_save" />
<TextView
android:id="@+id/textLike"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4.2K" />
</LinearLayout>
<TextView
android:id="@+id/textSave"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/relPlayer_share"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@id/player_save"
android:layout_centerHorizontal="true"
android:text="@string/save" />
</RelativeLayout>
</LinearLayout>
android:layout_weight=".25"
android:background="?android:attr/selectableItemBackground"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:src="@drawable/ic_share" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/share" />
</LinearLayout>
<LinearLayout
android:id="@+id/relPlayer_download"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:background="?android:attr/selectableItemBackground"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:src="@drawable/ic_save" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/download" />
>
</LinearLayout>
<LinearLayout
android:id="@+id/relPlayer_vlc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:background="?android:attr/selectableItemBackground"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:padding="2dp"
android:src="@drawable/ic_vlc" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="VLC" />
</LinearLayout>
<LinearLayout
android:id="@+id/save"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:background="?android:attr/selectableItemBackground"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:src="@drawable/ic_save" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/save" />
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<RelativeLayout
android:id="@+id/player_channel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:layout_marginStart="8dp"
android:background="?android:attr/selectableItemBackground">
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:background="?android:attr/selectableItemBackground"
android:paddingLeft="8dp"
android:paddingRight="8dp">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/player_channelImage"
@ -240,12 +220,13 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:layout_toStartOf="@+id/player_subscribe"
android:layout_toEndOf="@+id/player_channelImage"
android:ellipsize="end"
android:maxLines="1"
android:text=""
android:textStyle="bold" />
android:textSize="15dp" />
<com.google.android.material.button.MaterialButton
@ -254,35 +235,305 @@
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="?android:attr/selectableItemBackground"
android:backgroundTint="@color/colorPrimary"
android:drawableLeft="@drawable/ic_bell"
android:drawableTint="@color/white"
android:text="@string/subscribe"
android:textColor="@color/colorPrimary" />
android:textColor="@color/white"
android:textSize="12dp"
app:cornerRadius="11dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants">
<TextView
android:id="@+id/tv_suggestion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:text="More like that"
android:textSize="17sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/player_recView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_suggestion"
android:layout_margin="10dp"
android:nestedScrollingEnabled="false" />
</RelativeLayout>
</LinearLayout>
<!-- <LinearLayout-->
<!-- android:id="@+id/linLayout"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="vertical"-->
<!-- >-->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/player_info_layout"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content">-->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/player_title_layout"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent">-->
<!-- <TextView-->
<!-- android:id="@+id/player_title"-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:padding="8dp"-->
<!-- android:paddingLeft="8dp"-->
<!-- android:paddingRight="8dp"-->
<!-- android:text="Loading..."-->
<!-- android:textSize="18sp"-->
<!-- android:textStyle="bold"-->
<!-- app:layout_constraintEnd_toStartOf="@id/player_description_arrow"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <TextView-->
<!-- android:id="@+id/player_views_info"-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:paddingLeft="8dp"-->
<!-- android:paddingRight="8dp"-->
<!-- android:text=""-->
<!-- android:textSize="12sp"-->
<!-- app:layout_constraintEnd_toStartOf="@id/player_description_arrow"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/player_title" />-->
<!-- <ImageView-->
<!-- android:id="@+id/player_description_arrow"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginEnd="8dp"-->
<!-- android:paddingLeft="16dp"-->
<!-- android:src="@drawable/ic_arrow_down"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<!-- <TextView-->
<!-- android:id="@+id/player_description"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:padding="8dp"-->
<!-- android:textSize="14sp"-->
<!-- android:visibility="gone"-->
<!-- android:autoLink="web"-->
<!-- android:textIsSelectable="true"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@id/player_title_layout" />-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:weightSum="5"-->
<!-- android:baselineAligned="false">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1">-->
<!-- <ImageView-->
<!-- android:id="@+id/player_like"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerInParent="true"-->
<!-- android:layout_marginBottom="16dp"-->
<!-- android:src="@drawable/ic_like"-->
<!-- android:contentDescription="like"/>-->
<!-- <TextView-->
<!-- android:id="@+id/textLike"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@id/player_like"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:text="1K" />-->
<!-- </RelativeLayout>-->
<!-- <RelativeLayout-->
<!-- android:id="@+id/relPlayer_share"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:background="?android:attr/selectableItemBackground">-->
<!-- <ImageView-->
<!-- android:id="@+id/player_share"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerInParent="true"-->
<!-- android:layout_marginBottom="16dp"-->
<!-- android:src="@drawable/ic_share" />-->
<!-- <TextView-->
<!-- android:id="@+id/textShare"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@id/player_share"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:text="@string/share" />-->
<!-- </RelativeLayout>-->
<!-- <RelativeLayout-->
<!-- android:id="@+id/relPlayer_download"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:background="?android:attr/selectableItemBackground">-->
<!-- <ImageView-->
<!-- android:id="@+id/player_download"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerInParent="true"-->
<!-- android:layout_marginBottom="16dp"-->
<!-- android:src="@drawable/ic_download" />-->
<!-- <TextView-->
<!-- android:id="@+id/textDownload"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@id/player_download"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:text="@string/download" />-->
<!-- </RelativeLayout>-->
<!-- <RelativeLayout-->
<!-- android:id="@+id/relPlayer_vlc"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:background="?android:attr/selectableItemBackground">-->
<!-- <ImageView-->
<!-- android:id="@+id/player_vlc"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerInParent="true"-->
<!-- android:layout_marginBottom="16dp"-->
<!-- android:src="@drawable/ic_vlc" />-->
<!-- <TextView-->
<!-- android:id="@+id/textVlc"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@id/player_vlc"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:text="@string/vlc" />-->
<!-- </RelativeLayout>-->
<!-- <RelativeLayout-->
<!-- android:id="@+id/save"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:background="?android:attr/selectableItemBackground">-->
<!-- <ImageView-->
<!-- android:id="@+id/player_save"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerInParent="true"-->
<!-- android:layout_marginBottom="16dp"-->
<!-- android:src="@drawable/ic_save" />-->
<!-- <TextView-->
<!-- android:id="@+id/textSave"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@id/player_save"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:text="@string/save" />-->
<!-- </RelativeLayout>-->
<!-- </LinearLayout>-->
<!-- <RelativeLayout-->
<!-- android:id="@+id/player_channel"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="8dp"-->
<!-- android:paddingLeft="8dp"-->
<!-- android:paddingRight="8dp"-->
<!-- android:layout_marginStart="8dp"-->
<!-- android:background="?android:attr/selectableItemBackground">-->
<!-- <de.hdodenhof.circleimageview.CircleImageView-->
<!-- android:id="@+id/player_channelImage"-->
<!-- android:layout_width="40dp"-->
<!-- android:layout_height="40dp"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:layout_marginEnd="4dp" />-->
<!-- <TextView-->
<!-- android:id="@+id/player_channelName"-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:layout_toStartOf="@+id/player_subscribe"-->
<!-- android:layout_toEndOf="@+id/player_channelImage"-->
<!-- android:ellipsize="end"-->
<!-- android:maxLines="1"-->
<!-- android:text=""-->
<!-- android:textStyle="bold" />-->
<!-- <com.google.android.material.button.MaterialButton-->
<!-- android:id="@+id/player_subscribe"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignParentEnd="true"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:background="?android:attr/selectableItemBackground"-->
<!-- android:text="@string/subscribe"-->
<!-- android:textColor="@color/colorPrimary" />-->
<!-- </RelativeLayout>-->
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:descendantFocusability="blocksDescendants">-->
<!-- <androidx.recyclerview.widget.RecyclerView-->
<!-- android:id="@+id/player_recView"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:nestedScrollingEnabled="false" />-->
<!-- </RelativeLayout>-->
<!-- </LinearLayout>-->
</ScrollView>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/main_container"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintHeight_percent="0.35"
android:background="?attr/colorSurface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.35"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="?attr/colorSurface" />
app:layout_constraintTop_toTopOf="parent" />
<com.github.libretube.CustomExoPlayerView
android:id="@+id/player"