- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
61 lines
2.0 KiB
Java
61 lines
2.0 KiB
Java
package androidx.appcompat.widget;
|
|
|
|
import android.content.res.TypedArray;
|
|
import android.text.InputFilter;
|
|
import android.text.method.TransformationMethod;
|
|
import android.util.AttributeSet;
|
|
import android.widget.TextView;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.appcompat.R;
|
|
import androidx.emoji2.viewsintegration.EmojiTextViewHelper;
|
|
|
|
/* loaded from: classes.dex */
|
|
class AppCompatEmojiTextHelper {
|
|
|
|
@NonNull
|
|
private final EmojiTextViewHelper mEmojiTextViewHelper;
|
|
|
|
@NonNull
|
|
private final TextView mView;
|
|
|
|
public AppCompatEmojiTextHelper(@NonNull TextView textView) {
|
|
this.mView = textView;
|
|
this.mEmojiTextViewHelper = new EmojiTextViewHelper(textView, false);
|
|
}
|
|
|
|
public void loadFromAttributes(@Nullable AttributeSet attributeSet, int i) {
|
|
TypedArray obtainStyledAttributes = this.mView.getContext().obtainStyledAttributes(attributeSet, R.styleable.AppCompatTextView, i, 0);
|
|
try {
|
|
boolean z = obtainStyledAttributes.hasValue(R.styleable.AppCompatTextView_emojiCompatEnabled) ? obtainStyledAttributes.getBoolean(R.styleable.AppCompatTextView_emojiCompatEnabled, true) : true;
|
|
obtainStyledAttributes.recycle();
|
|
setEnabled(z);
|
|
} catch (Throwable th) {
|
|
obtainStyledAttributes.recycle();
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
public void setEnabled(boolean z) {
|
|
this.mEmojiTextViewHelper.setEnabled(z);
|
|
}
|
|
|
|
public boolean isEnabled() {
|
|
return this.mEmojiTextViewHelper.isEnabled();
|
|
}
|
|
|
|
@NonNull
|
|
public InputFilter[] getFilters(@NonNull InputFilter[] inputFilterArr) {
|
|
return this.mEmojiTextViewHelper.getFilters(inputFilterArr);
|
|
}
|
|
|
|
public void setAllCaps(boolean z) {
|
|
this.mEmojiTextViewHelper.setAllCaps(z);
|
|
}
|
|
|
|
@Nullable
|
|
public TransformationMethod wrapTransformationMethod(@Nullable TransformationMethod transformationMethod) {
|
|
return this.mEmojiTextViewHelper.wrapTransformationMethod(transformationMethod);
|
|
}
|
|
}
|