79 lines
3.8 KiB
Java
79 lines
3.8 KiB
Java
package com.discord.utilities.view.rounded;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Canvas;
|
|
import android.util.AttributeSet;
|
|
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
|
import com.discord.utilities.view.rounded.RoundedCornerViewCoordinator;
|
|
import com.discord.utils.R;
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: RoundedCoordinatorLayout.kt */
|
|
public final class RoundedCoordinatorLayout extends CoordinatorLayout {
|
|
private final RoundedCornerViewCoordinator roundedViewCoordinator;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public RoundedCoordinatorLayout(Context context) {
|
|
super(context);
|
|
m.checkNotNullParameter(context, "context");
|
|
this.roundedViewCoordinator = new RoundedCornerViewCoordinator();
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public RoundedCoordinatorLayout(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
m.checkNotNullParameter(context, "context");
|
|
this.roundedViewCoordinator = new RoundedCornerViewCoordinator();
|
|
initialize(attributeSet);
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public RoundedCoordinatorLayout(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
m.checkNotNullParameter(context, "context");
|
|
this.roundedViewCoordinator = new RoundedCornerViewCoordinator();
|
|
initialize(attributeSet);
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public /* synthetic */ RoundedCoordinatorLayout(Context context, AttributeSet attributeSet, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(context, (i2 & 2) != 0 ? null : attributeSet, (i2 & 4) != 0 ? 0 : i);
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public /* synthetic */ RoundedCoordinatorLayout(Context context, AttributeSet attributeSet, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(context, (i & 2) != 0 ? null : attributeSet);
|
|
}
|
|
|
|
/* renamed from: access$draw$s-747643027 reason: not valid java name */
|
|
public static final /* synthetic */ void m16access$draw$s747643027(RoundedCoordinatorLayout roundedCoordinatorLayout, Canvas canvas) {
|
|
super.draw(canvas);
|
|
}
|
|
|
|
private final void initialize(AttributeSet attributeSet) {
|
|
RoundedCornerViewCoordinator roundedCornerViewCoordinator = this.roundedViewCoordinator;
|
|
int[] iArr = R.b.RoundedCoordinatorLayout;
|
|
m.checkNotNullExpressionValue(iArr, "R.styleable.RoundedCoordinatorLayout");
|
|
roundedCornerViewCoordinator.initialize(this, attributeSet, iArr, R.b.RoundedCoordinatorLayout_topLeftRadius, R.b.RoundedCoordinatorLayout_topRightRadius, R.b.RoundedCoordinatorLayout_bottomLeftRadius, R.b.RoundedCoordinatorLayout_bottomRightRadius);
|
|
}
|
|
|
|
@Override // android.view.View
|
|
public void draw(Canvas canvas) {
|
|
m.checkNotNullParameter(canvas, "canvas");
|
|
this.roundedViewCoordinator.draw(canvas, new RoundedCoordinatorLayout$draw$1(this));
|
|
}
|
|
|
|
@Override // android.view.View
|
|
public void onSizeChanged(int i, int i2, int i3, int i4) {
|
|
super.onSizeChanged(i, i2, i3, i4);
|
|
this.roundedViewCoordinator.onSizeChanged(i, i2);
|
|
}
|
|
|
|
public final void updateTopLeftRadius(float f) {
|
|
this.roundedViewCoordinator.updateRadius(this, f, RoundedCornerViewCoordinator.Corner.TOP_LEFT);
|
|
}
|
|
|
|
public final void updateTopRightRadius(float f) {
|
|
this.roundedViewCoordinator.updateRadius(this, f, RoundedCornerViewCoordinator.Corner.TOP_RIGHT);
|
|
}
|
|
}
|