make ComposeText extend AppCompatEditText

Fixes #3134
Closes #3160

// FREEBIE
This commit is contained in:
Jake McGinty 2015-05-13 11:35:49 -07:00 committed by Moxie Marlinspike
parent 16b71aa0a8
commit 488767550e

View File

@ -1,17 +1,15 @@
package org.thoughtcrime.securesms.components;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v7.widget.AppCompatEditText;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.style.RelativeSizeSpan;
import android.util.AttributeSet;
import android.widget.EditText;
public class ComposeText extends EditText {
public class ComposeText extends AppCompatEditText {
public ComposeText(Context context) {
super(context);
}
@ -24,11 +22,6 @@ public class ComposeText extends EditText {
super(context, attrs, defStyleAttr);
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public ComposeText(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
public void setHint(@NonNull String hint) {
SpannableString span = new SpannableString(hint);
span.setSpan(new RelativeSizeSpan(0.8f), 0, hint.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);