112 lines
4.3 KiB
Java
112 lines
4.3 KiB
Java
package com.scb.phone.view.custom.easycash;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.widget.LinearLayout;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPaySource;
|
|
import java.util.List;
|
|
import o.C0613Kq;
|
|
import o.C6583cXR;
|
|
import o.IV;
|
|
import o.gjJ;
|
|
import o.nMh;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class CustomEasycashCommonSuccessView extends LinearLayout {
|
|
|
|
@BindView
|
|
CustomSeparatedViews contentOne;
|
|
|
|
@BindView
|
|
CustomSeparatedViews contentThree;
|
|
|
|
@BindView
|
|
CustomSeparatedViews contentTwo;
|
|
|
|
@BindView
|
|
CustomEasyCashSectionLabel labelOne;
|
|
|
|
@BindView
|
|
CustomEasyCashSectionLabel labelThree;
|
|
|
|
@BindView
|
|
CustomEasyCashSectionLabel labelTwo;
|
|
|
|
public CustomEasycashCommonSuccessView(Context context) {
|
|
super(context);
|
|
inflate(getContext(), R.layout.2131558863, this);
|
|
ButterKnife.c(this);
|
|
}
|
|
|
|
public CustomEasycashCommonSuccessView(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
inflate(getContext(), R.layout.2131558863, this);
|
|
ButterKnife.c(this);
|
|
}
|
|
|
|
public CustomEasycashCommonSuccessView(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
inflate(getContext(), R.layout.2131558863, this);
|
|
ButterKnife.c(this);
|
|
}
|
|
|
|
public final void a(C0613Kq c0613Kq, int i, boolean z, int i2) {
|
|
if (i != 1) {
|
|
if (i == 2) {
|
|
c(this.labelTwo, this.contentTwo, c0613Kq, z);
|
|
return;
|
|
} else {
|
|
if (i == 3) {
|
|
c(this.labelThree, this.contentThree, c0613Kq, z);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
if (z) {
|
|
CustomSeparatedViews customSeparatedViews = this.contentOne;
|
|
Context context = getContext();
|
|
List<IV> list = c0613Kq.d;
|
|
customSeparatedViews.items.removeAllViews();
|
|
for (int i3 = 0; i3 < list.size(); i3++) {
|
|
if (i3 == i2) {
|
|
CustomTransferAndPaySource customTransferAndPaySource = new CustomTransferAndPaySource(context);
|
|
customTransferAndPaySource.setText(context.getString(R.string.success_transfer_to));
|
|
customTransferAndPaySource.setSourceName(list.get(i3).h);
|
|
customTransferAndPaySource.setAccountNumber(list.get(i3).i);
|
|
customTransferAndPaySource.setAvatar(C6583cXR.VS_(customSeparatedViews.getContext(), R.drawable.bankicon_scb).toString());
|
|
customTransferAndPaySource.setDivider(false);
|
|
customSeparatedViews.items.addView(customTransferAndPaySource);
|
|
if (i3 < list.size() - 1) {
|
|
CustomSeparatedViews.inflate(customSeparatedViews.getContext(), R.layout.2131559336, customSeparatedViews.items);
|
|
}
|
|
} else if (!gjJ.b((CharSequence) list.get(i3).i) || (list.get(i3).b != null && !list.get(i3).b.isEmpty())) {
|
|
customSeparatedViews.items.addView(new CustomInfoItem(customSeparatedViews.getContext(), list.get(i3)));
|
|
if (i3 < list.size() - 1) {
|
|
CustomSeparatedViews.inflate(customSeparatedViews.getContext(), R.layout.2131559336, customSeparatedViews.items);
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
c(null, this.contentOne, c0613Kq, false);
|
|
}
|
|
|
|
private void c(CustomEasyCashSectionLabel customEasyCashSectionLabel, CustomSeparatedViews customSeparatedViews, C0613Kq c0613Kq, boolean z) {
|
|
if (customEasyCashSectionLabel != null) {
|
|
customEasyCashSectionLabel.setVisibility(0);
|
|
customEasyCashSectionLabel.setText(c0613Kq.a);
|
|
if (!z) {
|
|
customEasyCashSectionLabel.setBackgroundColor(nMh.getColor(getContext(), R.color.f3032131099810));
|
|
} else {
|
|
customEasyCashSectionLabel.topDivider.setVisibility(0);
|
|
customEasyCashSectionLabel.bottomDivider.setVisibility(0);
|
|
}
|
|
}
|
|
customSeparatedViews.e(c0613Kq.d, R.layout.2131559336);
|
|
}
|
|
}
|