feat: comments targeted at database

This commit is contained in:
rebelonion 2024-02-15 12:44:52 -06:00
parent 1694a1cb24
commit a73c4cd678
17 changed files with 544 additions and 228 deletions

View file

@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows="true"
android:id="@+id/commentsLayout">
<LinearLayout
@ -38,27 +39,43 @@
android:contentDescription="@string/sort_by"
app:srcCompat="@drawable/ic_round_sort_24"
app:tint="?attr/colorOnBackground" />
</LinearLayout>
<ProgressBar
android:id="@+id/commentsProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginTop="64dp" />
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/commentsRefresh"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="58dp"
android:clipChildren="false"
android:clipToPadding="false">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/commentsList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="58dp"
android:visibility="gone"
tools:listitem="@layout/item_comments" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/commentInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:layout_gravity="bottom|end"
android:windowSoftInputMode="adjustResize"
android:background="@color/nav_bg">
<com.google.android.material.imageview.ShapeableImageView
@ -95,6 +112,5 @@
android:layout_marginEnd="12dp"
android:background="@drawable/ic_round_send_24"
tools:ignore="ContentDescription" />
</LinearLayout>
</FrameLayout>

View file

@ -19,6 +19,7 @@
android:layout_width="36dp"
android:layout_height="36dp"
android:scaleType="center"
style="@style/CircularImageView"
app:srcCompat="@drawable/ic_round_add_circle_24"
tools:ignore="ContentDescription,ImageContrastCheck" />
@ -33,6 +34,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
@ -41,9 +43,34 @@
android:layout_height="wrap_content"
android:fontFamily="@font/poppins_semi_bold"
android:text="Username"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:textAlignment="gravity"
android:textSize="15sp"
android:paddingTop="1dp"
android:paddingBottom="0dp"
tools:ignore="HardcodedText,RtlSymmetry"/>
<ImageView
android:id="@+id/modBadge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_shield"
android:layout_gravity="top"
android:visibility="visible"
android:scaleX="0.8"
android:scaleY="0.8" />
<ImageView
android:id="@+id/adminBadge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_crown"
android:layout_gravity="top"
android:visibility="visible"
android:scaleX="0.9"
android:scaleY="0.9" />
<TextView
android:id="@+id/commentUserTime"
android:layout_width="wrap_content"
@ -103,6 +130,17 @@
android:textSize="12sp"
android:layout_marginStart="12dp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/commentBanUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.6"
android:fontFamily="@font/poppins_semi_bold"
android:text="Ban User"
android:textSize="12sp"
android:layout_marginStart="12dp"
tools:ignore="HardcodedText" />
</LinearLayout>
<TextView
android:id="@+id/commentTotalReplies"