what-the-bank/sources/com/scb/phone/view/adapter/debitatm/PurchaseWithdrawalLimitAdap...

265 lines
11 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.debitatm;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import com.scb.phone.R;
import com.scb.phone.view.adapter.debitatm.PurchaseWithdrawalLimitAdapter;
import com.scb.phone.view.custom.common.CustomDeltaInput;
import java.util.ArrayList;
import java.util.List;
import o.C0917Rn;
import o.C6583cXR;
import o.InterfaceC12845fIt;
import o.YH;
import o.ZUN;
import o.fJM;
import o.nMh;
import o.pyT;
/* loaded from: classes5.dex */
public final class PurchaseWithdrawalLimitAdapter extends RecyclerView.Sts<LimitCustomViewHolder> {
public InterfaceC12845fIt a;
public LimitCustomViewHolder b;
public HBt d;
public List<C0917Rn> e = new ArrayList(1);
/* loaded from: classes5.dex */
public interface HBt {
void g();
}
/* loaded from: classes5.dex */
public class LimitCustomViewHolder_ViewBinding implements Unbinder {
private LimitCustomViewHolder c;
public LimitCustomViewHolder_ViewBinding(LimitCustomViewHolder limitCustomViewHolder, View view) {
this.c = limitCustomViewHolder;
limitCustomViewHolder.accountTitle = (TextView) pyT.e(view, R.id.account_title, "field 'accountTitle'", TextView.class);
limitCustomViewHolder.limitAccountValue = (TextView) pyT.e(view, R.id.limit_account_value, "field 'limitAccountValue'", TextView.class);
limitCustomViewHolder.expandArrow = (ImageView) pyT.e(view, R.id.limit_expand_arrow, "field 'expandArrow'", ImageView.class);
limitCustomViewHolder.limitDoneTextButton = (TextView) pyT.e(view, R.id.limit_done, "field 'limitDoneTextButton'", TextView.class);
limitCustomViewHolder.limitInput = (CustomDeltaInput) pyT.e(view, R.id.account_set_limit, "field 'limitInput'", CustomDeltaInput.class);
}
@Override // butterknife.Unbinder
public final void a() {
LimitCustomViewHolder limitCustomViewHolder = this.c;
if (limitCustomViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
limitCustomViewHolder.accountTitle = null;
limitCustomViewHolder.limitAccountValue = null;
limitCustomViewHolder.expandArrow = null;
limitCustomViewHolder.limitDoneTextButton = null;
limitCustomViewHolder.limitInput = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(LimitCustomViewHolder limitCustomViewHolder, int i) {
LimitCustomViewHolder limitCustomViewHolder2 = limitCustomViewHolder;
C0917Rn c0917Rn = this.e.get(i);
this.b = limitCustomViewHolder2;
limitCustomViewHolder2.accountTitle.setText(c0917Rn.b);
limitCustomViewHolder2.limitAccountValue.setText(C6583cXR.b(c0917Rn.k.intValue()));
limitCustomViewHolder2.itemView.setOnClickListener(new View.OnClickListener(limitCustomViewHolder2) { // from class: o.esF
private PurchaseWithdrawalLimitAdapter.LimitCustomViewHolder a;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
PurchaseWithdrawalLimitAdapter.LimitCustomViewHolder limitCustomViewHolder3 = this.a;
limitCustomViewHolder3.d(!limitCustomViewHolder3.c);
}
{
this.a = limitCustomViewHolder2;
}
});
limitCustomViewHolder2.limitInput.setMinValue(0.0d);
limitCustomViewHolder2.limitInput.setMaxValue(c0917Rn.i.intValue());
if (limitCustomViewHolder2.itemView.getContext() != null) {
limitCustomViewHolder2.limitInput.setErrorMessage(limitCustomViewHolder2.itemView.getContext().getString(R.string.fastpay_setting_range_limit_error_message));
}
limitCustomViewHolder2.limitInput.setDelta(1000.0d);
limitCustomViewHolder2.limitInput.setActualValue(c0917Rn.k.intValue());
limitCustomViewHolder2.limitInput.setOnValueChangedListener(new CustomDeltaInput.HBt(limitCustomViewHolder2) { // from class: o.esI
private PurchaseWithdrawalLimitAdapter.LimitCustomViewHolder a;
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.HBt
public final void c(double d, boolean z) {
PurchaseWithdrawalLimitAdapter.LimitCustomViewHolder.e(this.a, z);
}
{
this.a = limitCustomViewHolder2;
}
});
limitCustomViewHolder2.limitInput.setOnIncrementChangeListener(new CustomDeltaInput.Sts(limitCustomViewHolder2) { // from class: com.scb.phone.view.adapter.debitatm.PurchaseWithdrawalLimitAdapter.LimitCustomViewHolder.3
private LimitCustomViewHolder e;
AnonymousClass3(LimitCustomViewHolder limitCustomViewHolder22) {
this.e = limitCustomViewHolder22;
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void j() {
LimitCustomViewHolder.e(this.e);
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void h() {
LimitCustomViewHolder.e(this.e);
}
});
limitCustomViewHolder22.limitInput.setOnFocusLostListener(new View.OnFocusChangeListener(limitCustomViewHolder22) { // from class: o.esJ
private PurchaseWithdrawalLimitAdapter.LimitCustomViewHolder a;
@Override // android.view.View.OnFocusChangeListener
public final void onFocusChange(View view, boolean z) {
PurchaseWithdrawalLimitAdapter.LimitCustomViewHolder.b(this.a, z);
}
{
this.a = limitCustomViewHolder22;
}
});
limitCustomViewHolder22.limitInput.a();
limitCustomViewHolder22.limitDoneTextButton.setOnClickListener(new View.OnClickListener(limitCustomViewHolder22, c0917Rn) { // from class: o.esM
private PurchaseWithdrawalLimitAdapter.LimitCustomViewHolder a;
private C0917Rn e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
PurchaseWithdrawalLimitAdapter.LimitCustomViewHolder.e(this.a, this.e);
}
{
this.a = limitCustomViewHolder22;
this.e = c0917Rn;
}
});
limitCustomViewHolder22.limitInput.c();
limitCustomViewHolder22.limitInput.setContentDescriptionView(YH.PURCHASE.name());
limitCustomViewHolder22.limitDoneTextButton.setContentDescription(YH.PURCHASE.name());
limitCustomViewHolder22.accountTitle.setContentDescription(YH.PURCHASE.name());
limitCustomViewHolder22.limitAccountValue.setContentDescription(YH.PURCHASE.name());
limitCustomViewHolder22.d(false);
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.e.size();
}
/* loaded from: classes5.dex */
public class LimitCustomViewHolder extends RecyclerView.zJl {
@BindView
TextView accountTitle;
private PurchaseWithdrawalLimitAdapter b;
private boolean c;
@BindView
ImageView expandArrow;
@BindView
TextView limitAccountValue;
@BindView
TextView limitDoneTextButton;
@BindView
CustomDeltaInput limitInput;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
LimitCustomViewHolder(PurchaseWithdrawalLimitAdapter purchaseWithdrawalLimitAdapter, View view) {
super(view);
this.b = purchaseWithdrawalLimitAdapter;
this.c = false;
ButterKnife.c(this, view);
}
public void d(boolean z) {
this.c = z;
if (z) {
this.expandArrow.setVisibility(8);
this.limitDoneTextButton.setVisibility(0);
fJM.e(this.limitInput);
this.accountTitle.setFocusable(true);
this.accountTitle.setFocusableInTouchMode(true);
this.accountTitle.requestFocus();
if (this.b.d != null) {
this.b.d.g();
return;
}
return;
}
this.expandArrow.setVisibility(0);
this.limitDoneTextButton.setVisibility(8);
fJM.d(this.limitInput);
}
/* renamed from: com.scb.phone.view.adapter.debitatm.PurchaseWithdrawalLimitAdapter$LimitCustomViewHolder$3 */
/* loaded from: classes5.dex */
final class AnonymousClass3 implements CustomDeltaInput.Sts {
private LimitCustomViewHolder e;
AnonymousClass3(LimitCustomViewHolder limitCustomViewHolder22) {
this.e = limitCustomViewHolder22;
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void j() {
LimitCustomViewHolder.e(this.e);
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void h() {
LimitCustomViewHolder.e(this.e);
}
}
public static /* synthetic */ void b(LimitCustomViewHolder limitCustomViewHolder, boolean z) {
if (z) {
return;
}
limitCustomViewHolder.limitAccountValue.setText(C6583cXR.b(limitCustomViewHolder.limitInput.c));
}
public static /* synthetic */ void e(LimitCustomViewHolder limitCustomViewHolder, boolean z) {
limitCustomViewHolder.limitDoneTextButton.setEnabled(z);
if (limitCustomViewHolder.itemView.getContext() != null) {
limitCustomViewHolder.limitDoneTextButton.setTextColor(nMh.getColor(limitCustomViewHolder.itemView.getContext(), z ? R.color.f13682131100876 : R.color.f13692131100877));
}
}
public static /* synthetic */ void e(LimitCustomViewHolder limitCustomViewHolder, C0917Rn c0917Rn) {
limitCustomViewHolder.limitInput.inputValue.clearFocus();
limitCustomViewHolder.limitAccountValue.setText(C6583cXR.b(limitCustomViewHolder.limitInput.c));
if (limitCustomViewHolder.limitInput.c != c0917Rn.k.intValue()) {
limitCustomViewHolder.b.a.d(new ZUN(c0917Rn.a, c0917Rn.m, Integer.valueOf((int) limitCustomViewHolder.limitInput.c), c0917Rn.c, (byte) 0), YH.PURCHASE);
} else {
limitCustomViewHolder.d(false);
limitCustomViewHolder.b.a.k();
}
}
static /* synthetic */ void e(LimitCustomViewHolder limitCustomViewHolder) {
limitCustomViewHolder.limitAccountValue.setText(C6583cXR.b(limitCustomViewHolder.limitInput.c));
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ LimitCustomViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
return new LimitCustomViewHolder(this, LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559096, (ViewGroup) null));
}
}