package com.scb.phone.view.fragment.merchant; import android.content.Context; import android.os.Bundle; import android.os.Handler; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; 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 o.AbstractC12404exa; import o.C16148leh; import o.C8912dZm; import o.InterfaceC16541pFg; import o.RK; import o.cZR; import o.kIT; import o.ury; /* loaded from: classes5.dex */ public abstract class BaseMerchantWalletItemTransactionFragment extends Hilt_BaseMerchantWalletItemTransactionFragment implements cZR.LWm, C16148leh.HBt, C16148leh.IeS { protected Handler c; protected C16148leh d; private RecyclerView.Sts h; protected cZR.Sts j; @BindView protected RelativeLayout mEmptyCard; @BindView protected TextView mEmptyDescription; @BindView protected ImageView mEmptyImage; @BindView protected TextView mEmptyTitle; @BindView protected RecyclerView mRecyclerView; @BindView protected TextView mTextMessage; public abstract void c(String str, String str2, String str3); public abstract AbstractC12404exa d(); @Override // androidx.fragment.app.Fragment public void onCreate(Bundle bundle) { super.onCreate(bundle); this.c = new Handler(); } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559755, viewGroup, false); ButterKnife.c(this, inflate); getContext(); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(1, false); C16148leh c16148leh = new C16148leh(bundle != null ? bundle.getParcelable("RecyclerViewExpandableItemManager") : null); this.d = c16148leh; kIT kit = c16148leh.j; if (kit == null) { c16148leh.b = this; } else { kit.e = this; } C16148leh c16148leh2 = this.d; kIT kit2 = c16148leh2.j; if (kit2 == null) { c16148leh2.a = this; } else { kit2.b = this; } this.h = this.d.d(d()); C8912dZm c8912dZm = new C8912dZm(); c8912dZm.setSupportsChangeAnimations(false); this.mRecyclerView.setLayoutManager(linearLayoutManager); this.mRecyclerView.setAdapter(this.h); this.mRecyclerView.setItemAnimator(c8912dZm); this.mRecyclerView.setHasFixedSize(false); this.mRecyclerView.setNestedScrollingEnabled(false); this.d.b(this.mRecyclerView); return inflate; } @Override // androidx.fragment.app.Fragment public void onViewCreated(View view, Bundle bundle) { String str; super.onViewCreated(view, bundle); Bundle arguments = getArguments(); this.mTextMessage.setVisibility(8); this.mRecyclerView.setVisibility(8); this.mEmptyCard.setVisibility(8); if (arguments != null) { RK rk = (RK) arguments.getParcelable("com.scb.phone.view.fragment.merchant.BaseMerchantWalletItemTransactionFragment.EXTRA_WALLET_DETAIL"); if (rk == null) { str = ""; } else { str = rk.i; } c(str, arguments.getString("com.scb.phone.view.fragment.merchant.BaseMerchantWalletItemTransactionFragment.EXTRA_START_DATE"), arguments.getString("com.scb.phone.view.fragment.merchant.BaseMerchantWalletItemTransactionFragment.EXTRA_END_DATE")); } } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onSaveInstanceState(Bundle bundle) { super.onSaveInstanceState(bundle); C16148leh c16148leh = this.d; if (c16148leh != null) { bundle.putParcelable("RecyclerViewExpandableItemManager", c16148leh.Oa_()); } } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onDestroyView() { C16148leh c16148leh = this.d; if (c16148leh != null) { c16148leh.b(); this.d = null; } RecyclerView recyclerView = this.mRecyclerView; if (recyclerView != null) { recyclerView.setItemAnimator(null); this.mRecyclerView.setAdapter(null); this.mRecyclerView = null; } RecyclerView.Sts sts = this.h; if (sts != null) { ury.d(sts); this.h = null; } this.c = null; super.onDestroyView(); } @Override // com.scb.phone.view.fragment.merchant.Hilt_BaseMerchantWalletItemTransactionFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment public void onAttach(Context context) { super.onAttach(context); InterfaceC16541pFg parentFragment = getParentFragment(); if (parentFragment instanceof cZR.Sts) { this.j = (cZR.Sts) parentFragment; } } @Override // o.cZR.LWm public final void b() { this.mTextMessage.setVisibility(8); this.mEmptyTitle.setText(getResources().getString(R.string.custom_empty_title)); this.mEmptyTitle.setGravity(3); this.mEmptyDescription.setText(getResources().getString(R.string.custom_empty_description)); this.mEmptyCard.setVisibility(0); this.mEmptyImage.setVisibility(0); } @Override // o.cZR.LWm public final void a() { this.mTextMessage.setVisibility(0); this.mEmptyCard.setVisibility(8); } }