LibreTube/app/src/main/res/layout/fragment_player.xml
2022-03-16 09:30:47 -04:00

289 lines
12 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<com.github.libretube.SingleViewTouchableMotionLayout 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:id="@+id/playerMotionLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutDescription="@xml/player_scene"
tools:context=".PlayerFragment"
>
<ScrollView
android:id="@+id/scrollView2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?attr/colorSurface"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
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"
>
<TextView
android:id="@+id/player_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:text=""
android:textSize="15sp"
android:layout_margin="7dp"
android:textStyle="bold" />
<TextView
android:id="@+id/player_sub"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:text="" />
<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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<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_toEndOf="@+id/player_channelImage"
android:layout_toStartOf="@+id/player_subscribe"
android:text=""
android:textStyle="bold"
android:ellipsize="end"
android:maxLines="1"/>
<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"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="?attr/colorSurface" />
<com.github.libretube.CustomExoPlayerView
android:id="@+id/player"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#000000"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="@id/main_container"
app:layout_constraintStart_toStartOf="@id/main_container"
app:layout_constraintTop_toTopOf="@id/main_container"
app:show_buffering="always" />
<ImageView
android:id="@+id/close_imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:alpha="0"
android:src="@drawable/ic_close"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/main_container"
app:layout_constraintEnd_toEndOf="@id/main_container"
app:layout_constraintTop_toTopOf="@id/main_container" />
<ImageView
android:id="@+id/play_imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:alpha="0"
android:src="@drawable/ic_play"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/close_imageView"
app:layout_constraintEnd_toStartOf="@+id/close_imageView"
app:layout_constraintTop_toTopOf="@+id/close_imageView" />
<TextView
android:id="@+id/title_textView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="12dp"
android:alpha="0"
android:ellipsize="end"
android:maxLines="1"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/play_imageView"
app:layout_constraintEnd_toStartOf="@+id/play_imageView"
app:layout_constraintStart_toEndOf="@+id/player"
app:layout_constraintTop_toTopOf="@+id/play_imageView" />
</com.github.libretube.SingleViewTouchableMotionLayout>