From a102fc9cad2ebfd9c464a6bddff9db7c273d3bd2 Mon Sep 17 00:00:00 2001 From: Stypox Date: Mon, 7 Jun 2021 07:57:26 +0200 Subject: [PATCH] Use constraint layout for play queue item Also remove invalid ic_selected attribute --- .../subscription/SubscriptionFragment.kt | 6 +- .../player/playqueue/PlayQueueAdapter.java | 8 +- .../player/playqueue/PlayQueueItemHolder.java | 2 - app/src/main/res/layout/play_queue_item.xml | 93 +++++++++---------- app/src/main/res/values/attrs.xml | 3 - app/src/main/res/values/dimens.xml | 4 +- 6 files changed, 56 insertions(+), 60 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt index 13643af15..8a235fa8a 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt @@ -294,8 +294,10 @@ class SubscriptionFragment : BaseStateFragment() { } private fun showLongTapDialog(selectedItem: ChannelInfoItem) { - val commands = arrayOf(getString(R.string.share), getString(R.string.open_in_browser), - getString(R.string.unsubscribe)) + val commands = arrayOf( + getString(R.string.share), getString(R.string.open_in_browser), + getString(R.string.unsubscribe) + ) val actions = DialogInterface.OnClickListener { _, i -> when (i) { diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueAdapter.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueAdapter.java index 462b9eb53..dd95fb4d5 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueAdapter.java @@ -182,8 +182,10 @@ public class PlayQueueAdapter extends RecyclerView.Adapter - - - + android:foreground="?attr/selectableItemBackground"> - - + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintBottom_toTopOf="@+id/itemAdditionalDetails" + app:layout_constraintEnd_toStartOf="@+id/itemHandle" + app:layout_constraintStart_toEndOf="@+id/itemThumbnailView" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_chainStyle="packed" + tools:text="Lorem ipsum dolor sit amet, consectetur adipisci elit. " /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/itemHandle" + app:layout_constraintStart_toEndOf="@+id/itemThumbnailView" + app:layout_constraintTop_toBottomOf="@+id/itemVideoTitleView" + tools:text="Uploader uploader uploader uploader uploader ยท Youtube" /> - + + + diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 80572e14e..01dbfce15 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -1,8 +1,5 @@ - - - diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index ea26be57e..b55ad781c 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -114,9 +114,9 @@ 24dp 28dp - + 62dp - 40dp + 35dp 30sp