TubeLab-App-Android/app/src/main/res/layout/drawer_comment.xml

147 lines
6.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2020 Thomas Schneider
This file is a part of TubeLab
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.
TubeLab 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 TubeLab; if not,
see <http://www.gnu.org/licenses>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="?android:dividerHorizontal"
android:orientation="horizontal"
android:clickable="true"
android:showDividers="end"
android:focusable="true">
<LinearLayout
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:id="@+id/decoration_container"
android:layout_width="wrap_content"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_height="wrap_content"
android:id="@+id/sub_comment_container"
android:layout_width="match_parent"
android:layout_marginStart="10dp">
<ImageView
android:id="@+id/comment_account_profile"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
android:src="@drawable/missing_peertube"
android:contentDescription="@string/profile_picture"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/comment_account_displayname"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:singleLine="true"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/comment_date"
app:layout_constraintStart_toEndOf="@+id/comment_account_profile"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/comment_account_username"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginStart="5dp"
android:ellipsize="end"
android:singleLine="true"
android:textSize="12sp"
app:layout_constraintEnd_toStartOf="@id/more_actions"
app:layout_constraintStart_toEndOf="@+id/comment_account_profile"
app:layout_constraintTop_toBottomOf="@+id/comment_account_displayname" />
<TextView
android:id="@+id/comment_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginStart="2dp"
android:layout_weight="0"
android:gravity="end"
android:maxLines="1"
android:textSize="12sp"
app:layout_constraintEnd_toStartOf="@id/more_actions"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/more_actions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="end"
android:text=""
app:drawableTopCompat="@drawable/ic_baseline_more_vert_24"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/comment_date" />
<TextView
android:id="@+id/comment_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textIsSelectable="true"
app:layout_constraintEnd_toStartOf="@id/more_actions"
app:layout_constraintStart_toStartOf="@id/comment_account_profile"
app:layout_constraintTop_toBottomOf="@+id/comment_account_profile" />
<TextView
android:id="@+id/number_of_replies"
app:layout_constraintTop_toBottomOf="@+id/comment_content"
app:layout_constraintStart_toStartOf="@id/comment_account_profile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/colorAccent"/>
<TextView
app:layout_constraintTop_toBottomOf="@+id/comment_content"
app:layout_constraintStart_toStartOf="@id/comment_account_profile"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:id="@+id/replyButton"
android:text="@string/reply"
android:textColor="?attr/colorAccent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:id="@+id/post_reply_button"
android:layout_width="match_parent"
android:gravity="center"
android:visibility="gone"
android:layout_height="wrap_content"
android:text="@string/add_public_reply"
android:textColor="?attr/colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/comment_content" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>