290 lines
9.4 KiB
Java
290 lines
9.4 KiB
Java
package com.scb.phone.view.fragment.debitatm;
|
|
|
|
import android.graphics.drawable.Drawable;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.Menu;
|
|
import android.view.MenuItem;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.ImageView;
|
|
import android.widget.RelativeLayout;
|
|
import android.widget.TextView;
|
|
import androidx.appcompat.widget.Toolbar;
|
|
import androidx.fragment.app.Fragment;
|
|
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.activity.debitatm.DebitTransactionAdapter;
|
|
import com.scb.phone.view.fragment.debitatm.DebitCardTransactionTabFragment;
|
|
import java.util.ArrayList;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import o.C1046Ul;
|
|
import o.C1062Uu;
|
|
import o.C16148leh;
|
|
import o.C8912dZm;
|
|
import o.InterfaceC9098ddM;
|
|
import o.Tlu;
|
|
import o.kIT;
|
|
import o.nMh;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class DebitCardTransactionTabFragment extends Hilt_DebitCardTransactionTabFragment implements InterfaceC9098ddM.HBt {
|
|
public String c;
|
|
public InterfaceC9098ddM.LWm d;
|
|
private DebitTransactionAdapter i;
|
|
|
|
@BindView
|
|
RelativeLayout mEmptyCard;
|
|
|
|
@BindView
|
|
TextView mEmptyDescriptionDebit;
|
|
|
|
@BindView
|
|
ImageView mEmptyImageDebit;
|
|
|
|
@BindView
|
|
TextView mEmptyTitleDebit;
|
|
|
|
@BindView
|
|
RecyclerView mRecyclerViewDebit;
|
|
|
|
@BindView
|
|
TextView mTextMessageDebit;
|
|
|
|
@BindView
|
|
TextView mTextTxnDebit;
|
|
|
|
@BindView
|
|
TextView mTextTxnMonthDebit;
|
|
|
|
@BindView
|
|
Toolbar mToolbarTxnDebit;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public interface HBt {
|
|
void k();
|
|
}
|
|
|
|
public static /* synthetic */ void g() {
|
|
}
|
|
|
|
public static /* synthetic */ void j() {
|
|
}
|
|
|
|
public static Fragment f() {
|
|
return new DebitCardTransactionTabFragment();
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
View inflate = layoutInflater.inflate(R.layout.2131559544, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
this.d.d(this);
|
|
Drawable mutate = nMh.getDrawable(getContext(), R.drawable.ic_filter_list_black_24dp).mutate();
|
|
Tlu.pE_(mutate, nMh.getColor(getContext(), R.color.f13682131100876));
|
|
this.mToolbarTxnDebit.setOverflowIcon(mutate);
|
|
Menu jO_ = this.mToolbarTxnDebit.jO_();
|
|
Iterator<String> it = this.d.b().iterator();
|
|
while (it.hasNext()) {
|
|
jO_.add(it.next());
|
|
}
|
|
final ArrayList arrayList = new ArrayList();
|
|
for (int i = 0; i < jO_.size(); i++) {
|
|
arrayList.add(jO_.getItem(i));
|
|
}
|
|
this.mToolbarTxnDebit.setOnMenuItemClickListener(new Toolbar.HBt(this, arrayList) { // from class: o.ePI
|
|
private List c;
|
|
private DebitCardTransactionTabFragment d;
|
|
|
|
@Override // androidx.appcompat.widget.Toolbar.HBt
|
|
public final boolean awL_(MenuItem menuItem) {
|
|
return DebitCardTransactionTabFragment.arG_(this.d, this.c, menuItem);
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
this.c = arrayList;
|
|
}
|
|
});
|
|
this.mTextTxnDebit.setText(getString(R.string.debit_transaction_label));
|
|
getContext();
|
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(1, false);
|
|
final C16148leh c16148leh = new C16148leh(null);
|
|
C16148leh.IeS ieS = new C16148leh.IeS() { // from class: o.ePH
|
|
@Override // o.C16148leh.IeS
|
|
public final void e(int i2) {
|
|
DebitCardTransactionTabFragment.j();
|
|
}
|
|
};
|
|
kIT kit = c16148leh.j;
|
|
if (kit == null) {
|
|
c16148leh.a = ieS;
|
|
} else {
|
|
kit.b = ieS;
|
|
}
|
|
C16148leh.HBt hBt = new C16148leh.HBt(c16148leh) { // from class: o.ePK
|
|
private C16148leh c;
|
|
|
|
@Override // o.C16148leh.HBt
|
|
public final void d(int i2) {
|
|
DebitCardTransactionTabFragment.e(this.c, i2);
|
|
}
|
|
|
|
{
|
|
this.c = c16148leh;
|
|
}
|
|
};
|
|
kIT kit2 = c16148leh.j;
|
|
if (kit2 == null) {
|
|
c16148leh.b = hBt;
|
|
} else {
|
|
kit2.e = hBt;
|
|
}
|
|
DebitTransactionAdapter debitTransactionAdapter = new DebitTransactionAdapter(getContext());
|
|
this.i = debitTransactionAdapter;
|
|
RecyclerView.Sts d = c16148leh.d(debitTransactionAdapter);
|
|
C8912dZm c8912dZm = new C8912dZm();
|
|
c8912dZm.setSupportsChangeAnimations(false);
|
|
this.mRecyclerViewDebit.setLayoutManager(linearLayoutManager);
|
|
this.mRecyclerViewDebit.setAdapter(d);
|
|
this.mRecyclerViewDebit.setItemAnimator(c8912dZm);
|
|
this.mRecyclerViewDebit.setHasFixedSize(false);
|
|
this.mRecyclerViewDebit.setNestedScrollingEnabled(false);
|
|
c16148leh.b(this.mRecyclerViewDebit);
|
|
return inflate;
|
|
}
|
|
|
|
public static /* synthetic */ void e(C16148leh c16148leh, int i) {
|
|
kIT kit;
|
|
for (int i2 = 0; i2 < c16148leh.j.a.d(); i2++) {
|
|
if (i2 != i && (kit = c16148leh.j) != null) {
|
|
kit.e(i2, false);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public void onViewCreated(View view, Bundle bundle) {
|
|
super.onViewCreated(view, bundle);
|
|
((HBt) getActivity()).k();
|
|
}
|
|
|
|
public static /* synthetic */ void c(C16148leh c16148leh, int i) {
|
|
kIT kit;
|
|
for (int i2 = 0; i2 < c16148leh.j.a.d(); i2++) {
|
|
if (i2 != i && (kit = c16148leh.j) != null) {
|
|
kit.e(i2, false);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void b(String str) {
|
|
this.mTextMessageDebit.setText(str);
|
|
this.mToolbarTxnDebit.setVisibility(0);
|
|
this.mTextMessageDebit.setVisibility(0);
|
|
this.mRecyclerViewDebit.setVisibility(8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9098ddM.HBt
|
|
public final void d() {
|
|
this.mTextTxnMonthDebit.setText(getString(R.string.deposit_detail_filter_this_month));
|
|
}
|
|
|
|
@Override // o.InterfaceC9098ddM.HBt
|
|
public final void a() {
|
|
b(getString(R.string.debit_atm_transaction));
|
|
this.mToolbarTxnDebit.setVisibility(8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9098ddM.HBt
|
|
public final void b() {
|
|
b(getString(R.string.debit_no_transaction));
|
|
}
|
|
|
|
@Override // o.InterfaceC9098ddM.HBt
|
|
public final void a(String str) {
|
|
b(str);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onDestroy() {
|
|
super.onDestroy();
|
|
this.d.w_();
|
|
}
|
|
|
|
public static /* synthetic */ boolean arG_(DebitCardTransactionTabFragment debitCardTransactionTabFragment, List list, MenuItem menuItem) {
|
|
debitCardTransactionTabFragment.mTextTxnMonthDebit.setText(menuItem.getTitle());
|
|
int indexOf = list.indexOf(menuItem);
|
|
DebitTransactionAdapter debitTransactionAdapter = debitCardTransactionTabFragment.i;
|
|
debitTransactionAdapter.e.clear();
|
|
debitTransactionAdapter.notifyDataSetChanged();
|
|
debitCardTransactionTabFragment.d.e(debitCardTransactionTabFragment.c, indexOf);
|
|
return true;
|
|
}
|
|
|
|
@Override // o.InterfaceC9098ddM.HBt
|
|
public final void a(C1046Ul c1046Ul, boolean z) {
|
|
if (!z) {
|
|
DebitTransactionAdapter debitTransactionAdapter = this.i;
|
|
List<C1062Uu> list = c1046Ul.a;
|
|
if (list != null) {
|
|
debitTransactionAdapter.e.addAll(list);
|
|
}
|
|
debitTransactionAdapter.notifyDataSetChanged();
|
|
return;
|
|
}
|
|
List<C1062Uu> list2 = c1046Ul.a;
|
|
final C16148leh c16148leh = new C16148leh(null);
|
|
C16148leh.IeS ieS = new C16148leh.IeS() { // from class: o.ePL
|
|
@Override // o.C16148leh.IeS
|
|
public final void e(int i) {
|
|
DebitCardTransactionTabFragment.g();
|
|
}
|
|
};
|
|
kIT kit = c16148leh.j;
|
|
if (kit == null) {
|
|
c16148leh.a = ieS;
|
|
} else {
|
|
kit.b = ieS;
|
|
}
|
|
C16148leh.HBt hBt = new C16148leh.HBt(c16148leh) { // from class: o.ePM
|
|
private C16148leh d;
|
|
|
|
@Override // o.C16148leh.HBt
|
|
public final void d(int i) {
|
|
DebitCardTransactionTabFragment.c(this.d, i);
|
|
}
|
|
|
|
{
|
|
this.d = c16148leh;
|
|
}
|
|
};
|
|
kIT kit2 = c16148leh.j;
|
|
if (kit2 == null) {
|
|
c16148leh.b = hBt;
|
|
} else {
|
|
kit2.e = hBt;
|
|
}
|
|
getContext();
|
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(1, false);
|
|
RecyclerView.Sts d = c16148leh.d(this.i);
|
|
new C8912dZm().setSupportsChangeAnimations(false);
|
|
this.mRecyclerViewDebit.setLayoutManager(linearLayoutManager);
|
|
this.mRecyclerViewDebit.setAdapter(d);
|
|
this.mToolbarTxnDebit.setVisibility(0);
|
|
this.mTextMessageDebit.setVisibility(8);
|
|
this.mRecyclerViewDebit.setVisibility(0);
|
|
c16148leh.b(this.mRecyclerViewDebit);
|
|
DebitTransactionAdapter debitTransactionAdapter2 = this.i;
|
|
debitTransactionAdapter2.e.clear();
|
|
if (list2 != null) {
|
|
debitTransactionAdapter2.e.addAll(list2);
|
|
}
|
|
debitTransactionAdapter2.notifyDataSetChanged();
|
|
}
|
|
}
|