102 lines
3.4 KiB
Java
102 lines
3.4 KiB
Java
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);
|
|
}
|
|
}
|