comment #6 - Increase font size for focused messages

This commit is contained in:
Thomas 2022-04-30 09:44:46 +02:00
parent 8184686d29
commit 920cd706aa
1 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,7 @@ import android.text.Spanned;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.text.style.ForegroundColorSpan; import android.text.style.ForegroundColorSpan;
import android.util.TypedValue;
import android.view.ContextThemeWrapper; import android.view.ContextThemeWrapper;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MotionEvent; import android.view.MotionEvent;
@ -280,6 +281,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
} }
} }
} }
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 != null && (display_card || status.isFocused) & status.card.description.trim().length() > 0) {
if (status.card.width > status.card.height) { if (status.card.width > status.card.height) {
holder.binding.cardImageHorizontal.setVisibility(View.VISIBLE); holder.binding.cardImageHorizontal.setVisibility(View.VISIBLE);