mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-16 15:20:31 +05:30
262 lines
11 KiB
XML
262 lines
11 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">
|
|
|
|
<ScrollView
|
|
android:id="@+id/player_scrollView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:background="?android: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">
|
|
|
|
<com.github.libretube.ui.views.DescriptionLayout
|
|
android:id="@+id/descriptionLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:animateLayoutChanges="true" />
|
|
|
|
<HorizontalScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingBottom="10dp"
|
|
android:scrollbars="none">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/optionsLL"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:paddingHorizontal="2dp">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/relPlayer_share"
|
|
style="@style/PlayerActionsButton"
|
|
android:text="@string/share"
|
|
app:icon="@drawable/ic_share" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/relPlayer_download"
|
|
style="@style/PlayerActionsButton"
|
|
android:text="@string/download"
|
|
app:icon="@drawable/ic_download" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/relPlayer_save"
|
|
style="@style/PlayerActionsButton"
|
|
android:text="@string/save"
|
|
app:icon="@drawable/ic_save" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/relPlayer_background"
|
|
style="@style/PlayerActionsButton"
|
|
android:text="@string/audio"
|
|
app:icon="@drawable/ic_headphones" />
|
|
</LinearLayout>
|
|
|
|
</HorizontalScrollView>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/player_channel"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="2dp"
|
|
android:layout_marginVertical="10dp"
|
|
android:background="@drawable/rounded_ripple"
|
|
android:orientation="horizontal"
|
|
android:padding="5dp">
|
|
|
|
<com.google.android.material.imageview.ShapeableImageView
|
|
android:id="@+id/player_channelImage"
|
|
android:layout_width="40dp"
|
|
android:layout_height="40dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginEnd="4dp"
|
|
app:shapeAppearance="@style/CircleImageView" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="start|center_vertical"
|
|
android:layout_marginStart="5dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_weight="1"
|
|
android:layoutDirection="locale"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/player_channelName"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:textSize="15sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/player_channelSubCount"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:textSize="11sp"
|
|
tools:text="2.5M subscribers" />
|
|
|
|
</LinearLayout>
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/player_subscribe"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:text="@string/subscribe"
|
|
android:textSize="12sp" />
|
|
</LinearLayout>
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/comments_toggle"
|
|
style="@style/PlayerActionsButton"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="20dp"
|
|
android:layout_marginVertical="10dp"
|
|
android:text="@string/comments"
|
|
android:textAlignment="viewStart"
|
|
app:drawableEndCompat="@drawable/ic_arrow_up_down" />
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/related_rec_view"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/main_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:background="?attr/colorSurfaceContainerLow"
|
|
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.OnlinePlayerView
|
|
android:id="@+id/player"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@android:color/black"
|
|
app:controller_layout_id="@layout/exo_styled_player_control_view"
|
|
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.github.libretube.ui.views.PlayerGestureControlsView
|
|
android:id="@+id/playerGestureControlsView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
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="center|end"
|
|
android:layout_marginTop="15dp"
|
|
android:layout_marginEnd="-10dp"
|
|
android:paddingEnd="20dp"
|
|
app:cardBackgroundColor="#88000000"
|
|
app:strokeWidth="1dp"
|
|
tools:ignore="RtlSymmetry">
|
|
|
|
<com.github.libretube.ui.views.DrawableTextView
|
|
android:id="@+id/sb_skip_btn"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:drawablePadding="20dp"
|
|
android:padding="10dp"
|
|
android:text="@string/skip_segment"
|
|
android:textColor="@android:color/white"
|
|
android:textSize="18sp"
|
|
android:visibility="gone"
|
|
app:drawableEndCompat="@drawable/ic_next"
|
|
app:drawableEndDimen="20dp"
|
|
app:drawableTint="@android:color/white" />
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<com.github.libretube.ui.views.AutoplayCountdownView
|
|
android:id="@+id/autoplay_countdown"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:visibility="gone" />
|
|
|
|
</com.github.libretube.ui.views.OnlinePlayerView>
|
|
|
|
<ImageView
|
|
android:id="@+id/close_imageView"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:alpha="0"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:padding="8dp"
|
|
android:src="@drawable/ic_close"
|
|
android:tooltipText="@string/tooltip_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:alpha="0"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:padding="8dp"
|
|
android:src="@drawable/ic_play"
|
|
android:tooltipText="@string/tooltip_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:paddingHorizontal="8dp"
|
|
android:paddingVertical="15dp"
|
|
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> |