jimu-decompiled/sources/androidx/appcompat/widget/AppCompatCheckedTextView.java
2025-05-13 19:24:51 +02:00

67 lines
2.5 KiB
Java

package androidx.appcompat.widget;
import android.R;
import android.content.Context;
import android.util.AttributeSet;
import android.view.ActionMode;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.CheckedTextView;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.widget.TextViewCompat;
/* loaded from: classes.dex */
public class AppCompatCheckedTextView extends CheckedTextView {
private static final int[] b = {R.attr.checkMark};
private final AppCompatTextHelper a;
public AppCompatCheckedTextView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, R.attr.checkedTextViewStyle);
}
@Override // android.widget.CheckedTextView, android.widget.TextView, android.view.View
protected void drawableStateChanged() {
super.drawableStateChanged();
AppCompatTextHelper appCompatTextHelper = this.a;
if (appCompatTextHelper != null) {
appCompatTextHelper.a();
}
}
@Override // android.widget.TextView, android.view.View
public InputConnection onCreateInputConnection(EditorInfo editorInfo) {
InputConnection onCreateInputConnection = super.onCreateInputConnection(editorInfo);
AppCompatHintHelper.a(onCreateInputConnection, editorInfo, this);
return onCreateInputConnection;
}
@Override // android.widget.CheckedTextView
public void setCheckMarkDrawable(int i) {
setCheckMarkDrawable(AppCompatResources.c(getContext(), i));
}
@Override // android.widget.TextView
public void setCustomSelectionActionModeCallback(ActionMode.Callback callback) {
super.setCustomSelectionActionModeCallback(TextViewCompat.a(this, callback));
}
@Override // android.widget.TextView
public void setTextAppearance(Context context, int i) {
super.setTextAppearance(context, i);
AppCompatTextHelper appCompatTextHelper = this.a;
if (appCompatTextHelper != null) {
appCompatTextHelper.a(context, i);
}
}
public AppCompatCheckedTextView(Context context, AttributeSet attributeSet, int i) {
super(TintContextWrapper.b(context), attributeSet, i);
this.a = new AppCompatTextHelper(this);
this.a.a(attributeSet, i);
this.a.a();
TintTypedArray a = TintTypedArray.a(getContext(), attributeSet, b, i, 0);
setCheckMarkDrawable(a.b(0));
a.a();
}
}