fedilab-Android-App/app/src/main/res/layouts/peertube/layout/drawer_peertube_list.xml

188 lines
8.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2023 Thomas Schneider
This file is a part of Fedilab
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation; either version 3 of the
License, or (at your option) any later version.
Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along with Fedilab; if not,
see <http://www.gnu.org/licenses>.
-->
<androidx.appcompat.widget.LinearLayoutCompat 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:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/header_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:background="?colorSecondaryContainer"
android:padding="6dp"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
android:textColor="?colorOnSecondaryContainer"
app:layout_constraintTop_toTopOf="parent"
tools:text="Science" />
<com.google.android.material.card.MaterialCardView
style="@style/Widget.Material3.CardView.Elevated"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="6dp">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/main_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/peertube_channel_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="6dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/peertube_channel_avatar"
android:layout_width="36dp"
android:layout_height="36dp"
android:contentDescription="@string/profile_picture"
android:scaleType="fitCenter"
tools:src="@tools:sample/avatars" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/peertube_displayname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
tools:text="@tools:sample/full_names" />
<TextView
android:id="@+id/peertube_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:ellipsize="end"
android:singleLine="true"
tools:text="username@instance.test" />
</androidx.appcompat.widget.LinearLayoutCompat>
<com.google.android.material.button.MaterialButton
android:id="@+id/more_actions"
style="@style/Widget.Material3.Button.OutlinedButton.Icon"
android:layout_width="48dp"
android:layout_height="48dp"
app:icon="@drawable/ic_baseline_more_vert_24"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/peertube_video_image" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/preview_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/peertube_video_info"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="6dp"
android:paddingHorizontal="6dp">
<ImageView
android:id="@+id/peertube_video_image"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_marginEnd="6dp"
android:contentDescription="@string/image_preview"
android:scaleType="centerCrop"
tools:src="@tools:sample/backgrounds/scenic" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/peertube_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
android:textColor="?colorPrimary"
android:textStyle="bold"
tools:maxLines="1"
tools:text="@tools:sample/lorem/random" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="10dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/peertube_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="6dp"
android:background="@drawable/rounded_corner"
android:paddingHorizontal="6dp"
android:textAppearance="@style/TextAppearance.Material3.LabelLarge"
android:textColor="@android:color/white"
tools:text="1:00" />
<TextView
android:id="@+id/peertube_views"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
tools:text="100 views" />
<TextView
android:id="@+id/peertube_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
tools:text="@tools:sample/date/day_of_week" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</com.google.android.material.card.MaterialCardView>
</androidx.appcompat.widget.LinearLayoutCompat>