mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 23:00:31 +05:30
406 lines
17 KiB
XML
406 lines
17 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<com.github.libretube.util.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/player_scrollView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:background="?android:attr/colorBackground"
|
|
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"
|
|
android:animateLayoutChanges="true" >
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/player_title_layout"
|
|
android:layout_marginTop="5dp"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/player_title"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerVertical="true"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginEnd="30dp"
|
|
android:text="Video Title"
|
|
android:textSize="18sp" />
|
|
|
|
|
|
<ImageView
|
|
android:id="@+id/player_description_arrow"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_centerInParent="true"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:src="@drawable/ic_arrow_down" />
|
|
|
|
</RelativeLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="10dp"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/player_views_info"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="10M views 2 days ago " />
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="3dp"
|
|
android:layout_marginTop="2dp">
|
|
|
|
<ImageView
|
|
android:layout_width="12dp"
|
|
android:layout_height="12dp"
|
|
android:layout_gravity="center"
|
|
android:src="@drawable/ic_like" />
|
|
|
|
<TextView
|
|
android:id="@+id/textLike"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="5dp"
|
|
android:text="4.2K" />
|
|
|
|
<ImageView
|
|
android:layout_width="12dp"
|
|
android:layout_height="12dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginLeft="5dp"
|
|
android:rotation="180"
|
|
android:src="@drawable/ic_like" />
|
|
|
|
<TextView
|
|
android:id="@+id/textDislike"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="5dp"
|
|
android:text="1.3K" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/desc_linLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:visibility="gone">
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/chapters_recView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@id/comments_toggle"
|
|
android:layout_marginHorizontal="3dp"
|
|
android:layout_marginTop="20dp"
|
|
android:nestedScrollingEnabled="false"
|
|
android:visibility="gone" />
|
|
|
|
<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" />
|
|
|
|
</LinearLayout>
|
|
|
|
<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_gravity="center"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:gravity="center"
|
|
android:orientation="horizontal">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/relPlayer_share"
|
|
style="@style/PlayerActionsLayout">
|
|
|
|
<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"
|
|
style="@style/PlayerActionsLayout">
|
|
|
|
<ImageView
|
|
android:layout_width="24dp"
|
|
android:layout_height="25dp"
|
|
android:src="@drawable/ic_download" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:autoSizeTextType="uniform"
|
|
android:gravity="center"
|
|
android:maxLines="1"
|
|
android:text="@string/download" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/relPlayer_vlc"
|
|
style="@style/PlayerActionsLayout">
|
|
|
|
<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"
|
|
style="@style/PlayerActionsLayout">
|
|
|
|
<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_marginStart="8dp"
|
|
android:layout_marginTop="15dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_marginBottom="15dp"
|
|
android:background="?android:attr/selectableItemBackground"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp">
|
|
|
|
<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_marginLeft="5dp"
|
|
android:layout_toStartOf="@+id/player_subscribe"
|
|
android:layout_toEndOf="@+id/player_channelImage"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text=""
|
|
android:textSize="15dp" />
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/player_subscribe"
|
|
style="@style/Widget.Material3.Button.ElevatedButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentEnd="true"
|
|
android:layout_centerVertical="true"
|
|
android:drawableLeft="@drawable/ic_bell"
|
|
android:drawableTint="?android:attr/textColorPrimary"
|
|
android:text="@string/subscribe"
|
|
android:textColor="?android:attr/textColorPrimary"
|
|
android:textSize="12dp"
|
|
app:cornerRadius="11dp" />
|
|
</RelativeLayout>
|
|
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:animateLayoutChanges="true"
|
|
android:descendantFocusability="blocksDescendants">
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/comments_toggle"
|
|
style="@style/Widget.Material3.CardView.Elevated"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="16dp"
|
|
app:cardCornerRadius="18dp">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_margin="8dp"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/commentsToggle_textView"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="8dp"
|
|
android:text="@string/comments"
|
|
android:textSize="17sp"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<ImageView
|
|
android:id="@+id/commentsToggle_imageView"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginRight="3dp"
|
|
android:src="@drawable/ic_arrow_up_down"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/comments_recView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@id/comments_toggle"
|
|
android:layout_marginLeft="20dp"
|
|
android:layout_marginTop="20dp"
|
|
android:layout_marginRight="20dp"
|
|
android:nestedScrollingEnabled="false"
|
|
android:visibility="gone" />
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/player_recView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@id/comments_recView"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginEnd="10dp"
|
|
android:layout_marginBottom="10dp"
|
|
android:nestedScrollingEnabled="false" />
|
|
</RelativeLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/main_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
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" />
|
|
|
|
<com.github.libretube.util.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.util.SingleViewTouchableMotionLayout>
|