2023-01-13 22:50:00 +05:30
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2023-05-08 20:54:59 +05:30
|
|
|
<com.github.libretube.ui.views.SingleViewTouchableMotionLayout
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
2023-01-13 22:50:00 +05:30
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:id="@+id/playerMotionLayout"
|
2023-01-13 22:50:00 +05:30
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2023-03-21 23:44:24 +05:30
|
|
|
app:layoutDescription="@xml/audio_player_scene">
|
2023-01-13 22:50:00 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:id="@+id/audio_player_container"
|
2023-01-13 22:50:00 +05:30
|
|
|
android:layout_width="match_parent"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:background="?android:attr/colorBackground"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2023-05-08 20:54:59 +05:30
|
|
|
app:layout_constraintTop_toTopOf="parent"/>
|
2023-01-13 22:50:00 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<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">
|
|
|
|
|
2023-05-08 20:54:59 +05:30
|
|
|
<FrameLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:padding="20dp">
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:layout_gravity="center|start"
|
|
|
|
android:id="@+id/minimize_player"
|
|
|
|
android:src="@drawable/ic_arrow_down"
|
|
|
|
android:background="?selectableItemBackgroundBorderless"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/dropdown_menu"
|
|
|
|
android:src="@drawable/ic_three_dots"
|
|
|
|
android:layout_gravity="center|end"
|
|
|
|
android:background="?selectableItemBackgroundBorderless"
|
|
|
|
android:layout_width="20dp"
|
|
|
|
android:layout_height="20dp"/>
|
|
|
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<FrameLayout
|
2023-01-13 22:50:00 +05:30
|
|
|
android:layout_width="match_parent"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:layout_height="0dp"
|
|
|
|
android:layout_weight="1">
|
2023-01-13 22:50:00 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<com.google.android.material.imageview.ShapeableImageView
|
|
|
|
android:id="@+id/thumbnail"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2023-01-31 22:27:24 +05:30
|
|
|
android:layout_gravity="center"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:layout_marginHorizontal="20dp"
|
|
|
|
android:layout_marginVertical="10dp"
|
|
|
|
android:adjustViewBounds="true"
|
|
|
|
android:scaleType="fitCenter"
|
|
|
|
app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Small"
|
2023-05-08 20:54:59 +05:30
|
|
|
tools:src="@tools:sample/backgrounds/scenic"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:id="@+id/volumeControls"
|
|
|
|
android:layout_width="42dp"
|
|
|
|
android:layout_height="wrap_content"
|
2023-01-31 22:27:24 +05:30
|
|
|
android:layout_gravity="center"
|
2023-03-21 23:44:24 +05:30
|
|
|
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"
|
2023-05-08 20:54:59 +05:30
|
|
|
app:autoSizeTextType="uniform"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
<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"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:progressDrawable="@drawable/vertical_progressbar"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/volume_imageView"
|
|
|
|
android:layout_width="24dp"
|
|
|
|
android:layout_height="24dp"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:contentDescription="@string/volume"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:src="@drawable/ic_volume_up"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
</LinearLayout>
|
2023-01-31 22:27:24 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<ProgressBar
|
|
|
|
android:id="@+id/progress"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:layout_gravity="center"/>
|
2023-01-31 22:27:24 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
</FrameLayout>
|
2023-01-31 22:27:24 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
2023-01-21 22:50:45 +05:30
|
|
|
android:layout_height="wrap_content"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:layout_margin="20dp"
|
|
|
|
android:orientation="vertical">
|
2023-01-21 22:50:45 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<TextView
|
|
|
|
android:id="@+id/title"
|
|
|
|
style="@style/TextViewMarquee"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:textSize="24sp"/>
|
2023-01-13 22:50:00 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<TextView
|
|
|
|
android:id="@+id/uploader"
|
|
|
|
style="@style/TextViewMarquee"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="10dp"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:textSize="18sp"/>
|
2023-01-13 22:50:00 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<com.google.android.material.slider.Slider
|
|
|
|
android:id="@+id/time_bar"
|
2023-01-21 22:50:45 +05:30
|
|
|
android:layout_width="match_parent"
|
2023-01-13 22:50:00 +05:30
|
|
|
android:layout_height="wrap_content"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:layout_marginHorizontal="20dp"
|
2023-05-08 20:54:59 +05:30
|
|
|
app:labelBehavior="gone"/>
|
2023-01-13 22:50:00 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<FrameLayout
|
2023-01-21 22:50:45 +05:30
|
|
|
android:layout_width="match_parent"
|
2023-01-13 22:50:00 +05:30
|
|
|
android:layout_height="wrap_content"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:paddingHorizontal="20dp">
|
2023-01-13 22:50:00 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<TextView
|
|
|
|
android:id="@+id/current_position"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="start|center"
|
2023-05-08 20:54:59 +05:30
|
|
|
tools:text="00:00"/>
|
2023-01-13 22:50:00 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<TextView
|
|
|
|
android:id="@+id/duration"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="end|center"
|
2023-05-08 20:54:59 +05:30
|
|
|
tools:text="10:15"/>
|
2023-01-13 22:50:00 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
</FrameLayout>
|
2023-01-14 00:05:32 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<LinearLayout
|
2023-01-14 00:05:32 +05:30
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:layout_gravity="center"
|
|
|
|
android:layout_marginTop="10dp"
|
|
|
|
android:layout_marginBottom="36dp">
|
2023-01-14 00:05:32 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<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"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:src="@drawable/ic_prev"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
<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"
|
2023-05-08 20:54:59 +05:30
|
|
|
app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Full"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/next"
|
|
|
|
android:layout_width="48dp"
|
|
|
|
android:layout_height="48dp"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:layout_marginHorizontal="20dp"
|
|
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:src="@drawable/ic_next"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
style="@style/Widget.Material3.CardView.Elevated"
|
2023-01-14 00:05:32 +05:30
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:layout_gravity="center"
|
|
|
|
android:layout_marginBottom="30dp"
|
|
|
|
app:cardCornerRadius="18dp">
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:padding="15dp">
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/open_queue"
|
|
|
|
style="@style/AudioPlayerButton"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:src="@drawable/ic_queue"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/playback_options"
|
|
|
|
style="@style/AudioPlayerButton"
|
|
|
|
android:layout_width="27dp"
|
|
|
|
android:layout_height="27dp"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:src="@drawable/ic_speed"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/open_video"
|
|
|
|
style="@style/AudioPlayerButton"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:src="@drawable/ic_video"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/share"
|
|
|
|
style="@style/AudioPlayerButton"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:src="@drawable/ic_share"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/close"
|
|
|
|
style="@style/AudioPlayerButton"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:src="@drawable/ic_close"/>
|
2023-01-14 00:05:32 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
</LinearLayout>
|
2023-01-14 00:05:32 +05:30
|
|
|
|
2023-01-13 22:50:00 +05:30
|
|
|
<LinearLayout
|
2023-03-21 23:44:24 +05:30
|
|
|
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">
|
2023-01-13 22:50:00 +05:30
|
|
|
|
|
|
|
<ImageView
|
2023-03-21 23:44:24 +05:30
|
|
|
android:id="@+id/miniPlayerThumbnail"
|
|
|
|
android:layout_width="96dp"
|
|
|
|
android:layout_height="match_parent"
|
2023-01-13 22:50:00 +05:30
|
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:padding="8dp"/>
|
2023-03-21 23:44:24 +05:30
|
|
|
|
|
|
|
<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"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:paddingVertical="15dp"/>
|
2023-01-13 22:50:00 +05:30
|
|
|
|
|
|
|
<ImageView
|
2023-03-21 23:44:24 +05:30
|
|
|
android:id="@+id/miniPlayerPause"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2023-01-13 22:50:00 +05:30
|
|
|
android:layout_gravity="center"
|
|
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:padding="8dp"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:src="@drawable/ic_pause"/>
|
2023-01-21 16:16:56 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
<ImageView
|
|
|
|
android:id="@+id/miniPlayerClose"
|
2023-01-21 16:16:56 +05:30
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center"
|
2023-03-21 23:44:24 +05:30
|
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
|
|
android:padding="8dp"
|
2023-05-08 20:54:59 +05:30
|
|
|
android:src="@drawable/ic_close"/>
|
2023-01-21 16:16:56 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
</LinearLayout>
|
2023-01-21 16:16:56 +05:30
|
|
|
|
2023-03-21 23:44:24 +05:30
|
|
|
</com.github.libretube.ui.views.SingleViewTouchableMotionLayout>
|