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

266 lines
11 KiB
Java

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.DebitWithdrawalLimitAdapter;
import com.scb.phone.view.custom.ScbEllipsizeTextView;
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 DebitWithdrawalLimitAdapter extends RecyclerView.Sts<LimitCustomViewHolder> {
public List<C0917Rn> a = new ArrayList(1);
public LimitCustomViewHolder c;
public InterfaceC12845fIt d;
public RVV e;
/* loaded from: classes5.dex */
public interface RVV {
void f();
}
/* loaded from: classes5.dex */
public class LimitCustomViewHolder_ViewBinding implements Unbinder {
private LimitCustomViewHolder b;
public LimitCustomViewHolder_ViewBinding(LimitCustomViewHolder limitCustomViewHolder, View view) {
this.b = limitCustomViewHolder;
limitCustomViewHolder.accountTitle = (ScbEllipsizeTextView) pyT.e(view, R.id.account_title, "field 'accountTitle'", ScbEllipsizeTextView.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.b;
if (limitCustomViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.b = 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.a.get(i);
this.c = limitCustomViewHolder2;
limitCustomViewHolder2.accountTitle.setText(c0917Rn.b);
limitCustomViewHolder2.limitAccountValue.setText(C6583cXR.b(c0917Rn.m.intValue()));
limitCustomViewHolder2.itemView.setOnClickListener(new View.OnClickListener(limitCustomViewHolder2) { // from class: o.esC
private DebitWithdrawalLimitAdapter.LimitCustomViewHolder d;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
DebitWithdrawalLimitAdapter.LimitCustomViewHolder limitCustomViewHolder3 = this.d;
limitCustomViewHolder3.a(!limitCustomViewHolder3.b);
}
{
this.d = limitCustomViewHolder2;
}
});
limitCustomViewHolder2.limitInput.setMinValue(0.0d);
limitCustomViewHolder2.limitInput.setMaxValue(c0917Rn.j.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.m.intValue());
limitCustomViewHolder2.limitInput.setOnValueChangedListener(new CustomDeltaInput.HBt(limitCustomViewHolder2) { // from class: o.esB
private DebitWithdrawalLimitAdapter.LimitCustomViewHolder e;
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.HBt
public final void c(double d, boolean z) {
DebitWithdrawalLimitAdapter.LimitCustomViewHolder.b(this.e, z);
}
{
this.e = limitCustomViewHolder2;
}
});
limitCustomViewHolder2.limitInput.setOnIncrementChangeListener(new CustomDeltaInput.Sts(limitCustomViewHolder2) { // from class: com.scb.phone.view.adapter.debitatm.DebitWithdrawalLimitAdapter.LimitCustomViewHolder.1
private LimitCustomViewHolder b;
AnonymousClass1(LimitCustomViewHolder limitCustomViewHolder22) {
this.b = limitCustomViewHolder22;
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void j() {
LimitCustomViewHolder.b(this.b);
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void h() {
LimitCustomViewHolder.b(this.b);
}
});
limitCustomViewHolder22.limitInput.setOnFocusLostListener(new View.OnFocusChangeListener(limitCustomViewHolder22) { // from class: o.esH
private DebitWithdrawalLimitAdapter.LimitCustomViewHolder b;
@Override // android.view.View.OnFocusChangeListener
public final void onFocusChange(View view, boolean z) {
DebitWithdrawalLimitAdapter.LimitCustomViewHolder.e(this.b, z);
}
{
this.b = limitCustomViewHolder22;
}
});
limitCustomViewHolder22.limitInput.a();
limitCustomViewHolder22.limitDoneTextButton.setOnClickListener(new View.OnClickListener(limitCustomViewHolder22, c0917Rn) { // from class: o.esG
private C0917Rn a;
private DebitWithdrawalLimitAdapter.LimitCustomViewHolder b;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
DebitWithdrawalLimitAdapter.LimitCustomViewHolder.a(this.b, this.a);
}
{
this.b = limitCustomViewHolder22;
this.a = c0917Rn;
}
});
limitCustomViewHolder22.limitInput.c();
limitCustomViewHolder22.limitInput.setContentDescriptionView(YH.WITHDRAW.name());
limitCustomViewHolder22.limitDoneTextButton.setContentDescription(YH.WITHDRAW.name());
limitCustomViewHolder22.accountTitle.setContentDescription(YH.WITHDRAW.name());
limitCustomViewHolder22.limitAccountValue.setContentDescription(YH.WITHDRAW.name());
limitCustomViewHolder22.a(false);
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.a.size();
}
/* loaded from: classes5.dex */
public class LimitCustomViewHolder extends RecyclerView.zJl {
@BindView
ScbEllipsizeTextView accountTitle;
private boolean b;
private DebitWithdrawalLimitAdapter d;
@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(DebitWithdrawalLimitAdapter debitWithdrawalLimitAdapter, View view) {
super(view);
this.d = debitWithdrawalLimitAdapter;
this.b = false;
ButterKnife.c(this, view);
}
public void a(boolean z) {
this.b = 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.d.e != null) {
this.d.e.f();
return;
}
return;
}
this.expandArrow.setVisibility(0);
this.limitDoneTextButton.setVisibility(8);
fJM.d(this.limitInput);
}
/* renamed from: com.scb.phone.view.adapter.debitatm.DebitWithdrawalLimitAdapter$LimitCustomViewHolder$1 */
/* loaded from: classes5.dex */
final class AnonymousClass1 implements CustomDeltaInput.Sts {
private LimitCustomViewHolder b;
AnonymousClass1(LimitCustomViewHolder limitCustomViewHolder22) {
this.b = limitCustomViewHolder22;
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void j() {
LimitCustomViewHolder.b(this.b);
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void h() {
LimitCustomViewHolder.b(this.b);
}
}
public static /* synthetic */ void e(LimitCustomViewHolder limitCustomViewHolder, boolean z) {
if (z) {
return;
}
limitCustomViewHolder.limitAccountValue.setText(C6583cXR.b(limitCustomViewHolder.limitInput.c));
}
public static /* synthetic */ void b(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 a(LimitCustomViewHolder limitCustomViewHolder, C0917Rn c0917Rn) {
limitCustomViewHolder.limitInput.inputValue.clearFocus();
limitCustomViewHolder.limitAccountValue.setText(C6583cXR.b(limitCustomViewHolder.limitInput.c));
if (limitCustomViewHolder.limitInput.c == c0917Rn.m.intValue()) {
limitCustomViewHolder.a(false);
limitCustomViewHolder.d.d.k();
return;
}
limitCustomViewHolder.d.d.d(new ZUN(c0917Rn.a, Integer.valueOf((int) limitCustomViewHolder.limitInput.c), c0917Rn.k, c0917Rn.c, (byte) 0), YH.WITHDRAW);
}
static /* synthetic */ void b(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));
}
}