Playing queue layout

This commit is contained in:
Bnyro 2022-10-23 11:12:02 +02:00
parent 531bf2f309
commit d6232b1ddc
4 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,7 @@
package com.github.libretube.ui.adapters
import androidx.recyclerview.widget.RecyclerView
import com.github.libretube.ui.viewholders.PlayingQueueViewHolder
class PlayingQueueAdapter: RecyclerView.Adapter<PlayingQueueViewHolder> {
}

View File

@ -0,0 +1,27 @@
package com.github.libretube.ui.sheets
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.github.libretube.databinding.BottomSheetBinding
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
class PlayingQueueSheet: BottomSheetDialogFragment() {
private lateinit var binding: BottomSheetBinding
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
binding = BottomSheetBinding.inflate(layoutInflater)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
}
}

View File

@ -0,0 +1,8 @@
package com.github.libretube.ui.viewholders
import androidx.recyclerview.widget.RecyclerView
import com.github.libretube.databinding.QueueRowBinding
class PlayingQueueViewHolder(
val binding: QueueRowBinding
) : RecyclerView.ViewHolder(binding.root)

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rounded_ripple"
android:orientation="horizontal"
android:padding="10dp">
<androidx.cardview.widget.CardView
android:layout_width="80dp"
android:layout_height="45dp"
android:layout_gravity="center"
android:layout_marginEnd="10dp"
app:cardCornerRadius="12dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:src="@tools:sample/backgrounds/scenic" />
</androidx.cardview.widget.CardView>
<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/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:ellipsize="end"
android:maxLines="1"
tools:text="I am Hardstyle - Episode 111" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/uploader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
tools:text="Brennan Heart" />
<TextView
android:id="@+id/duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textSize="14sp"
tools:text="10:00" />
</LinearLayout>
</LinearLayout>
</LinearLayout>