feat: comments sorter popup
This commit is contained in:
parent
aaf9bdd00c
commit
1694a1cb24
6 changed files with 64 additions and 12 deletions
|
@ -10,18 +10,36 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/commentTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity=""
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:gravity="center|start"
|
||||
android:text="@string/comments"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/commentTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:gravity="center"
|
||||
android:text="@string/comments"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="16sp" />
|
||||
<ImageView
|
||||
android:id="@+id/commentSort"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:contentDescription="@string/sort_by"
|
||||
app:srcCompat="@drawable/ic_round_sort_24"
|
||||
app:tint="?attr/colorOnBackground" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/commentsList"
|
||||
|
|
|
@ -108,6 +108,7 @@
|
|||
android:id="@+id/commentTotalReplies"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:alpha="0.6"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:text="View x more replies"
|
||||
|
|
15
app/src/main/res/menu/comments_sort_menu.xml
Normal file
15
app/src/main/res/menu/comments_sort_menu.xml
Normal file
|
@ -0,0 +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" />
|
||||
<item
|
||||
android:id="@+id/comment_sort_descending"
|
||||
android:title="@string/comments_sort_descending" />
|
||||
<item
|
||||
android:id="@+id/comment_sort_upvote"
|
||||
android:title="@string/comments_sort_upvote" />
|
||||
<item
|
||||
android:id="@+id/comment_sort_downvote"
|
||||
android:title="@string/comments_sort_downvote" />
|
||||
</menu>
|
|
@ -657,5 +657,10 @@
|
|||
<string name="import_export_settings">Import/Export Settings</string>
|
||||
<string name="import_settings">Import Settings</string>
|
||||
<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>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue