From fa1d7ffac3a412862ebc9e19256d6f83973115d0 Mon Sep 17 00:00:00 2001 From: Stypox Date: Wed, 9 Jun 2021 15:26:10 +0200 Subject: [PATCH 1/2] Const text width for metadata; scrollable tags layout --- app/src/main/res/layout/chip.xml | 2 + app/src/main/res/layout/item_metadata.xml | 12 +--- .../main/res/layout/item_metadata_tags.xml | 58 ++++++------------- 3 files changed, 22 insertions(+), 50 deletions(-) diff --git a/app/src/main/res/layout/chip.xml b/app/src/main/res/layout/chip.xml index f7a55fdf3..41e5223a9 100644 --- a/app/src/main/res/layout/chip.xml +++ b/app/src/main/res/layout/chip.xml @@ -2,8 +2,10 @@ \ No newline at end of file diff --git a/app/src/main/res/layout/item_metadata.xml b/app/src/main/res/layout/item_metadata.xml index 43dce5cfb..e49537c31 100644 --- a/app/src/main/res/layout/item_metadata.xml +++ b/app/src/main/res/layout/item_metadata.xml @@ -7,23 +7,15 @@ android:paddingTop="6dp" android:paddingBottom="6dp"> - - @@ -35,7 +27,7 @@ android:layout_marginStart="16dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="@+id/guideline" + app:layout_constraintStart_toEndOf="@+id/metadata_type_view" app:layout_constraintTop_toTopOf="parent" tools:text="Description Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a ultricies ex. Integer sit amet sodales risus. Duis non mi et urna pretium bibendum." /> diff --git a/app/src/main/res/layout/item_metadata_tags.xml b/app/src/main/res/layout/item_metadata_tags.xml index 69225b353..885eae98d 100644 --- a/app/src/main/res/layout/item_metadata_tags.xml +++ b/app/src/main/res/layout/item_metadata_tags.xml @@ -1,46 +1,24 @@ - + android:layout_height="wrap_content" + android:fadeScrollbars="false"> - + app:singleLine="true"> - - - - - - - \ No newline at end of file + + + \ No newline at end of file From 40a2df847b1d05cb1bc95e14da2d20d41c6597d7 Mon Sep 17 00:00:00 2001 From: Stypox Date: Sun, 13 Jun 2021 21:56:06 +0200 Subject: [PATCH 2/2] Move tags layout at the bottom, use multiple lines --- .../fragments/detail/DescriptionFragment.java | 4 +-- app/src/main/res/layout/item_metadata.xml | 3 +- .../main/res/layout/item_metadata_tags.xml | 35 +++++++++++-------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java index 5f1cbc365..8a1036472 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java @@ -154,8 +154,6 @@ public class DescriptionFragment extends BaseFragment { addMetadataItem(inflater, layout, false, R.string.metadata_category, streamInfo.getCategory()); - addTagsMetadataItem(inflater, layout); - addMetadataItem(inflater, layout, false, R.string.metadata_licence, streamInfo.getLicence()); @@ -177,6 +175,8 @@ public class DescriptionFragment extends BaseFragment { R.string.metadata_host, streamInfo.getHost()); addMetadataItem(inflater, layout, true, R.string.metadata_thumbnail_url, streamInfo.getThumbnailUrl()); + + addTagsMetadataItem(inflater, layout); } private void addMetadataItem(final LayoutInflater inflater, diff --git a/app/src/main/res/layout/item_metadata.xml b/app/src/main/res/layout/item_metadata.xml index e49537c31..31dedd880 100644 --- a/app/src/main/res/layout/item_metadata.xml +++ b/app/src/main/res/layout/item_metadata.xml @@ -4,8 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingTop="6dp" - android:paddingBottom="6dp"> + android:paddingVertical="6dp"> - + + + android:layout_marginTop="8dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/metadata_type_view" /> - - - \ No newline at end of file + \ No newline at end of file