wip: UI for comments
This commit is contained in:
parent
9dbc3db1b8
commit
97b957a0ab
5 changed files with 126 additions and 1 deletions
77
app/src/main/res/layout/item_comments.xml
Normal file
77
app/src/main/res/layout/item_comments.xml
Normal file
|
@ -0,0 +1,77 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:id="@+id/commentsCardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/card_outline"
|
||||
android:backgroundTint="?attr/colorSurfaceVariant"
|
||||
android:padding="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp">
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/commentUserAvatar"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:scaleType="center"
|
||||
app:srcCompat="@drawable/ic_round_add_circle_24"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="8dp"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/commentUserName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:text="Username"
|
||||
android:textSize="15sp"
|
||||
tools:ignore="HardcodedText,RtlSymmetry"/>
|
||||
<TextView
|
||||
android:id="@+id/commentUserTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="6dp"
|
||||
android:alpha="0.6"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:text="Time"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="HardcodedText,RtlSymmetry" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/commentText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:maxLines="3"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/slogan"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/commentReply"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="end"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
app:srcCompat="@drawable/ic_round_reply_24"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
Loading…
Add table
Add a link
Reference in a new issue