feat: comments targeted at database
This commit is contained in:
parent
1694a1cb24
commit
a73c4cd678
17 changed files with 544 additions and 228 deletions
14
app/src/main/res/drawable/ic_crown.xml
Normal file
14
app/src/main/res/drawable/ic_crown.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#fcba03"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M16,9L20,5V16H4V5L6,7M8,9L12,5L14,7M4,19H20"
|
||||
android:strokeWidth="1.5"
|
||||
android:strokeColor="#fcba03"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
</vector>
|
14
app/src/main/res/drawable/ic_shield.xml
Normal file
14
app/src/main/res/drawable/ic_shield.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#ff0f0f"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M11.302,21.615C11.523,21.744 11.634,21.809 11.79,21.842C11.912,21.868 12.088,21.868 12.21,21.842C12.366,21.809 12.477,21.744 12.698,21.615C14.646,20.478 20,16.908 20,12V6.6C20,6.042 20,5.763 19.893,5.55C19.797,5.362 19.649,5.212 19.461,5.114C19.25,5.004 18.966,5.001 18.399,4.994C15.427,4.959 13.714,4.714 12,3C10.286,4.714 8.573,4.959 5.601,4.994C5.034,5.001 4.75,5.004 4.539,5.114C4.351,5.212 4.203,5.362 4.107,5.55C4,5.763 4,6.042 4,6.6V12C4,16.908 9.354,20.478 11.302,21.615Z"
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="#ff0f0f"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
</vector>
|
|
@ -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>
|
|
@ -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"
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/comment_sort_ascending"
|
||||
android:title="@string/comments_sort_ascending" />
|
||||
android:id="@+id/comment_sort_newest"
|
||||
android:title="@string/newest" />
|
||||
<item
|
||||
android:id="@+id/comment_sort_descending"
|
||||
android:title="@string/comments_sort_descending" />
|
||||
android:id="@+id/comment_sort_oldest"
|
||||
android:title="@string/oldest" />
|
||||
<item
|
||||
android:id="@+id/comment_sort_upvote"
|
||||
android:title="@string/comments_sort_upvote" />
|
||||
android:id="@+id/comment_sort_highest_rated"
|
||||
android:title="@string/highest_rated" />
|
||||
<item
|
||||
android:id="@+id/comment_sort_downvote"
|
||||
android:title="@string/comments_sort_downvote" />
|
||||
android:id="@+id/comment_sort_lowest_rated"
|
||||
android:title="@string/lowest_rated" />
|
||||
</menu>
|
|
@ -659,8 +659,8 @@
|
|||
<string name="try_internal_cast_experimental">Try Internal Cast (Experimental)</string>
|
||||
|
||||
<string name="comments">Comments</string>
|
||||
<string name="comments_sort_ascending">Ascending</string>
|
||||
<string name="comments_sort_descending">Descending</string>
|
||||
<string name="comments_sort_upvote">Most UpVoted</string>
|
||||
<string name="comments_sort_downvote">Most DownVoted</string>
|
||||
<string name="newest">newest</string>
|
||||
<string name="oldest">oldest</string>
|
||||
<string name="highest_rated">highest rated</string>
|
||||
<string name="lowest_rated">lowest rated</string>
|
||||
</resources>
|
||||
|
|
|
@ -91,5 +91,15 @@
|
|||
<item name="android:background">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="CircularImageView" parent="">
|
||||
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.App.CircularImageView</item>
|
||||
</style>
|
||||
|
||||
<style name="ShapeAppearanceOverlay.App.CircularImageView" parent="">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">50%</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="ThemeOverlay_Dantotsu_MediaRouter" parent="ThemeOverlay.AppCompat"></style>
|
||||
</resources>
|
Loading…
Add table
Add a link
Reference in a new issue