From f75d8258f4c31133a184b5ad09e2d71f4f7e3671 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 4 Feb 2023 17:53:25 +0100 Subject: [PATCH] Fix button sizes not updated --- .../mastodon/ui/drawer/StatusAdapter.java | 2 +- .../layouts/mastodon/layout/drawer_status.xml | 42 +++++++++---------- .../com/varunest/sparkbutton/SparkButton.java | 5 +++ 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java index 3c556efa..361f9d92 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java @@ -1069,7 +1069,6 @@ public class StatusAdapter extends RecyclerView.Adapter } //Button sizes depending of the defined scale float normalSize = Helper.convertDpToPixel(28, context); - holder.binding.actionButtonReply.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.actionButtonReply.getLayoutParams().height = (int) (normalSize * scaleIcon); holder.binding.actionButtonReply.requestLayout(); @@ -1082,6 +1081,7 @@ public class StatusAdapter extends RecyclerView.Adapter holder.binding.actionButtonFavorite.setImageSize((int) (normalSize * scaleIcon)); holder.binding.actionButtonBookmark.setImageSize((int) (normalSize * scaleIcon)); + holder.binding.statusAddCustomEmoji.getLayoutParams().width = (int) (normalSize * scaleIcon); holder.binding.statusAddCustomEmoji.getLayoutParams().height = (int) (normalSize * scaleIcon); holder.binding.statusAddCustomEmoji.requestLayout(); diff --git a/app/src/main/res/layouts/mastodon/layout/drawer_status.xml b/app/src/main/res/layouts/mastodon/layout/drawer_status.xml index b20a053b..adde24f0 100644 --- a/app/src/main/res/layouts/mastodon/layout/drawer_status.xml +++ b/app/src/main/res/layouts/mastodon/layout/drawer_status.xml @@ -630,10 +630,10 @@ app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.0"> - - - - - - -