From f08d242ca971d4dc3044ecb9a743c731b89161fe Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Thu, 14 Sep 2023 23:51:58 -0400 Subject: Continue changing vote button icons. --- .../adapters/PostRecyclerViewAdapter.java | 472 +++++++++------------ app/src/main/res/layout/item_post_compact.xml | 147 +++---- .../layout/item_post_compact_right_thumbnail.xml | 147 +++---- 3 files changed, 344 insertions(+), 422 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 50f7ff3a..e6439f6b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -102,6 +102,8 @@ import ml.docilealligator.infinityforreddit.databinding.ItemPostCard3TextBinding import ml.docilealligator.infinityforreddit.databinding.ItemPostCard3VideoTypeAutoplayBinding; import ml.docilealligator.infinityforreddit.databinding.ItemPostCard3VideoTypeAutoplayLegacyControllerBinding; import ml.docilealligator.infinityforreddit.databinding.ItemPostCard3WithPreviewBinding; +import ml.docilealligator.infinityforreddit.databinding.ItemPostCompactBinding; +import ml.docilealligator.infinityforreddit.databinding.ItemPostCompactRightThumbnailBinding; import ml.docilealligator.infinityforreddit.databinding.ItemPostGalleryGalleryTypeBinding; import ml.docilealligator.infinityforreddit.databinding.ItemPostGalleryTypeBinding; import ml.docilealligator.infinityforreddit.databinding.ItemPostTextBinding; @@ -551,9 +553,9 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter requestListener; Post post; @@ -4017,21 +4020,34 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter { - if (mAccessToken == null) { - Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show(); - return; - } - int position = getBindingAdapterPosition(); if (position < 0) { return; } Post post = getItem(position); if (post != null) { + if (mAccessToken == null) { + Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show(); + return; + } + if (mMarkPostsAsReadAfterVoting) { markPostRead(post, true); } @@ -4279,32 +4288,35 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter { - if (mAccessToken == null) { - Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show(); - return; - } - int position = getBindingAdapterPosition(); if (position < 0) { return; } Post post = getItem(position); if (post != null) { + if (mAccessToken == null) { + Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show(); + return; + } + if (mMarkPostsAsReadAfterVoting) { markPostRead(post, true); } @@ -4375,32 +4392,34 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter + android:layout_height="wrap_content" + android:padding="8dp"> - + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"> - + + + + + + + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_compact" + style="?attr/materialIconButtonOutlinedStyle" /> - + app:layout_constraintStart_toEndOf="@id/save_button_item_post_compact" + style="?attr/materialIconButtonOutlinedStyle" /> - - - - - + app:layout_constraintHorizontal_bias="1" + style="?attr/materialButtonOutlinedStyle" /> diff --git a/app/src/main/res/layout/item_post_compact_right_thumbnail.xml b/app/src/main/res/layout/item_post_compact_right_thumbnail.xml index da3305d6..a5ea945e 100644 --- a/app/src/main/res/layout/item_post_compact_right_thumbnail.xml +++ b/app/src/main/res/layout/item_post_compact_right_thumbnail.xml @@ -279,102 +279,91 @@ + android:layout_height="wrap_content" + android:padding="8dp"> - + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"> - + + + + + + + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_compact_right_thumbnail" + style="?attr/materialIconButtonOutlinedStyle" /> - + app:layout_constraintStart_toEndOf="@id/save_button_item_post_compact_right_thumbnail" + style="?attr/materialIconButtonOutlinedStyle" /> - - - - - + app:layout_constraintHorizontal_bias="1" + style="?attr/materialButtonOutlinedStyle" /> -- cgit v1.2.3