409 lines
13 KiB
Java
409 lines
13 KiB
Java
package com.scb.phone.view.custom.mailingaddress;
|
|
|
|
import android.content.Context;
|
|
import android.text.TextUtils;
|
|
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 android.widget.ImageView;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.Space;
|
|
import android.widget.TextView;
|
|
import androidx.constraintlayout.widget.Group;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.custom.mailingaddress.MailingAddressAccountDetailsCustomItem;
|
|
import o.C0927Rs;
|
|
import o.C12344ewT;
|
|
import o.C14957gcv;
|
|
import o.UV;
|
|
import o.fJM;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class MailingAddressAccountDetailsCustomItem extends MailingAddressSelectAccountItem {
|
|
private C12344ewT.LWm a;
|
|
|
|
@BindView
|
|
public TextView accountText;
|
|
|
|
@BindView
|
|
public TextView accountType;
|
|
|
|
@BindView
|
|
public TextView addressText;
|
|
|
|
@BindView
|
|
public ImageView expandIcon;
|
|
|
|
@BindView
|
|
public Group groupAccountAddressError;
|
|
|
|
@BindView
|
|
public Group groupAddressDetails;
|
|
|
|
@BindView
|
|
public LinearLayout loading;
|
|
|
|
@BindView
|
|
public ImageView reloadAddress;
|
|
|
|
@BindView
|
|
public CheckBox selectorCheckBox;
|
|
|
|
@BindView
|
|
public View separator;
|
|
|
|
@BindView
|
|
public Space spaceSeparator;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public MailingAddressAccountDetailsCustomItem(Context context) {
|
|
super(context);
|
|
C14957gcv.e(context, "");
|
|
Object systemService = getContext().getSystemService("layout_inflater");
|
|
C14957gcv.d(systemService, "");
|
|
((LayoutInflater) systemService).inflate(R.layout.2131559265, (ViewGroup) this, true);
|
|
ButterKnife.c(this);
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public MailingAddressAccountDetailsCustomItem(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
C14957gcv.e(context, "");
|
|
Object systemService = getContext().getSystemService("layout_inflater");
|
|
C14957gcv.d(systemService, "");
|
|
((LayoutInflater) systemService).inflate(R.layout.2131559265, (ViewGroup) this, true);
|
|
ButterKnife.c(this);
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public MailingAddressAccountDetailsCustomItem(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
C14957gcv.e(context, "");
|
|
Object systemService = getContext().getSystemService("layout_inflater");
|
|
C14957gcv.d(systemService, "");
|
|
((LayoutInflater) systemService).inflate(R.layout.2131559265, (ViewGroup) this, true);
|
|
ButterKnife.c(this);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.mailingaddress.MailingAddressSelectAccountItem
|
|
public final void setDisplay(UV uv) {
|
|
C14957gcv.e(uv, "");
|
|
final C0927Rs c0927Rs = (C0927Rs) uv;
|
|
TextView textView = this.accountText;
|
|
Space space = null;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(c0927Rs.d);
|
|
TextView textView2 = this.accountType;
|
|
if (textView2 == null) {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
textView2.setText(c0927Rs.k);
|
|
final boolean z = !TextUtils.isEmpty(c0927Rs.j);
|
|
LinearLayout linearLayout = this.loading;
|
|
if (linearLayout == null) {
|
|
C14957gcv.a("");
|
|
linearLayout = null;
|
|
}
|
|
linearLayout.setVisibility(8);
|
|
if (c0927Rs.f) {
|
|
e(c0927Rs, z);
|
|
} else {
|
|
Group group = this.groupAddressDetails;
|
|
if (group == null) {
|
|
C14957gcv.a("");
|
|
group = null;
|
|
}
|
|
group.setVisibility(8);
|
|
Group group2 = this.groupAccountAddressError;
|
|
if (group2 == null) {
|
|
C14957gcv.a("");
|
|
group2 = null;
|
|
}
|
|
group2.setVisibility(8);
|
|
}
|
|
int i = c0927Rs.f ? R.drawable.ic_expand_less_black_24dp : R.drawable.ic_expand_more_black_24dp;
|
|
ImageView imageView = this.expandIcon;
|
|
if (imageView == null) {
|
|
C14957gcv.a("");
|
|
imageView = null;
|
|
}
|
|
imageView.setImageResource(i);
|
|
ImageView imageView2 = this.reloadAddress;
|
|
if (imageView2 == null) {
|
|
C14957gcv.a("");
|
|
imageView2 = null;
|
|
}
|
|
imageView2.setOnClickListener(null);
|
|
ImageView imageView3 = this.reloadAddress;
|
|
if (imageView3 == null) {
|
|
C14957gcv.a("");
|
|
imageView3 = null;
|
|
}
|
|
imageView3.setOnClickListener(new View.OnClickListener(this, c0927Rs) { // from class: o.eDA
|
|
private MailingAddressAccountDetailsCustomItem a;
|
|
private C0927Rs d;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
MailingAddressAccountDetailsCustomItem.c(this.a, this.d);
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
this.d = c0927Rs;
|
|
}
|
|
});
|
|
ImageView imageView4 = this.expandIcon;
|
|
if (imageView4 == null) {
|
|
C14957gcv.a("");
|
|
imageView4 = null;
|
|
}
|
|
imageView4.setOnClickListener(null);
|
|
ImageView imageView5 = this.expandIcon;
|
|
if (imageView5 == null) {
|
|
C14957gcv.a("");
|
|
imageView5 = null;
|
|
}
|
|
imageView5.setOnClickListener(new View.OnClickListener(c0927Rs, this, z) { // from class: o.eDC
|
|
private C0927Rs b;
|
|
private boolean c;
|
|
private MailingAddressAccountDetailsCustomItem e;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
MailingAddressAccountDetailsCustomItem.a(this.b, this.e, this.c);
|
|
}
|
|
|
|
{
|
|
this.b = c0927Rs;
|
|
this.e = this;
|
|
this.c = z;
|
|
}
|
|
});
|
|
CheckBox checkBox = this.selectorCheckBox;
|
|
if (checkBox == null) {
|
|
C14957gcv.a("");
|
|
checkBox = null;
|
|
}
|
|
checkBox.setOnCheckedChangeListener(null);
|
|
CheckBox checkBox2 = this.selectorCheckBox;
|
|
if (checkBox2 == null) {
|
|
C14957gcv.a("");
|
|
checkBox2 = null;
|
|
}
|
|
checkBox2.setChecked(c0927Rs.m);
|
|
CheckBox checkBox3 = this.selectorCheckBox;
|
|
if (checkBox3 == null) {
|
|
C14957gcv.a("");
|
|
checkBox3 = null;
|
|
}
|
|
checkBox3.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(this, c0927Rs) { // from class: o.eDy
|
|
private MailingAddressAccountDetailsCustomItem a;
|
|
private C0927Rs c;
|
|
|
|
@Override // android.widget.CompoundButton.OnCheckedChangeListener
|
|
public final void onCheckedChanged(CompoundButton compoundButton, boolean z2) {
|
|
MailingAddressAccountDetailsCustomItem.d(this.a, this.c, z2);
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
this.c = c0927Rs;
|
|
}
|
|
});
|
|
Space space2 = this.spaceSeparator;
|
|
if (space2 != null) {
|
|
space = space2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
space.setVisibility(c0927Rs.r ? 8 : 0);
|
|
}
|
|
|
|
private final void e(C0927Rs c0927Rs, boolean z) {
|
|
Group group = this.groupAddressDetails;
|
|
TextView textView = null;
|
|
if (group == null) {
|
|
C14957gcv.a("");
|
|
group = null;
|
|
}
|
|
group.setVisibility(z ? 0 : 8);
|
|
TextView textView2 = this.addressText;
|
|
if (textView2 == null) {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
textView2.setVisibility(z ? 0 : 8);
|
|
Group group2 = this.groupAccountAddressError;
|
|
if (group2 == null) {
|
|
C14957gcv.a("");
|
|
group2 = null;
|
|
}
|
|
group2.setVisibility(c0927Rs.i ? 0 : 8);
|
|
if (z) {
|
|
String str = c0927Rs.j;
|
|
TextView textView3 = this.addressText;
|
|
if (textView3 != null) {
|
|
textView = textView3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
textView.setText(str != null ? str : "");
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void d(MailingAddressAccountDetailsCustomItem mailingAddressAccountDetailsCustomItem, C0927Rs c0927Rs, boolean z) {
|
|
C14957gcv.e(mailingAddressAccountDetailsCustomItem, "");
|
|
C14957gcv.e(c0927Rs, "");
|
|
C12344ewT.LWm lWm = mailingAddressAccountDetailsCustomItem.a;
|
|
if (lWm != null) {
|
|
lWm.b(c0927Rs, z);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void c(MailingAddressAccountDetailsCustomItem mailingAddressAccountDetailsCustomItem, C0927Rs c0927Rs) {
|
|
C14957gcv.e(mailingAddressAccountDetailsCustomItem, "");
|
|
C14957gcv.e(c0927Rs, "");
|
|
Group group = mailingAddressAccountDetailsCustomItem.groupAccountAddressError;
|
|
LinearLayout linearLayout = null;
|
|
if (group == null) {
|
|
C14957gcv.a("");
|
|
group = null;
|
|
}
|
|
group.setVisibility(8);
|
|
LinearLayout linearLayout2 = mailingAddressAccountDetailsCustomItem.loading;
|
|
if (linearLayout2 != null) {
|
|
linearLayout = linearLayout2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
linearLayout.setVisibility(0);
|
|
C12344ewT.LWm lWm = mailingAddressAccountDetailsCustomItem.a;
|
|
if (lWm != null) {
|
|
lWm.e(c0927Rs);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(C0927Rs c0927Rs, MailingAddressAccountDetailsCustomItem mailingAddressAccountDetailsCustomItem, boolean z) {
|
|
Group group;
|
|
C14957gcv.e(c0927Rs, "");
|
|
C14957gcv.e(mailingAddressAccountDetailsCustomItem, "");
|
|
ImageView imageView = null;
|
|
if (c0927Rs.i) {
|
|
group = mailingAddressAccountDetailsCustomItem.groupAccountAddressError;
|
|
if (group == null) {
|
|
C14957gcv.a("");
|
|
group = null;
|
|
}
|
|
} else {
|
|
group = mailingAddressAccountDetailsCustomItem.groupAddressDetails;
|
|
if (group == null) {
|
|
C14957gcv.a("");
|
|
group = null;
|
|
}
|
|
}
|
|
if (c0927Rs.f) {
|
|
fJM.d(group);
|
|
} else {
|
|
fJM.e(group);
|
|
TextView textView = mailingAddressAccountDetailsCustomItem.addressText;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText("");
|
|
if (z || c0927Rs.i) {
|
|
mailingAddressAccountDetailsCustomItem.e(c0927Rs, z);
|
|
} else {
|
|
LinearLayout linearLayout = mailingAddressAccountDetailsCustomItem.loading;
|
|
if (linearLayout == null) {
|
|
C14957gcv.a("");
|
|
linearLayout = null;
|
|
}
|
|
linearLayout.setVisibility(0);
|
|
C12344ewT.LWm lWm = mailingAddressAccountDetailsCustomItem.a;
|
|
if (lWm != null) {
|
|
lWm.e(c0927Rs);
|
|
}
|
|
}
|
|
}
|
|
c0927Rs.f = !c0927Rs.f;
|
|
int i = c0927Rs.f ? R.drawable.ic_expand_less_black_24dp : R.drawable.ic_expand_more_black_24dp;
|
|
ImageView imageView2 = mailingAddressAccountDetailsCustomItem.expandIcon;
|
|
if (imageView2 != null) {
|
|
imageView = imageView2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
imageView.setImageResource(i);
|
|
}
|
|
|
|
public final void setSpaceSeparator(Space space) {
|
|
C14957gcv.e(space, "");
|
|
this.spaceSeparator = space;
|
|
}
|
|
|
|
public final void setSeparator(View view) {
|
|
C14957gcv.e(view, "");
|
|
this.separator = view;
|
|
}
|
|
|
|
public final void setSelectorCheckBox(CheckBox checkBox) {
|
|
C14957gcv.e(checkBox, "");
|
|
this.selectorCheckBox = checkBox;
|
|
}
|
|
|
|
public final void setReloadAddress(ImageView imageView) {
|
|
C14957gcv.e(imageView, "");
|
|
this.reloadAddress = imageView;
|
|
}
|
|
|
|
public final void setLoading(LinearLayout linearLayout) {
|
|
C14957gcv.e(linearLayout, "");
|
|
this.loading = linearLayout;
|
|
}
|
|
|
|
public final void setListener(C12344ewT.LWm lWm) {
|
|
this.a = lWm;
|
|
}
|
|
|
|
public final void setGroupAddressDetails(Group group) {
|
|
C14957gcv.e(group, "");
|
|
this.groupAddressDetails = group;
|
|
}
|
|
|
|
public final void setGroupAccountAddressError(Group group) {
|
|
C14957gcv.e(group, "");
|
|
this.groupAccountAddressError = group;
|
|
}
|
|
|
|
public final void setExpandIcon(ImageView imageView) {
|
|
C14957gcv.e(imageView, "");
|
|
this.expandIcon = imageView;
|
|
}
|
|
|
|
public final void setAddressText(TextView textView) {
|
|
C14957gcv.e(textView, "");
|
|
this.addressText = textView;
|
|
}
|
|
|
|
public final void setAccountType(TextView textView) {
|
|
C14957gcv.e(textView, "");
|
|
this.accountType = textView;
|
|
}
|
|
|
|
public final void setAccountText(TextView textView) {
|
|
C14957gcv.e(textView, "");
|
|
this.accountText = textView;
|
|
}
|
|
}
|