Move tags layout at the bottom, use multiple lines

This commit is contained in:
Stypox 2021-06-13 21:56:06 +02:00
parent fa1d7ffac3
commit 40a2df847b
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
3 changed files with 24 additions and 18 deletions

View file

@ -154,8 +154,6 @@ public class DescriptionFragment extends BaseFragment {
addMetadataItem(inflater, layout, false, addMetadataItem(inflater, layout, false,
R.string.metadata_category, streamInfo.getCategory()); R.string.metadata_category, streamInfo.getCategory());
addTagsMetadataItem(inflater, layout);
addMetadataItem(inflater, layout, false, addMetadataItem(inflater, layout, false,
R.string.metadata_licence, streamInfo.getLicence()); R.string.metadata_licence, streamInfo.getLicence());
@ -177,6 +175,8 @@ public class DescriptionFragment extends BaseFragment {
R.string.metadata_host, streamInfo.getHost()); R.string.metadata_host, streamInfo.getHost());
addMetadataItem(inflater, layout, true, addMetadataItem(inflater, layout, true,
R.string.metadata_thumbnail_url, streamInfo.getThumbnailUrl()); R.string.metadata_thumbnail_url, streamInfo.getThumbnailUrl());
addTagsMetadataItem(inflater, layout);
} }
private void addMetadataItem(final LayoutInflater inflater, private void addMetadataItem(final LayoutInflater inflater,

View file

@ -4,8 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="6dp" android:paddingVertical="6dp">
android:paddingBottom="6dp">
<TextView <TextView
android:id="@+id/metadata_type_view" android:id="@+id/metadata_type_view"

View file

@ -1,24 +1,31 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:fadeScrollbars="false"> android:fadeScrollbars="false">
<TextView
android:id="@+id/metadata_type_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:text="@string/metadata_tags"
android:textAllCaps="true"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.chip.ChipGroup <com.google.android.material.chip.ChipGroup
android:id="@+id/metadata_tags_chips" android:id="@+id/metadata_tags_chips"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:singleLine="true"> android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/metadata_type_view" />
<TextView </androidx.constraintlayout.widget.ConstraintLayout>
android:layout_width="96dp"
android:layout_height="40dp"
android:layout_marginEnd="8dp"
android:gravity="center_vertical|end"
android:text="@string/metadata_tags"
android:textAllCaps="true"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold" />
</com.google.android.material.chip.ChipGroup>
</HorizontalScrollView>