added container in the download bottom sheet details

This commit is contained in:
deniscerri 2023-03-16 19:16:53 +01:00
parent ee8c387c33
commit a3436aada2
No known key found for this signature in database
GPG key ID: 95C43D517D830350
5 changed files with 28 additions and 0 deletions

View file

@ -121,6 +121,7 @@ class CancelledDownloadsFragment : Fragment(), GenericDownloadAdapter.OnItemClic
val time = bottomSheet.findViewById<Chip>(R.id.time)
val formatNote = bottomSheet.findViewById<Chip>(R.id.format_note)
val container = bottomSheet.findViewById<Chip>(R.id.container_chip)
val codec = bottomSheet.findViewById<Chip>(R.id.codec)
val fileSize = bottomSheet.findViewById<Chip>(R.id.file_size)
@ -130,6 +131,9 @@ class CancelledDownloadsFragment : Fragment(), GenericDownloadAdapter.OnItemClic
View.GONE
else formatNote!!.text = item.format.format_note
if (item.format.container != "") container!!.text = item.format.container.uppercase()
else container!!.visibility = View.GONE
val codecText =
if (item.format.encoding != "") {
item.format.encoding.uppercase()

View file

@ -121,6 +121,7 @@ class ErroredDownloadsFragment() : Fragment(), GenericDownloadAdapter.OnItemClic
val time = bottomSheet.findViewById<Chip>(R.id.time)
val formatNote = bottomSheet.findViewById<TextView>(R.id.format_note)
val container = bottomSheet.findViewById<TextView>(R.id.container_chip)
val codec = bottomSheet.findViewById<TextView>(R.id.codec)
val fileSize = bottomSheet.findViewById<TextView>(R.id.file_size)
@ -130,6 +131,9 @@ class ErroredDownloadsFragment() : Fragment(), GenericDownloadAdapter.OnItemClic
View.GONE
else formatNote!!.text = item.format.format_note
if (item.format.container != "") container!!.text = item.format.container.uppercase()
else container!!.visibility = View.GONE
val codecText =
if (item.format.encoding != "") {
item.format.encoding.uppercase()

View file

@ -420,6 +420,7 @@ class HistoryFragment : Fragment(), HistoryAdapter.OnItemClickListener{
val time = bottomSheet!!.findViewById<TextView>(R.id.time)
val formatNote = bottomSheet!!.findViewById<TextView>(R.id.format_note)
val container = bottomSheet!!.findViewById<TextView>(R.id.container_chip)
val codec = bottomSheet!!.findViewById<TextView>(R.id.codec)
val fileSize = bottomSheet!!.findViewById<TextView>(R.id.file_size)
@ -431,6 +432,9 @@ class HistoryFragment : Fragment(), HistoryAdapter.OnItemClickListener{
if (item.format.format_note == "?" || item.format.format_note == "") formatNote!!.visibility = GONE
else formatNote!!.text = item.format.format_note
if (item.format.container != "") container!!.text = item.format.container.uppercase()
else container!!.visibility = View.GONE
val codecText =
if (item.format.encoding != "") {
item.format.encoding.uppercase()

View file

@ -129,6 +129,7 @@ class QueuedDownloadsFragment : Fragment(), GenericDownloadAdapter.OnItemClickLi
val time = bottomSheet.findViewById<Chip>(R.id.time)
val formatNote = bottomSheet.findViewById<Chip>(R.id.format_note)
val container = bottomSheet.findViewById<Chip>(R.id.container_chip)
val codec = bottomSheet.findViewById<Chip>(R.id.codec)
val fileSize = bottomSheet.findViewById<Chip>(R.id.file_size)
@ -156,6 +157,9 @@ class QueuedDownloadsFragment : Fragment(), GenericDownloadAdapter.OnItemClickLi
View.GONE
else formatNote!!.text = item.format.format_note
if (item.format.container != "") container!!.text = item.format.container.uppercase()
else container!!.visibility = View.GONE
val codecText =
if (item.format.encoding != "") {
item.format.encoding.uppercase()

View file

@ -112,6 +112,18 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<com.google.android.material.chip.Chip
android:id="@+id/container_chip"
style="@style/Widget.Material3.FloatingActionButton.Large.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:minWidth="30dp"
app:cornerRadius="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<com.google.android.material.chip.Chip
android:id="@+id/codec"
style="@style/Widget.Material3.FloatingActionButton.Large.Secondary"