mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 23:00:31 +05:30
383 lines
17 KiB
XML
383 lines
17 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/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">
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/player_title_layout"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/player_title"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
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>
|
|
|
|
<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_gravity="center"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:gravity="center"
|
|
android:orientation="horizontal">
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight=".25"
|
|
android:gravity="center"
|
|
android:orientation="vertical">
|
|
|
|
<ImageView
|
|
android:layout_width="24dp"
|
|
android:layout_height="25dp"
|
|
android:src="@drawable/ic_like" />
|
|
|
|
<TextView
|
|
android:id="@+id/textLike"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="4.2K" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/relPlayer_share"
|
|
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_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_download" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:text="@string/download"
|
|
android:maxLines="1"/>
|
|
</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_marginStart="8dp"
|
|
android:layout_marginEnd="8dp"
|
|
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"
|
|
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: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"
|
|
android:layout_marginRight="16dp"
|
|
android:layout_marginBottom="17dp"
|
|
app:cardCornerRadius="27dp">
|
|
|
|
<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_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="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_marginTop="20dp"
|
|
android:layout_marginLeft="20dp"
|
|
android:layout_marginRight="20dp"
|
|
android:layout_below="@id/comments_toggle"
|
|
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.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>
|