mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 23:00:31 +05:30
472 lines
20 KiB
XML
472 lines
20 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<com.github.libretube.ui.views.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=".ui.fragments.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:animateLayoutChanges="true"
|
|
android:orientation="vertical">
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/player_title_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="5dp"
|
|
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:textSize="18sp"
|
|
tools:text="Video Title" />
|
|
|
|
|
|
<ImageView
|
|
android:id="@+id/player_description_arrow"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentEnd="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"
|
|
tools:text="10M views 2 days ago " />
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="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"
|
|
tools:text="4.2K" />
|
|
|
|
<ImageView
|
|
android:layout_width="12dp"
|
|
android:layout_height="12dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginStart="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"
|
|
tools: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_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"
|
|
tools:targetApi="o" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/relPlayer_open"
|
|
style="@style/PlayerActionsLayout">
|
|
|
|
<ImageView
|
|
android:layout_width="24dp"
|
|
android:layout_height="25dp"
|
|
android:padding="2dp"
|
|
android:src="@drawable/ic_open" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:text="@string/open" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/relPlayer_background"
|
|
style="@style/PlayerActionsLayout">
|
|
|
|
<ImageView
|
|
android:layout_width="24dp"
|
|
android:layout_height="25dp"
|
|
android:src="@drawable/ic_headphones" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/audio" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/relPlayer_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>
|
|
|
|
<LinearLayout
|
|
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="@drawable/rounded_ripple"
|
|
android:orientation="horizontal"
|
|
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_gravity="center"
|
|
android:layout_marginEnd="4dp" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/player_channelName"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginStart="5dp"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:textSize="15sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/player_channelSubCount"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginStart="5dp"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:textSize="11sp"
|
|
tools:text="2.5M" />
|
|
|
|
</LinearLayout>
|
|
|
|
<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_gravity="center"
|
|
android:text="@string/subscribe"
|
|
android:textColor="?android:attr/textColorPrimary"
|
|
android:textSize="12sp"
|
|
app:cornerRadius="11dp" />
|
|
</LinearLayout>
|
|
|
|
<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">
|
|
|
|
<LinearLayout
|
|
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="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_weight="1"
|
|
android:text="@string/comments"
|
|
android:textSize="17sp" />
|
|
|
|
<ImageView
|
|
android:id="@+id/commentsToggle_imageView"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginEnd="3dp"
|
|
android:src="@drawable/ic_arrow_up_down" />
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:animateLayoutChanges="true"
|
|
android:descendantFocusability="blocksDescendants">
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/comments_recView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginBottom="10dp"
|
|
android:nestedScrollingEnabled="false"
|
|
android:visibility="gone" />
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/related_rec_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
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_constraintDimensionRatio="16:9"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<com.github.libretube.ui.views.CustomExoPlayerView
|
|
android:id="@+id/player"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@android:color/black"
|
|
app:layout_constraintBottom_toBottomOf="@id/main_container"
|
|
app:layout_constraintStart_toStartOf="@id/main_container"
|
|
app:layout_constraintTop_toTopOf="@id/main_container"
|
|
app:show_buffering="when_playing">
|
|
|
|
<com.github.libretube.ui.views.DoubleTapOverlay
|
|
android:id="@+id/doubleTapOverlay"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:gravity="center" />
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom|end"
|
|
android:layout_marginEnd="-10dp"
|
|
android:layout_marginBottom="60dp"
|
|
android:paddingEnd="10dp"
|
|
app:cardBackgroundColor="#88000000"
|
|
app:strokeWidth="1dp"
|
|
tools:ignore="RtlSymmetry">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/sb_skip_btn"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:padding="10dp"
|
|
android:visibility="gone">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/skip_segment"
|
|
android:textColor="@android:color/white"
|
|
android:textSize="18sp" />
|
|
|
|
<ImageView
|
|
android:layout_width="20dp"
|
|
android:layout_height="20dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginHorizontal="10dp"
|
|
android:src="@drawable/ic_next"
|
|
app:tint="@android:color/white" />
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
</com.github.libretube.ui.views.CustomExoPlayerView>
|
|
|
|
<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:alpha="0"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:paddingVertical="15dp"
|
|
android:paddingStart="8dp"
|
|
android:paddingEnd="12dp"
|
|
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.ui.views.SingleViewTouchableMotionLayout> |