86 lines
4.3 KiB
Java
86 lines
4.3 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.res.ColorStateList;
|
||
|
import android.content.res.TypedArray;
|
||
|
import android.graphics.Rect;
|
||
|
import android.graphics.drawable.Drawable;
|
||
|
import android.graphics.drawable.InsetDrawable;
|
||
|
import android.graphics.drawable.RippleDrawable;
|
||
|
import android.widget.TextView;
|
||
|
import androidx.core.view.ViewCompat;
|
||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||
|
import o.C17052tZT;
|
||
|
|
||
|
/* renamed from: o.fsN, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class C14391fsN {
|
||
|
private final FLD a;
|
||
|
public final Rect b;
|
||
|
private final int c;
|
||
|
private final ColorStateList d;
|
||
|
private final ColorStateList e;
|
||
|
private final ColorStateList j;
|
||
|
|
||
|
private C14391fsN(ColorStateList colorStateList, ColorStateList colorStateList2, ColorStateList colorStateList3, int i, FLD fld, Rect rect) {
|
||
|
if (rect.left >= 0) {
|
||
|
if (rect.top >= 0) {
|
||
|
if (rect.right >= 0) {
|
||
|
if (rect.bottom < 0) {
|
||
|
throw new IllegalArgumentException();
|
||
|
}
|
||
|
this.b = rect;
|
||
|
this.j = colorStateList2;
|
||
|
this.e = colorStateList;
|
||
|
this.d = colorStateList3;
|
||
|
this.c = i;
|
||
|
this.a = fld;
|
||
|
return;
|
||
|
}
|
||
|
throw new IllegalArgumentException();
|
||
|
}
|
||
|
throw new IllegalArgumentException();
|
||
|
}
|
||
|
throw new IllegalArgumentException();
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static C14391fsN d(Context context, int i) {
|
||
|
if (i != 0) {
|
||
|
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(i, C17052tZT.jNh.MaterialCalendarItem);
|
||
|
Rect rect = new Rect(obtainStyledAttributes.getDimensionPixelOffset(C17052tZT.jNh.MaterialCalendarItem_android_insetLeft, 0), obtainStyledAttributes.getDimensionPixelOffset(C17052tZT.jNh.MaterialCalendarItem_android_insetTop, 0), obtainStyledAttributes.getDimensionPixelOffset(C17052tZT.jNh.MaterialCalendarItem_android_insetRight, 0), obtainStyledAttributes.getDimensionPixelOffset(C17052tZT.jNh.MaterialCalendarItem_android_insetBottom, 0));
|
||
|
ColorStateList Ku_ = C14739fyr.Ku_(context, obtainStyledAttributes, C17052tZT.jNh.MaterialCalendarItem_itemFillColor);
|
||
|
ColorStateList Ku_2 = C14739fyr.Ku_(context, obtainStyledAttributes, C17052tZT.jNh.MaterialCalendarItem_itemTextColor);
|
||
|
ColorStateList Ku_3 = C14739fyr.Ku_(context, obtainStyledAttributes, C17052tZT.jNh.MaterialCalendarItem_itemStrokeColor);
|
||
|
int dimensionPixelSize = obtainStyledAttributes.getDimensionPixelSize(C17052tZT.jNh.MaterialCalendarItem_itemStrokeWidth, 0);
|
||
|
FLD fld = new FLD(FLD.d(context, obtainStyledAttributes.getResourceId(C17052tZT.jNh.MaterialCalendarItem_itemShapeAppearance, 0), obtainStyledAttributes.getResourceId(C17052tZT.jNh.MaterialCalendarItem_itemShapeAppearanceOverlay, 0), new C17525xWe(BitmapDescriptorFactory.HUE_RED)), (byte) 0);
|
||
|
obtainStyledAttributes.recycle();
|
||
|
return new C14391fsN(Ku_, Ku_2, Ku_3, dimensionPixelSize, fld, rect);
|
||
|
}
|
||
|
throw new IllegalArgumentException("Cannot create a CalendarItemStyle with a styleResId of 0");
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void IQ_(TextView textView) {
|
||
|
C4363bXv c4363bXv = new C4363bXv();
|
||
|
C4363bXv c4363bXv2 = new C4363bXv();
|
||
|
c4363bXv.setShapeAppearanceModel(this.a);
|
||
|
c4363bXv2.setShapeAppearanceModel(this.a);
|
||
|
ColorStateList colorStateList = this.e;
|
||
|
if (c4363bXv.B.d != colorStateList) {
|
||
|
c4363bXv.B.d = colorStateList;
|
||
|
c4363bXv.onStateChange(c4363bXv.getState());
|
||
|
}
|
||
|
float f = this.c;
|
||
|
ColorStateList colorStateList2 = this.d;
|
||
|
c4363bXv.B.p = f;
|
||
|
c4363bXv.invalidateSelf();
|
||
|
if (c4363bXv.B.r != colorStateList2) {
|
||
|
c4363bXv.B.r = colorStateList2;
|
||
|
c4363bXv.onStateChange(c4363bXv.getState());
|
||
|
}
|
||
|
textView.setTextColor(this.j);
|
||
|
ViewCompat.sn_(textView, new InsetDrawable((Drawable) new RippleDrawable(this.j.withAlpha(30), c4363bXv, c4363bXv2), this.b.left, this.b.top, this.b.right, this.b.bottom));
|
||
|
}
|
||
|
}
|