69 lines
3.4 KiB
Java
69 lines
3.4 KiB
Java
package com.discord.widgets.channels.permissions;
|
|
|
|
import android.content.Context;
|
|
import android.content.res.TypedArray;
|
|
import android.util.AttributeSet;
|
|
import android.view.LayoutInflater;
|
|
import android.widget.TextView;
|
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
|
import com.discord.R;
|
|
import com.discord.databinding.ViewAddPermissionOwnerBinding;
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: AddPermissionOwnerView.kt */
|
|
public final class AddPermissionOwnerView extends ConstraintLayout {
|
|
private final ViewAddPermissionOwnerBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AddPermissionOwnerView(Context context) {
|
|
super(context);
|
|
m.checkNotNullParameter(context, "context");
|
|
ViewAddPermissionOwnerBinding a = ViewAddPermissionOwnerBinding.a(LayoutInflater.from(getContext()), this);
|
|
m.checkNotNullExpressionValue(a, "ViewAddPermissionOwnerBi…ater.from(context), this)");
|
|
this.binding = a;
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AddPermissionOwnerView(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
m.checkNotNullParameter(context, "context");
|
|
ViewAddPermissionOwnerBinding a = ViewAddPermissionOwnerBinding.a(LayoutInflater.from(getContext()), this);
|
|
m.checkNotNullExpressionValue(a, "ViewAddPermissionOwnerBi…ater.from(context), this)");
|
|
this.binding = a;
|
|
initialize(attributeSet);
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AddPermissionOwnerView(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
m.checkNotNullParameter(context, "context");
|
|
ViewAddPermissionOwnerBinding a = ViewAddPermissionOwnerBinding.a(LayoutInflater.from(getContext()), this);
|
|
m.checkNotNullExpressionValue(a, "ViewAddPermissionOwnerBi…ater.from(context), this)");
|
|
this.binding = a;
|
|
initialize(attributeSet);
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public /* synthetic */ AddPermissionOwnerView(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 */ AddPermissionOwnerView(Context context, AttributeSet attributeSet, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(context, (i & 2) != 0 ? null : attributeSet);
|
|
}
|
|
|
|
private final void initialize(AttributeSet attributeSet) {
|
|
TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, R.a.AddPermissionOwnerView, 0, 0);
|
|
m.checkNotNullExpressionValue(obtainStyledAttributes, "context.obtainStyledAttr…ermissionOwnerView, 0, 0)");
|
|
try {
|
|
String string = obtainStyledAttributes.getString(0);
|
|
TextView textView = this.binding.b;
|
|
m.checkNotNullExpressionValue(textView, "binding.label");
|
|
textView.setText(string);
|
|
} finally {
|
|
obtainStyledAttributes.recycle();
|
|
}
|
|
}
|
|
}
|