From bf806bd717e53984a1f048f238e7a17fc0755263 Mon Sep 17 00:00:00 2001 From: Andreas Fehn Date: Sun, 21 Feb 2016 22:41:38 +0100 Subject: [PATCH] Do not decrease compose hint font size Fixes #4903 Closes #5275 // FREEBIE --- .../securesms/components/ComposeText.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/org/thoughtcrime/securesms/components/ComposeText.java b/src/org/thoughtcrime/securesms/components/ComposeText.java index 4ae48d64d9..b83e9c0c86 100644 --- a/src/org/thoughtcrime/securesms/components/ComposeText.java +++ b/src/org/thoughtcrime/securesms/components/ComposeText.java @@ -5,12 +5,9 @@ import android.content.res.Configuration; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.InputType; -import android.text.Spannable; -import android.text.SpannableString; import android.text.SpannableStringBuilder; import android.text.TextUtils; import android.text.TextUtils.TruncateAt; -import android.text.style.RelativeSizeSpan; import android.util.AttributeSet; import android.view.inputmethod.EditorInfo; @@ -20,8 +17,8 @@ import org.thoughtcrime.securesms.util.TextSecurePreferences; public class ComposeText extends EmojiEditText { - private SpannableString hint; - private SpannableString subHint; + private CharSequence hint; + private CharSequence subHint; public ComposeText(Context context) { super(context); @@ -58,15 +55,8 @@ public class ComposeText extends EmojiEditText { } public void setHint(@NonNull String hint, @Nullable CharSequence subHint) { - this.hint = new SpannableString(hint); - this.hint.setSpan(new RelativeSizeSpan(0.8f), 0, hint.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE); - - if (subHint != null) { - this.subHint = new SpannableString(subHint); - this.subHint.setSpan(new RelativeSizeSpan(0.8f), 0, subHint.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE); - } else { - this.subHint = null; - } + this.hint = hint; + this.subHint = subHint; if (this.subHint != null) { super.setHint(new SpannableStringBuilder().append(ellipsizeToWidth(this.hint))