From 6a4aa8075d196f371c9175d8fe5e341fbaef7cf3 Mon Sep 17 00:00:00 2001 From: Bazsalanszky Date: Thu, 10 Aug 2023 17:17:08 +0200 Subject: [PATCH] Post detail up/downvote separation This commit separates the up and downvote values on a post detail page. --- .../PostDetailRecyclerViewAdapter.java | 145 ++++++++++++++++-- .../infinityforlemmy/post/ParsePost.java | 2 +- app/src/main/res/layout/item_comment.xml | 1 + .../res/layout/item_post_detail_gallery.xml | 15 +- ...tem_post_detail_image_and_gif_autoplay.xml | 15 +- .../main/res/layout/item_post_detail_link.xml | 15 +- .../layout/item_post_detail_no_preview.xml | 15 +- .../main/res/layout/item_post_detail_text.xml | 15 +- ...item_post_detail_video_and_gif_preview.xml | 15 +- .../item_post_detail_video_autoplay.xml | 15 +- ...etail_video_autoplay_legacy_controller.xml | 15 +- 11 files changed, 242 insertions(+), 26 deletions(-) diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/eu/toldi/infinityforlemmy/adapters/PostDetailRecyclerViewAdapter.java index eede12f1..e8178da2 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/adapters/PostDetailRecyclerViewAdapter.java @@ -15,6 +15,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.text.Spanned; +import android.view.Gravity; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; @@ -172,6 +173,8 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter diff --git a/app/src/main/res/layout/item_post_detail_gallery.xml b/app/src/main/res/layout/item_post_detail_gallery.xml index a066f946..6ce0953c 100644 --- a/app/src/main/res/layout/item_post_detail_gallery.xml +++ b/app/src/main/res/layout/item_post_detail_gallery.xml @@ -289,6 +289,19 @@ app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_gallery" app:layout_constraintTop_toTopOf="parent" /> + + + + + app:layout_constraintStart_toEndOf="@id/downvote_text_view_item_post_detail_image_and_gif_autoplay" /> + + + app:layout_constraintStart_toEndOf="@id/downvote_text_view_item_post_detail_link" /> + + + app:layout_constraintStart_toEndOf="@id/downvote_text_view_item_post_detail_no_preview_link" /> + + + app:layout_constraintStart_toEndOf="@id/downvote_text_view_item_post_detail_text" /> + + + app:layout_constraintStart_toEndOf="@id/downvote_text_view_item_post_detail_video_and_gif_preview" /> + + + app:layout_constraintStart_toEndOf="@id/downvote_text_view_item_post_detail_video_autoplay" /> + + + app:layout_constraintStart_toEndOf="@id/downvote_text_view_item_post_detail_video_autoplay" />