137 lines
3.7 KiB
Java
137 lines
3.7 KiB
Java
package androidx.appcompat.widget;
|
|
|
|
import android.R;
|
|
import android.content.Context;
|
|
import android.content.res.ColorStateList;
|
|
import android.graphics.PorterDuff;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.text.InputFilter;
|
|
import android.util.AttributeSet;
|
|
import android.widget.ToggleButton;
|
|
import o.WpN;
|
|
import o.WvB;
|
|
import o.Yoi;
|
|
import o.nKv;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class AppCompatToggleButton extends ToggleButton {
|
|
private final WpN a;
|
|
private final Yoi d;
|
|
private WvB e;
|
|
|
|
public AppCompatToggleButton(Context context) {
|
|
this(context, null);
|
|
}
|
|
|
|
public AppCompatToggleButton(Context context, AttributeSet attributeSet) {
|
|
this(context, attributeSet, R.attr.buttonStyleToggle);
|
|
}
|
|
|
|
public AppCompatToggleButton(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
nKv.b(getContext());
|
|
WpN wpN = new WpN(this);
|
|
this.a = wpN;
|
|
wpN.fy_(attributeSet, i);
|
|
Yoi yoi = new Yoi(this);
|
|
this.d = yoi;
|
|
yoi.he_(attributeSet, i);
|
|
c().gm_(attributeSet, i);
|
|
}
|
|
|
|
@Override // android.view.View
|
|
public void setBackgroundResource(int i) {
|
|
super.setBackgroundResource(i);
|
|
WpN wpN = this.a;
|
|
if (wpN != null) {
|
|
wpN.c(i);
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.ToggleButton, android.view.View
|
|
public void setBackgroundDrawable(Drawable drawable) {
|
|
super.setBackgroundDrawable(drawable);
|
|
WpN wpN = this.a;
|
|
if (wpN != null) {
|
|
wpN.fz_(drawable);
|
|
}
|
|
}
|
|
|
|
public void setSupportBackgroundTintList(ColorStateList colorStateList) {
|
|
WpN wpN = this.a;
|
|
if (wpN != null) {
|
|
wpN.fB_(colorStateList);
|
|
}
|
|
}
|
|
|
|
public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
|
|
WpN wpN = this.a;
|
|
if (wpN != null) {
|
|
wpN.fC_(mode);
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.ToggleButton, android.widget.CompoundButton, android.widget.TextView, android.view.View
|
|
protected void drawableStateChanged() {
|
|
super.drawableStateChanged();
|
|
WpN wpN = this.a;
|
|
if (wpN != null) {
|
|
wpN.a();
|
|
}
|
|
Yoi yoi = this.d;
|
|
if (yoi != null) {
|
|
yoi.a();
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setFilters(InputFilter[] inputFilterArr) {
|
|
super.setFilters(c().gl_(inputFilterArr));
|
|
}
|
|
|
|
private WvB c() {
|
|
if (this.e == null) {
|
|
this.e = new WvB(this);
|
|
}
|
|
return this.e;
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setAllCaps(boolean z) {
|
|
super.setAllCaps(z);
|
|
c().e(z);
|
|
}
|
|
|
|
public void setEmojiCompatEnabled(boolean z) {
|
|
c().a(z);
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setCompoundDrawables(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
|
|
super.setCompoundDrawables(drawable, drawable2, drawable3, drawable4);
|
|
Yoi yoi = this.d;
|
|
if (yoi != null) {
|
|
yoi.l();
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setCompoundDrawablesRelative(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
|
|
super.setCompoundDrawablesRelative(drawable, drawable2, drawable3, drawable4);
|
|
Yoi yoi = this.d;
|
|
if (yoi != null) {
|
|
yoi.l();
|
|
}
|
|
}
|
|
|
|
public void setSupportCompoundDrawablesTintList(ColorStateList colorStateList) {
|
|
this.d.hh_(colorStateList);
|
|
this.d.a();
|
|
}
|
|
|
|
public void setSupportCompoundDrawablesTintMode(PorterDuff.Mode mode) {
|
|
this.d.hi_(mode);
|
|
this.d.a();
|
|
}
|
|
}
|