mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-16 23:30:29 +05:30
382 lines
15 KiB
XML
382 lines
15 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/audio_player_scene">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/audio_player_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="?android:attr/colorBackground"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/audio_player_main"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
app:layout_constraintBottom_toBottomOf="@id/audio_player_container"
|
|
app:layout_constraintEnd_toEndOf="@id/audio_player_container"
|
|
app:layout_constraintStart_toStartOf="@id/audio_player_container"
|
|
app:layout_constraintTop_toTopOf="@id/audio_player_container">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:padding="20dp">
|
|
|
|
<ImageView
|
|
android:id="@+id/minimize_player"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:background="?selectableItemBackgroundBorderless"
|
|
android:src="@drawable/ic_arrow_down" />
|
|
|
|
<View
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1" />
|
|
|
|
<androidx.appcompat.widget.SwitchCompat
|
|
android:id="@+id/autoPlay"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="5dp"
|
|
android:scaleX="0.8"
|
|
android:scaleY="0.8"
|
|
android:thumb="@drawable/player_switch_thumb"
|
|
app:thumbTint="?colorPrimary"
|
|
app:track="@drawable/player_switch_track"
|
|
app:trackTint="?colorControlNormal" />
|
|
|
|
<ImageView
|
|
android:id="@+id/open_video"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginHorizontal="6dp"
|
|
android:src="@drawable/ic_video" />
|
|
|
|
</LinearLayout>
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1">
|
|
|
|
<com.google.android.material.imageview.ShapeableImageView
|
|
android:id="@+id/thumbnail"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginHorizontal="20dp"
|
|
android:layout_marginVertical="10dp"
|
|
android:adjustViewBounds="true"
|
|
android:scaleType="fitCenter"
|
|
app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Small"
|
|
tools:src="@tools:sample/backgrounds/scenic" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/volumeControls"
|
|
android:layout_width="42dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:background="@drawable/controls_layout_bg"
|
|
android:orientation="vertical"
|
|
android:visibility="gone"
|
|
tools:ignore="RtlHardcoded">
|
|
|
|
<TextView
|
|
android:id="@+id/volume_textView"
|
|
style="@style/SwipeControlString"
|
|
android:layout_gravity="center"
|
|
app:autoSizeTextType="uniform" />
|
|
|
|
<ProgressBar
|
|
android:id="@+id/volume_progressBar"
|
|
style="@android:style/Widget.ProgressBar.Horizontal"
|
|
android:layout_width="7dp"
|
|
android:layout_height="100dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginVertical="4dp"
|
|
android:progressDrawable="@drawable/vertical_progressbar" />
|
|
|
|
<ImageView
|
|
android:id="@+id/volume_imageView"
|
|
android:layout_width="24dp"
|
|
android:layout_height="24dp"
|
|
android:layout_gravity="center"
|
|
android:contentDescription="@string/volume"
|
|
android:src="@drawable/ic_volume_up" />
|
|
|
|
</LinearLayout>
|
|
|
|
<ProgressBar
|
|
android:id="@+id/progress"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center" />
|
|
|
|
</FrameLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="20dp"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/title"
|
|
style="@style/TextViewMarquee"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textSize="24sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/uploader"
|
|
style="@style/TextViewMarquee"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="10dp"
|
|
android:textSize="18sp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<com.google.android.material.slider.Slider
|
|
android:id="@+id/time_bar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="20dp"
|
|
app:labelBehavior="gone" />
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingHorizontal="20dp">
|
|
|
|
<TextView
|
|
android:id="@+id/current_position"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="start|center"
|
|
tools:text="00:00" />
|
|
|
|
<TextView
|
|
android:id="@+id/duration"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="end|center"
|
|
tools:text="10:15" />
|
|
|
|
</FrameLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginBottom="36dp">
|
|
|
|
<FrameLayout
|
|
android:id="@+id/rewindFL"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:background="?attr/selectableItemBackgroundBorderless">
|
|
|
|
<ImageView
|
|
android:layout_width="36dp"
|
|
android:layout_height="36dp"
|
|
android:layout_gravity="center"
|
|
android:src="@drawable/ic_rewind_md" />
|
|
|
|
<TextView
|
|
android:id="@+id/rewindTV"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginTop="2dp"
|
|
android:textSize="8sp"
|
|
android:textStyle="bold"
|
|
tools:ignore="SmallSp" />
|
|
|
|
</FrameLayout>
|
|
|
|
<ImageView
|
|
android:id="@+id/prev"
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginHorizontal="20dp"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:src="@drawable/ic_prev" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/play_pause"
|
|
android:layout_width="72dp"
|
|
android:layout_height="72dp"
|
|
android:insetLeft="0dp"
|
|
android:insetTop="0dp"
|
|
android:insetRight="0dp"
|
|
android:insetBottom="0dp"
|
|
app:icon="@drawable/ic_pause"
|
|
app:iconSize="24dp"
|
|
app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Full" />
|
|
|
|
<ImageView
|
|
android:id="@+id/next"
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginHorizontal="20dp"
|
|
android:src="@drawable/ic_next" />
|
|
|
|
<FrameLayout
|
|
android:id="@+id/forwardFL"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:background="?attr/selectableItemBackgroundBorderless">
|
|
|
|
<ImageView
|
|
android:layout_width="36dp"
|
|
android:layout_height="36dp"
|
|
android:layout_gravity="center"
|
|
android:src="@drawable/ic_forward_md" />
|
|
|
|
<TextView
|
|
android:id="@+id/forwardTV"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginTop="2dp"
|
|
android:textSize="8sp"
|
|
android:textStyle="bold"
|
|
tools:ignore="SmallSp" />
|
|
|
|
</FrameLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
style="@style/Widget.Material3.CardView.Elevated"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginTop="30dp"
|
|
app:shapeAppearanceOverlay="@style/CardOnlyBottomCorners">
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:padding="15dp">
|
|
|
|
<ImageView
|
|
android:id="@+id/playback_options"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="start|center_vertical"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:scaleX="0.9"
|
|
android:scaleY="0.9"
|
|
android:src="@drawable/ic_speed" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:orientation="horizontal">
|
|
|
|
<ImageView
|
|
android:id="@+id/open_chapters"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="10dp"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:scaleX="0.9"
|
|
android:scaleY="0.9"
|
|
android:src="@drawable/ic_frame" />
|
|
|
|
<ImageView
|
|
android:id="@+id/open_queue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:src="@drawable/ic_queue" />
|
|
|
|
</LinearLayout>
|
|
|
|
<ImageView
|
|
android:id="@+id/show_more"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="end|center_vertical"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:scaleX="0.9"
|
|
android:scaleY="0.9"
|
|
android:src="@drawable/ic_three_dots" />
|
|
|
|
</FrameLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/miniPlayerControls"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="54dp"
|
|
android:alpha="0"
|
|
android:visibility="gone"
|
|
app:layout_constraintBottom_toBottomOf="@id/audio_player_container"
|
|
app:layout_constraintEnd_toEndOf="@id/audio_player_container"
|
|
app:layout_constraintStart_toStartOf="@id/audio_player_container"
|
|
app:layout_constraintTop_toTopOf="@id/audio_player_container">
|
|
|
|
<ImageView
|
|
android:id="@+id/miniPlayerThumbnail"
|
|
android:layout_width="96dp"
|
|
android:layout_height="match_parent"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:padding="8dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/miniPlayerTitle"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_weight="1"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:paddingHorizontal="8dp"
|
|
android:paddingVertical="15dp" />
|
|
|
|
<ImageView
|
|
android:id="@+id/miniPlayerPause"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:padding="8dp"
|
|
android:src="@drawable/ic_pause" />
|
|
|
|
<ImageView
|
|
android:id="@+id/miniPlayerClose"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:padding="8dp"
|
|
android:src="@drawable/ic_close" />
|
|
|
|
</LinearLayout>
|
|
|
|
</com.github.libretube.ui.views.SingleViewTouchableMotionLayout> |