Initial commit
This commit is contained in:
17
sources/androidx/cardview/R$attr.java
Normal file
17
sources/androidx/cardview/R$attr.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package androidx.cardview;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class R$attr {
|
||||
public static final int cardBackgroundColor = 2130968676;
|
||||
public static final int cardCornerRadius = 2130968677;
|
||||
public static final int cardElevation = 2130968678;
|
||||
public static final int cardMaxElevation = 2130968679;
|
||||
public static final int cardPreventCornerOverlap = 2130968680;
|
||||
public static final int cardUseCompatPadding = 2130968681;
|
||||
public static final int cardViewStyle = 2130968682;
|
||||
public static final int contentPadding = 2130968766;
|
||||
public static final int contentPaddingBottom = 2130968767;
|
||||
public static final int contentPaddingLeft = 2130968768;
|
||||
public static final int contentPaddingRight = 2130968769;
|
||||
public static final int contentPaddingTop = 2130968770;
|
||||
}
|
9
sources/androidx/cardview/R$color.java
Normal file
9
sources/androidx/cardview/R$color.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package androidx.cardview;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class R$color {
|
||||
public static final int cardview_dark_background = 2131099757;
|
||||
public static final int cardview_light_background = 2131099758;
|
||||
public static final int cardview_shadow_end_color = 2131099759;
|
||||
public static final int cardview_shadow_start_color = 2131099760;
|
||||
}
|
8
sources/androidx/cardview/R$dimen.java
Normal file
8
sources/androidx/cardview/R$dimen.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package androidx.cardview;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class R$dimen {
|
||||
public static final int cardview_compat_inset_shadow = 2131165337;
|
||||
public static final int cardview_default_elevation = 2131165338;
|
||||
public static final int cardview_default_radius = 2131165339;
|
||||
}
|
9
sources/androidx/cardview/R$style.java
Normal file
9
sources/androidx/cardview/R$style.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package androidx.cardview;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class R$style {
|
||||
public static final int Base_CardView = 2131886098;
|
||||
public static final int CardView = 2131886283;
|
||||
public static final int CardView_Dark = 2131886284;
|
||||
public static final int CardView_Light = 2131886285;
|
||||
}
|
21
sources/androidx/cardview/R$styleable.java
Normal file
21
sources/androidx/cardview/R$styleable.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package androidx.cardview;
|
||||
|
||||
import android.R;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class R$styleable {
|
||||
public static final int[] CardView = {R.attr.minWidth, R.attr.minHeight, com.ubt.jimu.R.attr.cardBackgroundColor, com.ubt.jimu.R.attr.cardCornerRadius, com.ubt.jimu.R.attr.cardElevation, com.ubt.jimu.R.attr.cardMaxElevation, com.ubt.jimu.R.attr.cardPreventCornerOverlap, com.ubt.jimu.R.attr.cardUseCompatPadding, com.ubt.jimu.R.attr.contentPadding, com.ubt.jimu.R.attr.contentPaddingBottom, com.ubt.jimu.R.attr.contentPaddingLeft, com.ubt.jimu.R.attr.contentPaddingRight, com.ubt.jimu.R.attr.contentPaddingTop};
|
||||
public static final int CardView_android_minHeight = 1;
|
||||
public static final int CardView_android_minWidth = 0;
|
||||
public static final int CardView_cardBackgroundColor = 2;
|
||||
public static final int CardView_cardCornerRadius = 3;
|
||||
public static final int CardView_cardElevation = 4;
|
||||
public static final int CardView_cardMaxElevation = 5;
|
||||
public static final int CardView_cardPreventCornerOverlap = 6;
|
||||
public static final int CardView_cardUseCompatPadding = 7;
|
||||
public static final int CardView_contentPadding = 8;
|
||||
public static final int CardView_contentPaddingBottom = 9;
|
||||
public static final int CardView_contentPaddingLeft = 10;
|
||||
public static final int CardView_contentPaddingRight = 11;
|
||||
public static final int CardView_contentPaddingTop = 12;
|
||||
}
|
250
sources/androidx/cardview/widget/CardView.java
Normal file
250
sources/androidx/cardview/widget/CardView.java
Normal file
@@ -0,0 +1,250 @@
|
||||
package androidx.cardview.widget;
|
||||
|
||||
import android.R;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import androidx.cardview.R$attr;
|
||||
import androidx.cardview.R$color;
|
||||
import androidx.cardview.R$style;
|
||||
import androidx.cardview.R$styleable;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class CardView extends FrameLayout {
|
||||
private static final int[] h = {R.attr.colorBackground};
|
||||
private static final CardViewImpl i;
|
||||
private boolean a;
|
||||
private boolean b;
|
||||
int c;
|
||||
int d;
|
||||
final Rect e;
|
||||
final Rect f;
|
||||
private final CardViewDelegate g;
|
||||
|
||||
static {
|
||||
int i2 = Build.VERSION.SDK_INT;
|
||||
if (i2 >= 21) {
|
||||
i = new CardViewApi21Impl();
|
||||
} else if (i2 >= 17) {
|
||||
i = new CardViewApi17Impl();
|
||||
} else {
|
||||
i = new CardViewBaseImpl();
|
||||
}
|
||||
i.a();
|
||||
}
|
||||
|
||||
public CardView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public ColorStateList getCardBackgroundColor() {
|
||||
return i.e(this.g);
|
||||
}
|
||||
|
||||
public float getCardElevation() {
|
||||
return i.a(this.g);
|
||||
}
|
||||
|
||||
public int getContentPaddingBottom() {
|
||||
return this.e.bottom;
|
||||
}
|
||||
|
||||
public int getContentPaddingLeft() {
|
||||
return this.e.left;
|
||||
}
|
||||
|
||||
public int getContentPaddingRight() {
|
||||
return this.e.right;
|
||||
}
|
||||
|
||||
public int getContentPaddingTop() {
|
||||
return this.e.top;
|
||||
}
|
||||
|
||||
public float getMaxCardElevation() {
|
||||
return i.d(this.g);
|
||||
}
|
||||
|
||||
public boolean getPreventCornerOverlap() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public float getRadius() {
|
||||
return i.b(this.g);
|
||||
}
|
||||
|
||||
public boolean getUseCompatPadding() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
@Override // android.widget.FrameLayout, android.view.View
|
||||
protected void onMeasure(int i2, int i3) {
|
||||
if (i instanceof CardViewApi21Impl) {
|
||||
super.onMeasure(i2, i3);
|
||||
return;
|
||||
}
|
||||
int mode = View.MeasureSpec.getMode(i2);
|
||||
if (mode == Integer.MIN_VALUE || mode == 1073741824) {
|
||||
i2 = View.MeasureSpec.makeMeasureSpec(Math.max((int) Math.ceil(i.g(this.g)), View.MeasureSpec.getSize(i2)), mode);
|
||||
}
|
||||
int mode2 = View.MeasureSpec.getMode(i3);
|
||||
if (mode2 == Integer.MIN_VALUE || mode2 == 1073741824) {
|
||||
i3 = View.MeasureSpec.makeMeasureSpec(Math.max((int) Math.ceil(i.f(this.g)), View.MeasureSpec.getSize(i3)), mode2);
|
||||
}
|
||||
super.onMeasure(i2, i3);
|
||||
}
|
||||
|
||||
public void setCardBackgroundColor(int i2) {
|
||||
i.a(this.g, ColorStateList.valueOf(i2));
|
||||
}
|
||||
|
||||
public void setCardElevation(float f) {
|
||||
i.b(this.g, f);
|
||||
}
|
||||
|
||||
public void setMaxCardElevation(float f) {
|
||||
i.c(this.g, f);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public void setMinimumHeight(int i2) {
|
||||
this.d = i2;
|
||||
super.setMinimumHeight(i2);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public void setMinimumWidth(int i2) {
|
||||
this.c = i2;
|
||||
super.setMinimumWidth(i2);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public void setPadding(int i2, int i3, int i4, int i5) {
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public void setPaddingRelative(int i2, int i3, int i4, int i5) {
|
||||
}
|
||||
|
||||
public void setPreventCornerOverlap(boolean z) {
|
||||
if (z != this.b) {
|
||||
this.b = z;
|
||||
i.h(this.g);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRadius(float f) {
|
||||
i.a(this.g, f);
|
||||
}
|
||||
|
||||
public void setUseCompatPadding(boolean z) {
|
||||
if (this.a != z) {
|
||||
this.a = z;
|
||||
i.c(this.g);
|
||||
}
|
||||
}
|
||||
|
||||
public CardView(Context context, AttributeSet attributeSet) {
|
||||
this(context, attributeSet, R$attr.cardViewStyle);
|
||||
}
|
||||
|
||||
public void setCardBackgroundColor(ColorStateList colorStateList) {
|
||||
i.a(this.g, colorStateList);
|
||||
}
|
||||
|
||||
public CardView(Context context, AttributeSet attributeSet, int i2) {
|
||||
super(context, attributeSet, i2);
|
||||
int color;
|
||||
ColorStateList valueOf;
|
||||
this.e = new Rect();
|
||||
this.f = new Rect();
|
||||
this.g = new CardViewDelegate() { // from class: androidx.cardview.widget.CardView.1
|
||||
private Drawable a;
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewDelegate
|
||||
public void a(Drawable drawable) {
|
||||
this.a = drawable;
|
||||
CardView.this.setBackgroundDrawable(drawable);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewDelegate
|
||||
public boolean b() {
|
||||
return CardView.this.getUseCompatPadding();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewDelegate
|
||||
public Drawable c() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewDelegate
|
||||
public View d() {
|
||||
return CardView.this;
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewDelegate
|
||||
public boolean a() {
|
||||
return CardView.this.getPreventCornerOverlap();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewDelegate
|
||||
public void a(int i3, int i4, int i5, int i6) {
|
||||
CardView.this.f.set(i3, i4, i5, i6);
|
||||
CardView cardView = CardView.this;
|
||||
Rect rect = cardView.e;
|
||||
CardView.super.setPadding(i3 + rect.left, i4 + rect.top, i5 + rect.right, i6 + rect.bottom);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewDelegate
|
||||
public void a(int i3, int i4) {
|
||||
CardView cardView = CardView.this;
|
||||
if (i3 > cardView.c) {
|
||||
CardView.super.setMinimumWidth(i3);
|
||||
}
|
||||
CardView cardView2 = CardView.this;
|
||||
if (i4 > cardView2.d) {
|
||||
CardView.super.setMinimumHeight(i4);
|
||||
}
|
||||
}
|
||||
};
|
||||
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R$styleable.CardView, i2, R$style.CardView);
|
||||
if (obtainStyledAttributes.hasValue(R$styleable.CardView_cardBackgroundColor)) {
|
||||
valueOf = obtainStyledAttributes.getColorStateList(R$styleable.CardView_cardBackgroundColor);
|
||||
} else {
|
||||
TypedArray obtainStyledAttributes2 = getContext().obtainStyledAttributes(h);
|
||||
int color2 = obtainStyledAttributes2.getColor(0, 0);
|
||||
obtainStyledAttributes2.recycle();
|
||||
float[] fArr = new float[3];
|
||||
Color.colorToHSV(color2, fArr);
|
||||
if (fArr[2] > 0.5f) {
|
||||
color = getResources().getColor(R$color.cardview_light_background);
|
||||
} else {
|
||||
color = getResources().getColor(R$color.cardview_dark_background);
|
||||
}
|
||||
valueOf = ColorStateList.valueOf(color);
|
||||
}
|
||||
ColorStateList colorStateList = valueOf;
|
||||
float dimension = obtainStyledAttributes.getDimension(R$styleable.CardView_cardCornerRadius, 0.0f);
|
||||
float dimension2 = obtainStyledAttributes.getDimension(R$styleable.CardView_cardElevation, 0.0f);
|
||||
float dimension3 = obtainStyledAttributes.getDimension(R$styleable.CardView_cardMaxElevation, 0.0f);
|
||||
this.a = obtainStyledAttributes.getBoolean(R$styleable.CardView_cardUseCompatPadding, false);
|
||||
this.b = obtainStyledAttributes.getBoolean(R$styleable.CardView_cardPreventCornerOverlap, true);
|
||||
int dimensionPixelSize = obtainStyledAttributes.getDimensionPixelSize(R$styleable.CardView_contentPadding, 0);
|
||||
this.e.left = obtainStyledAttributes.getDimensionPixelSize(R$styleable.CardView_contentPaddingLeft, dimensionPixelSize);
|
||||
this.e.top = obtainStyledAttributes.getDimensionPixelSize(R$styleable.CardView_contentPaddingTop, dimensionPixelSize);
|
||||
this.e.right = obtainStyledAttributes.getDimensionPixelSize(R$styleable.CardView_contentPaddingRight, dimensionPixelSize);
|
||||
this.e.bottom = obtainStyledAttributes.getDimensionPixelSize(R$styleable.CardView_contentPaddingBottom, dimensionPixelSize);
|
||||
float f = dimension2 > dimension3 ? dimension2 : dimension3;
|
||||
this.c = obtainStyledAttributes.getDimensionPixelSize(R$styleable.CardView_android_minWidth, 0);
|
||||
this.d = obtainStyledAttributes.getDimensionPixelSize(R$styleable.CardView_android_minHeight, 0);
|
||||
obtainStyledAttributes.recycle();
|
||||
i.a(this.g, context, colorStateList, dimension, dimension2, f);
|
||||
}
|
||||
}
|
22
sources/androidx/cardview/widget/CardViewApi17Impl.java
Normal file
22
sources/androidx/cardview/widget/CardViewApi17Impl.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package androidx.cardview.widget;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.RectF;
|
||||
import androidx.cardview.widget.RoundRectDrawableWithShadow;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
class CardViewApi17Impl extends CardViewBaseImpl {
|
||||
CardViewApi17Impl() {
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewBaseImpl, androidx.cardview.widget.CardViewImpl
|
||||
public void a() {
|
||||
RoundRectDrawableWithShadow.r = new RoundRectDrawableWithShadow.RoundRectHelper(this) { // from class: androidx.cardview.widget.CardViewApi17Impl.1
|
||||
@Override // androidx.cardview.widget.RoundRectDrawableWithShadow.RoundRectHelper
|
||||
public void a(Canvas canvas, RectF rectF, float f, Paint paint) {
|
||||
canvas.drawRoundRect(rectF, f, f, paint);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
101
sources/androidx/cardview/widget/CardViewApi21Impl.java
Normal file
101
sources/androidx/cardview/widget/CardViewApi21Impl.java
Normal file
@@ -0,0 +1,101 @@
|
||||
package androidx.cardview.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.view.View;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
class CardViewApi21Impl implements CardViewImpl {
|
||||
CardViewApi21Impl() {
|
||||
}
|
||||
|
||||
private RoundRectDrawable j(CardViewDelegate cardViewDelegate) {
|
||||
return (RoundRectDrawable) cardViewDelegate.c();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void a() {
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void a(CardViewDelegate cardViewDelegate, Context context, ColorStateList colorStateList, float f, float f2, float f3) {
|
||||
cardViewDelegate.a(new RoundRectDrawable(colorStateList, f));
|
||||
View d = cardViewDelegate.d();
|
||||
d.setClipToOutline(true);
|
||||
d.setElevation(f2);
|
||||
c(cardViewDelegate, f3);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public float b(CardViewDelegate cardViewDelegate) {
|
||||
return j(cardViewDelegate).c();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void c(CardViewDelegate cardViewDelegate, float f) {
|
||||
j(cardViewDelegate).a(f, cardViewDelegate.b(), cardViewDelegate.a());
|
||||
i(cardViewDelegate);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public float d(CardViewDelegate cardViewDelegate) {
|
||||
return j(cardViewDelegate).b();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public ColorStateList e(CardViewDelegate cardViewDelegate) {
|
||||
return j(cardViewDelegate).a();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public float f(CardViewDelegate cardViewDelegate) {
|
||||
return b(cardViewDelegate) * 2.0f;
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public float g(CardViewDelegate cardViewDelegate) {
|
||||
return b(cardViewDelegate) * 2.0f;
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void h(CardViewDelegate cardViewDelegate) {
|
||||
c(cardViewDelegate, d(cardViewDelegate));
|
||||
}
|
||||
|
||||
public void i(CardViewDelegate cardViewDelegate) {
|
||||
if (!cardViewDelegate.b()) {
|
||||
cardViewDelegate.a(0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
float d = d(cardViewDelegate);
|
||||
float b = b(cardViewDelegate);
|
||||
int ceil = (int) Math.ceil(RoundRectDrawableWithShadow.a(d, b, cardViewDelegate.a()));
|
||||
int ceil2 = (int) Math.ceil(RoundRectDrawableWithShadow.b(d, b, cardViewDelegate.a()));
|
||||
cardViewDelegate.a(ceil, ceil2, ceil, ceil2);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void b(CardViewDelegate cardViewDelegate, float f) {
|
||||
cardViewDelegate.d().setElevation(f);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void c(CardViewDelegate cardViewDelegate) {
|
||||
c(cardViewDelegate, d(cardViewDelegate));
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void a(CardViewDelegate cardViewDelegate, float f) {
|
||||
j(cardViewDelegate).a(f);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public float a(CardViewDelegate cardViewDelegate) {
|
||||
return cardViewDelegate.d().getElevation();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void a(CardViewDelegate cardViewDelegate, ColorStateList colorStateList) {
|
||||
j(cardViewDelegate).a(colorStateList);
|
||||
}
|
||||
}
|
139
sources/androidx/cardview/widget/CardViewBaseImpl.java
Normal file
139
sources/androidx/cardview/widget/CardViewBaseImpl.java
Normal file
@@ -0,0 +1,139 @@
|
||||
package androidx.cardview.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import androidx.cardview.widget.RoundRectDrawableWithShadow;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
class CardViewBaseImpl implements CardViewImpl {
|
||||
final RectF a = new RectF();
|
||||
|
||||
CardViewBaseImpl() {
|
||||
}
|
||||
|
||||
private RoundRectDrawableWithShadow j(CardViewDelegate cardViewDelegate) {
|
||||
return (RoundRectDrawableWithShadow) cardViewDelegate.c();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void a() {
|
||||
RoundRectDrawableWithShadow.r = new RoundRectDrawableWithShadow.RoundRectHelper() { // from class: androidx.cardview.widget.CardViewBaseImpl.1
|
||||
@Override // androidx.cardview.widget.RoundRectDrawableWithShadow.RoundRectHelper
|
||||
public void a(Canvas canvas, RectF rectF, float f, Paint paint) {
|
||||
float f2 = 2.0f * f;
|
||||
float width = (rectF.width() - f2) - 1.0f;
|
||||
float height = (rectF.height() - f2) - 1.0f;
|
||||
if (f >= 1.0f) {
|
||||
float f3 = f + 0.5f;
|
||||
float f4 = -f3;
|
||||
CardViewBaseImpl.this.a.set(f4, f4, f3, f3);
|
||||
int save = canvas.save();
|
||||
canvas.translate(rectF.left + f3, rectF.top + f3);
|
||||
canvas.drawArc(CardViewBaseImpl.this.a, 180.0f, 90.0f, true, paint);
|
||||
canvas.translate(width, 0.0f);
|
||||
canvas.rotate(90.0f);
|
||||
canvas.drawArc(CardViewBaseImpl.this.a, 180.0f, 90.0f, true, paint);
|
||||
canvas.translate(height, 0.0f);
|
||||
canvas.rotate(90.0f);
|
||||
canvas.drawArc(CardViewBaseImpl.this.a, 180.0f, 90.0f, true, paint);
|
||||
canvas.translate(width, 0.0f);
|
||||
canvas.rotate(90.0f);
|
||||
canvas.drawArc(CardViewBaseImpl.this.a, 180.0f, 90.0f, true, paint);
|
||||
canvas.restoreToCount(save);
|
||||
float f5 = (rectF.left + f3) - 1.0f;
|
||||
float f6 = rectF.top;
|
||||
canvas.drawRect(f5, f6, (rectF.right - f3) + 1.0f, f6 + f3, paint);
|
||||
float f7 = (rectF.left + f3) - 1.0f;
|
||||
float f8 = rectF.bottom;
|
||||
canvas.drawRect(f7, f8 - f3, (rectF.right - f3) + 1.0f, f8, paint);
|
||||
}
|
||||
canvas.drawRect(rectF.left, rectF.top + f, rectF.right, rectF.bottom - f, paint);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public float b(CardViewDelegate cardViewDelegate) {
|
||||
return j(cardViewDelegate).b();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void c(CardViewDelegate cardViewDelegate) {
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void c(CardViewDelegate cardViewDelegate, float f) {
|
||||
j(cardViewDelegate).b(f);
|
||||
i(cardViewDelegate);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public float d(CardViewDelegate cardViewDelegate) {
|
||||
return j(cardViewDelegate).c();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public ColorStateList e(CardViewDelegate cardViewDelegate) {
|
||||
return j(cardViewDelegate).a();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public float f(CardViewDelegate cardViewDelegate) {
|
||||
return j(cardViewDelegate).d();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public float g(CardViewDelegate cardViewDelegate) {
|
||||
return j(cardViewDelegate).e();
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void h(CardViewDelegate cardViewDelegate) {
|
||||
j(cardViewDelegate).a(cardViewDelegate.a());
|
||||
i(cardViewDelegate);
|
||||
}
|
||||
|
||||
public void i(CardViewDelegate cardViewDelegate) {
|
||||
Rect rect = new Rect();
|
||||
j(cardViewDelegate).a(rect);
|
||||
cardViewDelegate.a((int) Math.ceil(g(cardViewDelegate)), (int) Math.ceil(f(cardViewDelegate)));
|
||||
cardViewDelegate.a(rect.left, rect.top, rect.right, rect.bottom);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void a(CardViewDelegate cardViewDelegate, Context context, ColorStateList colorStateList, float f, float f2, float f3) {
|
||||
RoundRectDrawableWithShadow a = a(context, colorStateList, f, f2, f3);
|
||||
a.a(cardViewDelegate.a());
|
||||
cardViewDelegate.a(a);
|
||||
i(cardViewDelegate);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void b(CardViewDelegate cardViewDelegate, float f) {
|
||||
j(cardViewDelegate).c(f);
|
||||
}
|
||||
|
||||
private RoundRectDrawableWithShadow a(Context context, ColorStateList colorStateList, float f, float f2, float f3) {
|
||||
return new RoundRectDrawableWithShadow(context.getResources(), colorStateList, f, f2, f3);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void a(CardViewDelegate cardViewDelegate, ColorStateList colorStateList) {
|
||||
j(cardViewDelegate).a(colorStateList);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public void a(CardViewDelegate cardViewDelegate, float f) {
|
||||
j(cardViewDelegate).a(f);
|
||||
i(cardViewDelegate);
|
||||
}
|
||||
|
||||
@Override // androidx.cardview.widget.CardViewImpl
|
||||
public float a(CardViewDelegate cardViewDelegate) {
|
||||
return j(cardViewDelegate).f();
|
||||
}
|
||||
}
|
21
sources/androidx/cardview/widget/CardViewDelegate.java
Normal file
21
sources/androidx/cardview/widget/CardViewDelegate.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package androidx.cardview.widget;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.View;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
interface CardViewDelegate {
|
||||
void a(int i, int i2);
|
||||
|
||||
void a(int i, int i2, int i3, int i4);
|
||||
|
||||
void a(Drawable drawable);
|
||||
|
||||
boolean a();
|
||||
|
||||
boolean b();
|
||||
|
||||
Drawable c();
|
||||
|
||||
View d();
|
||||
}
|
35
sources/androidx/cardview/widget/CardViewImpl.java
Normal file
35
sources/androidx/cardview/widget/CardViewImpl.java
Normal file
@@ -0,0 +1,35 @@
|
||||
package androidx.cardview.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
interface CardViewImpl {
|
||||
float a(CardViewDelegate cardViewDelegate);
|
||||
|
||||
void a();
|
||||
|
||||
void a(CardViewDelegate cardViewDelegate, float f);
|
||||
|
||||
void a(CardViewDelegate cardViewDelegate, Context context, ColorStateList colorStateList, float f, float f2, float f3);
|
||||
|
||||
void a(CardViewDelegate cardViewDelegate, ColorStateList colorStateList);
|
||||
|
||||
float b(CardViewDelegate cardViewDelegate);
|
||||
|
||||
void b(CardViewDelegate cardViewDelegate, float f);
|
||||
|
||||
void c(CardViewDelegate cardViewDelegate);
|
||||
|
||||
void c(CardViewDelegate cardViewDelegate, float f);
|
||||
|
||||
float d(CardViewDelegate cardViewDelegate);
|
||||
|
||||
ColorStateList e(CardViewDelegate cardViewDelegate);
|
||||
|
||||
float f(CardViewDelegate cardViewDelegate);
|
||||
|
||||
float g(CardViewDelegate cardViewDelegate);
|
||||
|
||||
void h(CardViewDelegate cardViewDelegate);
|
||||
}
|
180
sources/androidx/cardview/widget/RoundRectDrawable.java
Normal file
180
sources/androidx/cardview/widget/RoundRectDrawable.java
Normal file
@@ -0,0 +1,180 @@
|
||||
package androidx.cardview.widget;
|
||||
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.Outline;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
class RoundRectDrawable extends Drawable {
|
||||
private float a;
|
||||
private final RectF c;
|
||||
private final Rect d;
|
||||
private float e;
|
||||
private ColorStateList h;
|
||||
private PorterDuffColorFilter i;
|
||||
private ColorStateList j;
|
||||
private boolean f = false;
|
||||
private boolean g = true;
|
||||
private PorterDuff.Mode k = PorterDuff.Mode.SRC_IN;
|
||||
private final Paint b = new Paint(5);
|
||||
|
||||
RoundRectDrawable(ColorStateList colorStateList, float f) {
|
||||
this.a = f;
|
||||
b(colorStateList);
|
||||
this.c = new RectF();
|
||||
this.d = new Rect();
|
||||
}
|
||||
|
||||
private void b(ColorStateList colorStateList) {
|
||||
if (colorStateList == null) {
|
||||
colorStateList = ColorStateList.valueOf(0);
|
||||
}
|
||||
this.h = colorStateList;
|
||||
this.b.setColor(this.h.getColorForState(getState(), this.h.getDefaultColor()));
|
||||
}
|
||||
|
||||
void a(float f, boolean z, boolean z2) {
|
||||
if (f == this.e && this.f == z && this.g == z2) {
|
||||
return;
|
||||
}
|
||||
this.e = f;
|
||||
this.f = z;
|
||||
this.g = z2;
|
||||
a((Rect) null);
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
public float c() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void draw(Canvas canvas) {
|
||||
boolean z;
|
||||
Paint paint = this.b;
|
||||
if (this.i == null || paint.getColorFilter() != null) {
|
||||
z = false;
|
||||
} else {
|
||||
paint.setColorFilter(this.i);
|
||||
z = true;
|
||||
}
|
||||
RectF rectF = this.c;
|
||||
float f = this.a;
|
||||
canvas.drawRoundRect(rectF, f, f, paint);
|
||||
if (z) {
|
||||
paint.setColorFilter(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public int getOpacity() {
|
||||
return -3;
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void getOutline(Outline outline) {
|
||||
outline.setRoundRect(this.d, this.a);
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public boolean isStateful() {
|
||||
ColorStateList colorStateList;
|
||||
ColorStateList colorStateList2 = this.j;
|
||||
return (colorStateList2 != null && colorStateList2.isStateful()) || ((colorStateList = this.h) != null && colorStateList.isStateful()) || super.isStateful();
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
protected void onBoundsChange(Rect rect) {
|
||||
super.onBoundsChange(rect);
|
||||
a(rect);
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
protected boolean onStateChange(int[] iArr) {
|
||||
PorterDuff.Mode mode;
|
||||
ColorStateList colorStateList = this.h;
|
||||
int colorForState = colorStateList.getColorForState(iArr, colorStateList.getDefaultColor());
|
||||
boolean z = colorForState != this.b.getColor();
|
||||
if (z) {
|
||||
this.b.setColor(colorForState);
|
||||
}
|
||||
ColorStateList colorStateList2 = this.j;
|
||||
if (colorStateList2 == null || (mode = this.k) == null) {
|
||||
return z;
|
||||
}
|
||||
this.i = a(colorStateList2, mode);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setAlpha(int i) {
|
||||
this.b.setAlpha(i);
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setColorFilter(ColorFilter colorFilter) {
|
||||
this.b.setColorFilter(colorFilter);
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setTintList(ColorStateList colorStateList) {
|
||||
this.j = colorStateList;
|
||||
this.i = a(this.j, this.k);
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setTintMode(PorterDuff.Mode mode) {
|
||||
this.k = mode;
|
||||
this.i = a(this.j, this.k);
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
float b() {
|
||||
return this.e;
|
||||
}
|
||||
|
||||
private void a(Rect rect) {
|
||||
if (rect == null) {
|
||||
rect = getBounds();
|
||||
}
|
||||
this.c.set(rect.left, rect.top, rect.right, rect.bottom);
|
||||
this.d.set(rect);
|
||||
if (this.f) {
|
||||
this.d.inset((int) Math.ceil(RoundRectDrawableWithShadow.a(this.e, this.a, this.g)), (int) Math.ceil(RoundRectDrawableWithShadow.b(this.e, this.a, this.g)));
|
||||
this.c.set(this.d);
|
||||
}
|
||||
}
|
||||
|
||||
void a(float f) {
|
||||
if (f == this.a) {
|
||||
return;
|
||||
}
|
||||
this.a = f;
|
||||
a((Rect) null);
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
public void a(ColorStateList colorStateList) {
|
||||
b(colorStateList);
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
public ColorStateList a() {
|
||||
return this.h;
|
||||
}
|
||||
|
||||
private PorterDuffColorFilter a(ColorStateList colorStateList, PorterDuff.Mode mode) {
|
||||
if (colorStateList == null || mode == null) {
|
||||
return null;
|
||||
}
|
||||
return new PorterDuffColorFilter(colorStateList.getColorForState(getState(), 0), mode);
|
||||
}
|
||||
}
|
@@ -0,0 +1,310 @@
|
||||
package androidx.cardview.widget;
|
||||
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.RadialGradient;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.Shader;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import androidx.cardview.R$color;
|
||||
import androidx.cardview.R$dimen;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
class RoundRectDrawableWithShadow extends Drawable {
|
||||
private static final double q = Math.cos(Math.toRadians(45.0d));
|
||||
static RoundRectHelper r;
|
||||
private final int a;
|
||||
private Paint c;
|
||||
private Paint d;
|
||||
private final RectF e;
|
||||
private float f;
|
||||
private Path g;
|
||||
private float h;
|
||||
private float i;
|
||||
private float j;
|
||||
private ColorStateList k;
|
||||
private final int m;
|
||||
private final int n;
|
||||
private boolean l = true;
|
||||
private boolean o = true;
|
||||
private boolean p = false;
|
||||
private Paint b = new Paint(5);
|
||||
|
||||
interface RoundRectHelper {
|
||||
void a(Canvas canvas, RectF rectF, float f, Paint paint);
|
||||
}
|
||||
|
||||
RoundRectDrawableWithShadow(Resources resources, ColorStateList colorStateList, float f, float f2, float f3) {
|
||||
this.m = resources.getColor(R$color.cardview_shadow_start_color);
|
||||
this.n = resources.getColor(R$color.cardview_shadow_end_color);
|
||||
this.a = resources.getDimensionPixelSize(R$dimen.cardview_compat_inset_shadow);
|
||||
b(colorStateList);
|
||||
this.c = new Paint(5);
|
||||
this.c.setStyle(Paint.Style.FILL);
|
||||
this.f = (int) (f + 0.5f);
|
||||
this.e = new RectF();
|
||||
this.d = new Paint(this.c);
|
||||
this.d.setAntiAlias(false);
|
||||
a(f2, f3);
|
||||
}
|
||||
|
||||
private void b(ColorStateList colorStateList) {
|
||||
if (colorStateList == null) {
|
||||
colorStateList = ColorStateList.valueOf(0);
|
||||
}
|
||||
this.k = colorStateList;
|
||||
this.b.setColor(this.k.getColorForState(getState(), this.k.getDefaultColor()));
|
||||
}
|
||||
|
||||
private int d(float f) {
|
||||
int i = (int) (f + 0.5f);
|
||||
return i % 2 == 1 ? i - 1 : i;
|
||||
}
|
||||
|
||||
private void g() {
|
||||
float f = this.f;
|
||||
RectF rectF = new RectF(-f, -f, f, f);
|
||||
RectF rectF2 = new RectF(rectF);
|
||||
float f2 = this.i;
|
||||
rectF2.inset(-f2, -f2);
|
||||
Path path = this.g;
|
||||
if (path == null) {
|
||||
this.g = new Path();
|
||||
} else {
|
||||
path.reset();
|
||||
}
|
||||
this.g.setFillType(Path.FillType.EVEN_ODD);
|
||||
this.g.moveTo(-this.f, 0.0f);
|
||||
this.g.rLineTo(-this.i, 0.0f);
|
||||
this.g.arcTo(rectF2, 180.0f, 90.0f, false);
|
||||
this.g.arcTo(rectF, 270.0f, -90.0f, false);
|
||||
this.g.close();
|
||||
float f3 = this.f;
|
||||
float f4 = this.i;
|
||||
float f5 = f3 / (f3 + f4);
|
||||
Paint paint = this.c;
|
||||
float f6 = f3 + f4;
|
||||
int i = this.m;
|
||||
paint.setShader(new RadialGradient(0.0f, 0.0f, f6, new int[]{i, i, this.n}, new float[]{0.0f, f5, 1.0f}, Shader.TileMode.CLAMP));
|
||||
Paint paint2 = this.d;
|
||||
float f7 = this.f;
|
||||
float f8 = this.i;
|
||||
int i2 = this.m;
|
||||
paint2.setShader(new LinearGradient(0.0f, (-f7) + f8, 0.0f, (-f7) - f8, new int[]{i2, i2, this.n}, new float[]{0.0f, 0.5f, 1.0f}, Shader.TileMode.CLAMP));
|
||||
this.d.setAntiAlias(false);
|
||||
}
|
||||
|
||||
void a(boolean z) {
|
||||
this.o = z;
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
void c(float f) {
|
||||
a(f, this.h);
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void draw(Canvas canvas) {
|
||||
if (this.l) {
|
||||
b(getBounds());
|
||||
this.l = false;
|
||||
}
|
||||
canvas.translate(0.0f, this.j / 2.0f);
|
||||
a(canvas);
|
||||
canvas.translate(0.0f, (-this.j) / 2.0f);
|
||||
r.a(canvas, this.e, this.f, this.b);
|
||||
}
|
||||
|
||||
float e() {
|
||||
float f = this.h;
|
||||
return (Math.max(f, this.f + this.a + (f / 2.0f)) * 2.0f) + ((this.h + this.a) * 2.0f);
|
||||
}
|
||||
|
||||
float f() {
|
||||
return this.j;
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public int getOpacity() {
|
||||
return -3;
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public boolean getPadding(Rect rect) {
|
||||
int ceil = (int) Math.ceil(b(this.h, this.f, this.o));
|
||||
int ceil2 = (int) Math.ceil(a(this.h, this.f, this.o));
|
||||
rect.set(ceil2, ceil, ceil2, ceil);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public boolean isStateful() {
|
||||
ColorStateList colorStateList = this.k;
|
||||
return (colorStateList != null && colorStateList.isStateful()) || super.isStateful();
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
protected void onBoundsChange(Rect rect) {
|
||||
super.onBoundsChange(rect);
|
||||
this.l = true;
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
protected boolean onStateChange(int[] iArr) {
|
||||
ColorStateList colorStateList = this.k;
|
||||
int colorForState = colorStateList.getColorForState(iArr, colorStateList.getDefaultColor());
|
||||
if (this.b.getColor() == colorForState) {
|
||||
return false;
|
||||
}
|
||||
this.b.setColor(colorForState);
|
||||
this.l = true;
|
||||
invalidateSelf();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setAlpha(int i) {
|
||||
this.b.setAlpha(i);
|
||||
this.c.setAlpha(i);
|
||||
this.d.setAlpha(i);
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setColorFilter(ColorFilter colorFilter) {
|
||||
this.b.setColorFilter(colorFilter);
|
||||
}
|
||||
|
||||
float c() {
|
||||
return this.h;
|
||||
}
|
||||
|
||||
float d() {
|
||||
float f = this.h;
|
||||
return (Math.max(f, this.f + this.a + ((f * 1.5f) / 2.0f)) * 2.0f) + (((this.h * 1.5f) + this.a) * 2.0f);
|
||||
}
|
||||
|
||||
private void a(float f, float f2) {
|
||||
if (f < 0.0f) {
|
||||
throw new IllegalArgumentException("Invalid shadow size " + f + ". Must be >= 0");
|
||||
}
|
||||
if (f2 >= 0.0f) {
|
||||
float d = d(f);
|
||||
float d2 = d(f2);
|
||||
if (d > d2) {
|
||||
if (!this.p) {
|
||||
this.p = true;
|
||||
}
|
||||
d = d2;
|
||||
}
|
||||
if (this.j == d && this.h == d2) {
|
||||
return;
|
||||
}
|
||||
this.j = d;
|
||||
this.h = d2;
|
||||
this.i = (int) ((d * 1.5f) + this.a + 0.5f);
|
||||
this.l = true;
|
||||
invalidateSelf();
|
||||
return;
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid max shadow size " + f2 + ". Must be >= 0");
|
||||
}
|
||||
|
||||
static float b(float f, float f2, boolean z) {
|
||||
return z ? (float) ((f * 1.5f) + ((1.0d - q) * f2)) : f * 1.5f;
|
||||
}
|
||||
|
||||
private void b(Rect rect) {
|
||||
float f = this.h;
|
||||
float f2 = 1.5f * f;
|
||||
this.e.set(rect.left + f, rect.top + f2, rect.right - f, rect.bottom - f2);
|
||||
g();
|
||||
}
|
||||
|
||||
float b() {
|
||||
return this.f;
|
||||
}
|
||||
|
||||
void b(float f) {
|
||||
a(this.j, f);
|
||||
}
|
||||
|
||||
static float a(float f, float f2, boolean z) {
|
||||
return z ? (float) (f + ((1.0d - q) * f2)) : f;
|
||||
}
|
||||
|
||||
void a(float f) {
|
||||
if (f < 0.0f) {
|
||||
throw new IllegalArgumentException("Invalid radius " + f + ". Must be >= 0");
|
||||
}
|
||||
float f2 = (int) (f + 0.5f);
|
||||
if (this.f == f2) {
|
||||
return;
|
||||
}
|
||||
this.f = f2;
|
||||
this.l = true;
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
private void a(Canvas canvas) {
|
||||
float f = this.f;
|
||||
float f2 = (-f) - this.i;
|
||||
float f3 = f + this.a + (this.j / 2.0f);
|
||||
float f4 = f3 * 2.0f;
|
||||
boolean z = this.e.width() - f4 > 0.0f;
|
||||
boolean z2 = this.e.height() - f4 > 0.0f;
|
||||
int save = canvas.save();
|
||||
RectF rectF = this.e;
|
||||
canvas.translate(rectF.left + f3, rectF.top + f3);
|
||||
canvas.drawPath(this.g, this.c);
|
||||
if (z) {
|
||||
canvas.drawRect(0.0f, f2, this.e.width() - f4, -this.f, this.d);
|
||||
}
|
||||
canvas.restoreToCount(save);
|
||||
int save2 = canvas.save();
|
||||
RectF rectF2 = this.e;
|
||||
canvas.translate(rectF2.right - f3, rectF2.bottom - f3);
|
||||
canvas.rotate(180.0f);
|
||||
canvas.drawPath(this.g, this.c);
|
||||
if (z) {
|
||||
canvas.drawRect(0.0f, f2, this.e.width() - f4, (-this.f) + this.i, this.d);
|
||||
}
|
||||
canvas.restoreToCount(save2);
|
||||
int save3 = canvas.save();
|
||||
RectF rectF3 = this.e;
|
||||
canvas.translate(rectF3.left + f3, rectF3.bottom - f3);
|
||||
canvas.rotate(270.0f);
|
||||
canvas.drawPath(this.g, this.c);
|
||||
if (z2) {
|
||||
canvas.drawRect(0.0f, f2, this.e.height() - f4, -this.f, this.d);
|
||||
}
|
||||
canvas.restoreToCount(save3);
|
||||
int save4 = canvas.save();
|
||||
RectF rectF4 = this.e;
|
||||
canvas.translate(rectF4.right - f3, rectF4.top + f3);
|
||||
canvas.rotate(90.0f);
|
||||
canvas.drawPath(this.g, this.c);
|
||||
if (z2) {
|
||||
canvas.drawRect(0.0f, f2, this.e.height() - f4, -this.f, this.d);
|
||||
}
|
||||
canvas.restoreToCount(save4);
|
||||
}
|
||||
|
||||
void a(Rect rect) {
|
||||
getPadding(rect);
|
||||
}
|
||||
|
||||
void a(ColorStateList colorStateList) {
|
||||
b(colorStateList);
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
ColorStateList a() {
|
||||
return this.k;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user