what-the-bank/sources/o/C12329ewE.java

316 lines
12 KiB
Java

package o;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.scb.phone.view.custom.common.CustomDeltaInput;
import com.scb.phone.view.custom.common.CustomDeltaInputLongPressed;
import java.util.ArrayList;
import java.util.List;
import o.C12329ewE;
/* renamed from: o.ewE, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C12329ewE extends RecyclerView.Sts<RVV> {
public fIR a;
public List<? extends C0920Rp> d = new ArrayList(1);
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(RVV rvv, int i) {
final RVV rvv2 = rvv;
C14957gcv.e(rvv2, "");
final C0920Rp c0920Rp = this.d.get(i);
C14957gcv.e(c0920Rp, "");
String str = c0920Rp.e;
String str2 = c0920Rp.m;
TextView textView = rvv2.b.j;
textView.setVisibility(8);
C14957gcv.c((Object) str, "");
if (RVV.d(str)) {
String str3 = str2;
if (!(str3 == null || gdZ.d((CharSequence) str3))) {
textView.setVisibility(0);
textView.setText(str3);
}
}
final PrE prE = rvv2.b;
final C12329ewE c12329ewE = rvv2.c;
prE.c.setText(c0920Rp.c);
prE.b.setText(c0920Rp.j);
rvv2.itemView.setOnClickListener(new View.OnClickListener(rvv2) { // from class: o.ewI
private C12329ewE.RVV e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
C12329ewE.RVV.b(this.e);
}
{
this.e = rvv2;
}
});
final CustomDeltaInputLongPressed customDeltaInputLongPressed = prE.d;
customDeltaInputLongPressed.setMinValue(c0920Rp.g.doubleValue());
customDeltaInputLongPressed.setMaxValue(c0920Rp.f.doubleValue());
Context context = rvv2.itemView.getContext();
if (context != null) {
C14957gcv.c(context, "");
customDeltaInputLongPressed.setErrorMessage(context.getString(com.scb.phone.R.string.limit_setting_range_error_message));
}
customDeltaInputLongPressed.setDelta(c0920Rp.l.doubleValue());
customDeltaInputLongPressed.setActualValue(c0920Rp.h.doubleValue());
customDeltaInputLongPressed.setOnValueChangedListener(new CustomDeltaInput.HBt(c0920Rp, prE, rvv2) { // from class: o.ewJ
private C12329ewE.RVV b;
private PrE c;
private C0920Rp e;
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.HBt
public final void c(double d, boolean z) {
C12329ewE.RVV.a(this.e, this.c, this.b, d, z);
}
{
this.e = c0920Rp;
this.c = prE;
this.b = rvv2;
}
});
customDeltaInputLongPressed.setOnIncrementChangeListener(new RVV.LWm(rvv2));
customDeltaInputLongPressed.setOnFocusLostListener(new View.OnFocusChangeListener(customDeltaInputLongPressed, rvv2) { // from class: o.ewG
private CustomDeltaInputLongPressed b;
private C12329ewE.RVV d;
@Override // android.view.View.OnFocusChangeListener
public final void onFocusChange(View view, boolean z) {
C12329ewE.RVV.e(this.b, this.d, z);
}
{
this.b = customDeltaInputLongPressed;
this.d = rvv2;
}
});
customDeltaInputLongPressed.a();
customDeltaInputLongPressed.c();
prE.e.setOnClickListener(new View.OnClickListener(rvv2, c12329ewE, c0920Rp) { // from class: o.ewK
private C12329ewE a;
private C12329ewE.RVV b;
private C0920Rp d;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
C12329ewE.RVV.c(this.b, this.a, this.d);
}
{
this.b = rvv2;
this.a = c12329ewE;
this.d = c0920Rp;
}
});
if (!gdZ.a("PREPAID", c0920Rp.k, true) && !gdZ.a("TRANSFER", c0920Rp.e, true)) {
String str4 = c0920Rp.e;
C14957gcv.c((Object) str4, "");
rvv2.c(str4);
} else {
String str5 = c0920Rp.k;
C14957gcv.c((Object) str5, "");
rvv2.c(str5);
}
rvv2.c(false);
C14957gcv.e(c0920Rp, "");
if (RVV.b(c0920Rp)) {
rvv2.itemView.setClickable(false);
rvv2.b.a.setVisibility(8);
} else {
rvv2.itemView.setClickable(true);
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ RVV onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(com.scb.phone.R.layout.2131559169, viewGroup, false);
int i2 = com.scb.phone.R.id.account_set_limit;
CustomDeltaInputLongPressed customDeltaInputLongPressed = (CustomDeltaInputLongPressed) qeC.e(inflate, com.scb.phone.R.id.account_set_limit);
if (customDeltaInputLongPressed != null) {
i2 = com.scb.phone.R.id.account_title;
TextView textView = (TextView) qeC.e(inflate, com.scb.phone.R.id.account_title);
if (textView != null) {
i2 = com.scb.phone.R.id.limit_account_value;
TextView textView2 = (TextView) qeC.e(inflate, com.scb.phone.R.id.limit_account_value);
if (textView2 != null) {
i2 = com.scb.phone.R.id.limit_done;
TextView textView3 = (TextView) qeC.e(inflate, com.scb.phone.R.id.limit_done);
if (textView3 != null) {
i2 = com.scb.phone.R.id.limit_expand_arrow;
ImageView imageView = (ImageView) qeC.e(inflate, com.scb.phone.R.id.limit_expand_arrow);
if (imageView != null) {
i2 = com.scb.phone.R.id.ll_layout_remark;
LinearLayout linearLayout = (LinearLayout) qeC.e(inflate, com.scb.phone.R.id.ll_layout_remark);
if (linearLayout != null) {
i2 = com.scb.phone.R.id.own_scb_account_layout;
LinearLayout linearLayout2 = (LinearLayout) qeC.e(inflate, com.scb.phone.R.id.own_scb_account_layout);
if (linearLayout2 != null) {
i2 = com.scb.phone.R.id.tv_remark;
TextView textView4 = (TextView) qeC.e(inflate, com.scb.phone.R.id.tv_remark);
if (textView4 != null) {
i2 = com.scb.phone.R.id.view_close_line;
View e = qeC.e(inflate, com.scb.phone.R.id.view_close_line);
if (e != null) {
PrE prE = new PrE((LinearLayout) inflate, customDeltaInputLongPressed, textView, textView2, textView3, imageView, linearLayout, linearLayout2, textView4, e);
C14957gcv.c(prE, "");
return new RVV(this, prE);
}
}
}
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i2)));
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.d.size();
}
/* renamed from: o.ewE$RVV */
/* loaded from: classes5.dex */
public final class RVV extends RecyclerView.zJl {
final PrE b;
final C12329ewE c;
private boolean d;
public static final /* synthetic */ void a(RVV rvv) {
rvv.b.b.setText(C6583cXR.b(rvv.b.d.c));
}
public final void c(boolean z) {
this.d = z;
PrE prE = this.b;
if (z) {
prE.a.setVisibility(8);
prE.e.setVisibility(0);
fJM.e(prE.d);
TextView textView = this.b.c;
textView.setFocusable(true);
textView.setFocusableInTouchMode(true);
textView.requestFocus();
prE.g.setVisibility(8);
return;
}
prE.a.setVisibility(0);
prE.e.setVisibility(8);
fJM.d(prE.d);
prE.g.setVisibility(0);
}
static boolean d(String str) {
return C14957gcv.b((Object) "CARDLESS_ATM_CC", (Object) str) || C14957gcv.b((Object) "CARDLESS_ATM_SC", (Object) str) || C14957gcv.b((Object) "CARDLESS_ATM_CX", (Object) str) || C14957gcv.b((Object) "CARDLESS_ATM_SX", (Object) str);
}
/* renamed from: o.ewE$RVV$LWm */
/* loaded from: classes5.dex */
public static final class LWm implements CustomDeltaInput.Sts {
private RVV a;
LWm(RVV rvv) {
this.a = rvv;
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void j() {
RVV.a(this.a);
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void h() {
RVV.a(this.a);
}
}
final void c(String str) {
PrE prE = this.b;
prE.d.setContentDescriptionView(str);
String str2 = str;
prE.e.setContentDescription(str2);
prE.c.setContentDescription(str2);
prE.b.setContentDescription(str2);
}
public static /* synthetic */ void b(RVV rvv) {
C14957gcv.e(rvv, "");
rvv.c(!rvv.d);
}
public static /* synthetic */ void c(RVV rvv, C12329ewE c12329ewE, C0920Rp c0920Rp) {
C14957gcv.e(rvv, "");
C14957gcv.e(c12329ewE, "");
C14957gcv.e(c0920Rp, "");
rvv.b.b.setText(C6583cXR.b(rvv.b.d.c));
fIR fir = c12329ewE.a;
if (fir != null) {
fir.d(c0920Rp);
}
if (rvv.b.d.c == c0920Rp.h.doubleValue()) {
c0920Rp.b = false;
rvv.c(false);
fIR fir2 = c12329ewE.a;
if (fir2 != null) {
fir2.h();
return;
}
return;
}
c0920Rp.n = (int) rvv.b.d.c;
fIR fir3 = c12329ewE.a;
if (fir3 != null) {
fir3.e(c0920Rp);
}
}
public static /* synthetic */ void e(CustomDeltaInputLongPressed customDeltaInputLongPressed, RVV rvv, boolean z) {
C14957gcv.e(customDeltaInputLongPressed, "");
C14957gcv.e(rvv, "");
if (z || !customDeltaInputLongPressed.e()) {
return;
}
rvv.b.b.setText(C6583cXR.b(rvv.b.d.c));
}
public static /* synthetic */ void a(C0920Rp c0920Rp, PrE prE, RVV rvv, double d, boolean z) {
C14957gcv.e(c0920Rp, "");
C14957gcv.e(prE, "");
C14957gcv.e(rvv, "");
c0920Rp.b = !(c0920Rp.h.doubleValue() == d);
prE.e.setEnabled(z);
Context context = rvv.itemView.getContext();
if (context != null) {
prE.e.setTextColor(nMh.getColor(context, z ? com.scb.phone.R.color.f13682131100876 : com.scb.phone.R.color.f13692131100877));
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public RVV(C12329ewE c12329ewE, PrE prE) {
super(prE.f);
C14957gcv.e(prE, "");
this.c = c12329ewE;
this.b = prE;
}
static boolean b(C0920Rp c0920Rp) {
String str = c0920Rp.e;
return (C14957gcv.b((Object) "CARDLESS_ATM_CX", (Object) str) || C14957gcv.b((Object) "CARDLESS_ATM_SX", (Object) str)) && !c0920Rp.d;
}
}
}