what-the-bank/sources/com/scb/phone/view/custom/cardmanagement/CustomCardApplyViewComponen...

152 lines
4.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.cardmanagement;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import androidx.constraintlayout.widget.ConstraintLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.custom.cardmanagement.CustomCardApplyViewComponent;
import o.C14957gcv;
/* loaded from: classes5.dex */
public final class CustomCardApplyViewComponent extends ConstraintLayout {
private Sts a;
private String b;
@BindView
public CheckBox ckbCardName;
@BindView
public View divider;
private int e;
@BindView
public View fullDivider;
/* loaded from: classes5.dex */
public interface Sts {
void a(int i, String str, boolean z);
}
private /* synthetic */ CustomCardApplyViewComponent(Context context, AttributeSet attributeSet, int i, byte b) {
this(context, (i & 2) != 0 ? null : attributeSet, 0);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public CustomCardApplyViewComponent(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
C14957gcv.e(context, "");
this.b = "";
this.e = -1;
LayoutInflater.from(context).inflate(R.layout.2131560052, (ViewGroup) this, true);
ButterKnife.c(this);
}
public final void setTitle(String str) {
C14957gcv.e(str, "");
CheckBox checkBox = this.ckbCardName;
if (checkBox == null) {
C14957gcv.a("");
checkBox = null;
}
checkBox.setText(str);
}
public final void setSelect(boolean z) {
CheckBox checkBox = this.ckbCardName;
if (checkBox == null) {
C14957gcv.a("");
checkBox = null;
}
checkBox.setChecked(z);
}
public final void b(boolean z) {
View view = this.fullDivider;
if (view == null) {
C14957gcv.a("");
view = null;
}
view.setVisibility(z ? 8 : 0);
}
public static /* synthetic */ void b(CustomCardApplyViewComponent customCardApplyViewComponent) {
C14957gcv.e(customCardApplyViewComponent, "");
Sts sts = customCardApplyViewComponent.a;
if (sts != null) {
int i = customCardApplyViewComponent.e;
String str = customCardApplyViewComponent.b;
CheckBox checkBox = customCardApplyViewComponent.ckbCardName;
if (checkBox == null) {
C14957gcv.a("");
checkBox = null;
}
sts.a(i, str, checkBox.isChecked());
}
}
public final void setListener(Sts sts) {
C14957gcv.e(sts, "");
this.a = sts;
CheckBox checkBox = this.ckbCardName;
if (checkBox == null) {
C14957gcv.a("");
checkBox = null;
}
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(this) { // from class: o.eAN
private CustomCardApplyViewComponent e;
@Override // android.widget.CompoundButton.OnCheckedChangeListener
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
CustomCardApplyViewComponent.b(this.e);
}
{
this.e = this;
}
});
}
public final void setKey(String str) {
C14957gcv.e(str, "");
this.b = str;
}
public final void setIndex(int i) {
this.e = i;
}
public final void setFullDivider(View view) {
C14957gcv.e(view, "");
this.fullDivider = view;
}
public final void setDivider(View view) {
C14957gcv.e(view, "");
this.divider = view;
}
public final void setCkbCardName(CheckBox checkBox) {
C14957gcv.e(checkBox, "");
this.ckbCardName = checkBox;
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public CustomCardApplyViewComponent(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 4, (byte) 0);
C14957gcv.e(context, "");
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public CustomCardApplyViewComponent(Context context) {
this(context, null, 6, (byte) 0);
C14957gcv.e(context, "");
}
}