discord-jadx/app/src/main/java/com/discord/utilities/view/rounded/RoundedRelativeLayout.java

87 lines
4.0 KiB
Java

package com.discord.utilities.view.rounded;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import com.discord.utilities.view.rounded.RoundedCornerViewCoordinator;
import com.discord.utils.R;
import d0.z.d.m;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: RoundedRelativeLayout.kt */
public final class RoundedRelativeLayout extends RelativeLayout {
private final RoundedCornerViewCoordinator roundedViewCoordinator;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public RoundedRelativeLayout(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 RoundedRelativeLayout(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 RoundedRelativeLayout(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 */ RoundedRelativeLayout(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 */ RoundedRelativeLayout(Context context, AttributeSet attributeSet, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(context, (i & 2) != 0 ? null : attributeSet);
}
public static final /* synthetic */ void access$draw$s1843631363(RoundedRelativeLayout roundedRelativeLayout, Canvas canvas) {
super.draw(canvas);
}
private final void initialize(AttributeSet attributeSet) {
RoundedCornerViewCoordinator roundedCornerViewCoordinator = this.roundedViewCoordinator;
int[] iArr = R.b.RoundedRelativeLayout;
m.checkNotNullExpressionValue(iArr, "R.styleable.RoundedRelativeLayout");
roundedCornerViewCoordinator.initialize(this, attributeSet, iArr, R.b.RoundedRelativeLayout_topLeftRadius, R.b.RoundedRelativeLayout_topRightRadius, R.b.RoundedRelativeLayout_bottomLeftRadius, R.b.RoundedRelativeLayout_bottomRightRadius);
}
@Override // android.view.View
public void draw(Canvas canvas) {
m.checkNotNullParameter(canvas, "canvas");
this.roundedViewCoordinator.draw(canvas, new RoundedRelativeLayout$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 updateBottomLeftRadius(float f) {
this.roundedViewCoordinator.updateRadius(this, f, RoundedCornerViewCoordinator.Corner.BOTTOM_LEFT);
}
public final void updateBottomRightRadius(float f) {
this.roundedViewCoordinator.updateRadius(this, f, RoundedCornerViewCoordinator.Corner.BOTTOM_RIGHT);
}
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);
}
}