205 lines
6.7 KiB
Java
205 lines
6.7 KiB
Java
package com.scb.phone.view.fragment.profilemanagement.promptpay;
|
|
|
|
import android.content.Context;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.Button;
|
|
import android.widget.CheckBox;
|
|
import android.widget.CompoundButton;
|
|
import android.widget.ImageView;
|
|
import android.widget.TextView;
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.adapter.profilemanagement.promptpay.DepositAccountsAdapter;
|
|
import com.scb.phone.view.fragment.BaseFragment;
|
|
import com.scb.phone.view.fragment.profilemanagement.promptpay.LinkAccountFragment;
|
|
import o.C1081Vd;
|
|
import o.C1088Vi;
|
|
import o.C14957gcv;
|
|
import o.eCG;
|
|
import o.fIS;
|
|
import o.fIW;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class LinkAccountFragment extends Hilt_LinkAccountFragment {
|
|
public static final RVV d = new RVV(0);
|
|
|
|
@BindView
|
|
public Button btLink;
|
|
private fIS.RVV c;
|
|
|
|
@BindView
|
|
public CheckBox cbRequestBillToggle;
|
|
|
|
@BindView
|
|
public CheckBox cbRequestMoneyToggle;
|
|
|
|
@BindView
|
|
public ImageView ivAccountIcon;
|
|
|
|
@BindView
|
|
public RecyclerView rvAccounts;
|
|
|
|
@BindView
|
|
public TextView tvAccountNumber;
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // com.scb.phone.view.fragment.profilemanagement.promptpay.Hilt_LinkAccountFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
|
|
public final void onAttach(Context context) {
|
|
C14957gcv.e(context, "");
|
|
super.onAttach(context);
|
|
if (context instanceof fIS.RVV) {
|
|
this.c = (fIS.RVV) context;
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
View inflate = layoutInflater.inflate(R.layout.2131559745, viewGroup, false);
|
|
((BaseFragment) this).a = ButterKnife.c(this, inflate);
|
|
Bundle arguments = getArguments();
|
|
CheckBox checkBox = null;
|
|
C1088Vi c1088Vi = arguments != null ? (C1088Vi) arguments.getParcelable("deposits") : null;
|
|
RecyclerView recyclerView = this.rvAccounts;
|
|
if (recyclerView == null) {
|
|
C14957gcv.a("");
|
|
recyclerView = null;
|
|
}
|
|
recyclerView.getContext();
|
|
recyclerView.setLayoutManager(new LinearLayoutManager(1, false));
|
|
recyclerView.d(new eCG(recyclerView.getContext(), 16), -1);
|
|
recyclerView.setNestedScrollingEnabled(false);
|
|
recyclerView.setAdapter(new DepositAccountsAdapter(recyclerView.getContext(), c1088Vi != null ? c1088Vi.d : null, new fIW(this) { // from class: o.fvj
|
|
private LinkAccountFragment c;
|
|
|
|
@Override // o.fIW
|
|
public final void a(Object obj) {
|
|
LinkAccountFragment.d(this.c, (C1081Vd) obj);
|
|
}
|
|
|
|
{
|
|
this.c = this;
|
|
}
|
|
}));
|
|
TextView textView = this.tvAccountNumber;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(c1088Vi != null ? c1088Vi.b : null);
|
|
ImageView imageView = this.ivAccountIcon;
|
|
if (imageView == null) {
|
|
C14957gcv.a("");
|
|
imageView = null;
|
|
}
|
|
imageView.setImageResource((c1088Vi == null || c1088Vi.e != 0) ? R.drawable.ic_cid : R.drawable.ic_mobile);
|
|
Button button = this.btLink;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setOnClickListener(new View.OnClickListener(this) { // from class: o.fvm
|
|
private LinkAccountFragment c;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
LinkAccountFragment.a(this.c);
|
|
}
|
|
|
|
{
|
|
this.c = this;
|
|
}
|
|
});
|
|
CheckBox checkBox2 = this.cbRequestMoneyToggle;
|
|
if (checkBox2 == null) {
|
|
C14957gcv.a("");
|
|
checkBox2 = null;
|
|
}
|
|
checkBox2.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(this) { // from class: o.fvo
|
|
private LinkAccountFragment a;
|
|
|
|
@Override // android.widget.CompoundButton.OnCheckedChangeListener
|
|
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
|
|
LinkAccountFragment.e(this.a, z);
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
}
|
|
});
|
|
CheckBox checkBox3 = this.cbRequestBillToggle;
|
|
if (checkBox3 != null) {
|
|
checkBox = checkBox3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(this) { // from class: o.fvs
|
|
private LinkAccountFragment e;
|
|
|
|
@Override // android.widget.CompoundButton.OnCheckedChangeListener
|
|
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
|
|
LinkAccountFragment.d(this.e, z);
|
|
}
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
});
|
|
return inflate;
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class RVV {
|
|
private RVV() {
|
|
}
|
|
|
|
public /* synthetic */ RVV(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(LinkAccountFragment linkAccountFragment) {
|
|
C14957gcv.e(linkAccountFragment, "");
|
|
fIS.RVV rvv = linkAccountFragment.c;
|
|
if (rvv != null) {
|
|
rvv.j();
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void d(LinkAccountFragment linkAccountFragment, boolean z) {
|
|
C14957gcv.e(linkAccountFragment, "");
|
|
fIS.RVV rvv = linkAccountFragment.c;
|
|
if (rvv != null) {
|
|
rvv.c(z);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void d(LinkAccountFragment linkAccountFragment, C1081Vd c1081Vd) {
|
|
C14957gcv.e(linkAccountFragment, "");
|
|
fIS.RVV rvv = linkAccountFragment.c;
|
|
if (rvv != null) {
|
|
rvv.e(c1081Vd);
|
|
}
|
|
Button button = linkAccountFragment.btLink;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setEnabled(true);
|
|
}
|
|
|
|
public static /* synthetic */ void e(LinkAccountFragment linkAccountFragment, boolean z) {
|
|
C14957gcv.e(linkAccountFragment, "");
|
|
fIS.RVV rvv = linkAccountFragment.c;
|
|
if (rvv != null) {
|
|
rvv.d(z);
|
|
}
|
|
}
|
|
}
|