60 lines
2.9 KiB
Java
60 lines
2.9 KiB
Java
package com.discord.widgets.guildscheduledevent;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.view.LayoutInflater;
|
|
import android.widget.ImageView;
|
|
import androidx.annotation.ColorRes;
|
|
import androidx.annotation.DrawableRes;
|
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
|
import com.discord.databinding.GuildEventPromptViewBinding;
|
|
import com.discord.utilities.color.ColorCompatKt;
|
|
import com.google.android.material.textview.MaterialTextView;
|
|
import d0.z.d.m;
|
|
/* compiled from: GuildEventPromptView.kt */
|
|
public final class GuildEventPromptView extends ConstraintLayout {
|
|
private final GuildEventPromptViewBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public GuildEventPromptView(Context context) {
|
|
super(context);
|
|
m.checkNotNullParameter(context, "context");
|
|
GuildEventPromptViewBinding a = GuildEventPromptViewBinding.a(LayoutInflater.from(getContext()), this, true);
|
|
m.checkNotNullExpressionValue(a, "GuildEventPromptViewBind…rom(context), this, true)");
|
|
this.binding = a;
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public GuildEventPromptView(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
m.checkNotNullParameter(context, "context");
|
|
GuildEventPromptViewBinding a = GuildEventPromptViewBinding.a(LayoutInflater.from(getContext()), this, true);
|
|
m.checkNotNullExpressionValue(a, "GuildEventPromptViewBind…rom(context), this, true)");
|
|
this.binding = a;
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public GuildEventPromptView(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
m.checkNotNullParameter(context, "context");
|
|
GuildEventPromptViewBinding a = GuildEventPromptViewBinding.a(LayoutInflater.from(getContext()), this, true);
|
|
m.checkNotNullExpressionValue(a, "GuildEventPromptViewBind…rom(context), this, true)");
|
|
this.binding = a;
|
|
}
|
|
|
|
public final void configure(@DrawableRes int i, @ColorRes int i2, CharSequence charSequence, CharSequence charSequence2) {
|
|
m.checkNotNullParameter(charSequence, "title");
|
|
m.checkNotNullParameter(charSequence2, "subtitle");
|
|
this.binding.b.setImageResource(i);
|
|
ImageView imageView = this.binding.f1633c;
|
|
m.checkNotNullExpressionValue(imageView, "binding.iconBg");
|
|
ColorCompatKt.tintWithColorResource(imageView, i2);
|
|
MaterialTextView materialTextView = this.binding.e;
|
|
m.checkNotNullExpressionValue(materialTextView, "binding.title");
|
|
materialTextView.setText(charSequence);
|
|
MaterialTextView materialTextView2 = this.binding.d;
|
|
m.checkNotNullExpressionValue(materialTextView2, "binding.subtitle");
|
|
materialTextView2.setText(charSequence2);
|
|
}
|
|
}
|