From 920cd706aa88e6c95f24fa8e72a19a2683832139 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 30 Apr 2022 09:44:46 +0200 Subject: [PATCH] comment #6 - Increase font size for focused messages --- .../java/app/fedilab/android/ui/drawer/StatusAdapter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java index f31e5e8c..93fc1dbc 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java @@ -39,6 +39,7 @@ import android.text.Spanned; import android.text.TextUtils; import android.text.method.LinkMovementMethod; import android.text.style.ForegroundColorSpan; +import android.util.TypedValue; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.MotionEvent; @@ -280,6 +281,11 @@ public class StatusAdapter extends RecyclerView.Adapter } } } + if (status.isFocused) { + float currentTextSize = holder.binding.statusContent.getTextSize(); + holder.binding.statusContent.setTextSize(TypedValue.COMPLEX_UNIT_PX, currentTextSize * 1.3f); + holder.binding.spoiler.setTextSize(TypedValue.COMPLEX_UNIT_PX, currentTextSize * 1.3f); + } if (status.card != null && (display_card || status.isFocused) & status.card.description.trim().length() > 0) { if (status.card.width > status.card.height) { holder.binding.cardImageHorizontal.setVisibility(View.VISIBLE);