fix: comment pagination

This commit is contained in:
rebelonion 2024-03-10 00:02:40 -06:00
parent 14115ada4c
commit d04ced94ea
2 changed files with 122 additions and 84 deletions

View file

@ -21,65 +21,64 @@
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.core.widget.NestedScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
android:layout_height="wrap_content"
android:gravity="end"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<LinearLayout
<ImageView
android:id="@+id/commentFilter"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_marginEnd="12dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/sort_by"
app:srcCompat="@drawable/ic_round_filter_alt_24"
app:tint="?attr/colorOnBackground" />
<ImageView
android:id="@+id/commentSort"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_marginEnd="12dp"
android:background="?android:attr/selectableItemBackground"
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" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/commentsList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:nestedScrollingEnabled="true"
android:visibility="gone"
tools:listitem="@layout/item_comments"
tools:visibility="visible" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/commentFilter"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_marginEnd="12dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/sort_by"
app:srcCompat="@drawable/ic_round_filter_alt_24"
app:tint="?attr/colorOnBackground" />
<ImageView
android:id="@+id/commentSort"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_marginEnd="12dp"
android:background="?android:attr/selectableItemBackground"
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.recyclerview.widget.RecyclerView
android:id="@+id/commentsList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
android:visibility="gone"
tools:listitem="@layout/item_comments"
tools:visibility="visible" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<ProgressBar
android:id="@+id/commentBottomRefresh"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="32dp"
android:visibility="gone" />
</FrameLayout>
</LinearLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
@ -133,8 +132,8 @@
android:id="@+id/commentInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="?android:colorBackground"
android:orientation="horizontal"
android:paddingTop="8dp"
android:paddingBottom="8dp">
@ -172,18 +171,18 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:background="@drawable/ic_label_off_24"
android:layout_marginEnd="8dp"
android:background="@drawable/ic_label_off_24"
android:visibility="gone"
tools:visibility="visible"
tools:ignore="ContentDescription" />
tools:ignore="ContentDescription"
tools:visibility="visible" />
<ImageButton
android:id="@+id/commentSend"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginEnd="12dp"
android:layout_gravity="center"
android:layout_marginEnd="12dp"
android:background="@drawable/ic_round_send_24"
android:visibility="gone"
tools:ignore="ContentDescription"