package com.scb.phone.view.fragment.investment.funddetails; import android.os.Bundle; 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 com.scb.phone.view.adapter.investment.funddetails.DividendSummaryAdapter; import java.util.ArrayList; import java.util.List; import o.C0851Pz; import o.C16148leh; import o.InterfaceC6683cZz; /* loaded from: classes5.dex */ public class DividendTabFragment extends Hilt_DividendTabFragment implements InterfaceC6683cZz { private DividendSummaryAdapter d; @BindView RelativeLayout mContainerRelativeLayout; @BindView TextView mEmptyCenterTitle; @BindView TextView mEmptyDescription; @BindView ImageView mEmptyImage; @BindView TextView mEmptyTitle; @BindView RecyclerView mRecyclerView; @BindView TextView mShowMessages; public static DividendTabFragment a(List list) { DividendTabFragment dividendTabFragment = new DividendTabFragment(); if (list != null) { Bundle bundle = new Bundle(); bundle.putParcelableArrayList("com.scb.phone.FUND_DIVIDEND_LIST", (ArrayList) list); dividendTabFragment.setArguments(bundle); } return dividendTabFragment; } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559668, viewGroup, false); ButterKnife.c(this, inflate); if (getArguments() != null) { ArrayList parcelableArrayList = getArguments().getParcelableArrayList("com.scb.phone.FUND_DIVIDEND_LIST"); if (parcelableArrayList == null) { d(); } else if (!parcelableArrayList.isEmpty()) { this.mContainerRelativeLayout.setVisibility(8); this.mShowMessages.setVisibility(8); this.mRecyclerView.setVisibility(0); DividendSummaryAdapter dividendSummaryAdapter = this.d; if (dividendSummaryAdapter != null) { dividendSummaryAdapter.c = parcelableArrayList; dividendSummaryAdapter.notifyDataSetChanged(); } else { getContext(); this.mRecyclerView.setLayoutManager(new LinearLayoutManager(1, false)); this.mRecyclerView.setNestedScrollingEnabled(false); C16148leh c16148leh = new C16148leh(null); DividendSummaryAdapter dividendSummaryAdapter2 = new DividendSummaryAdapter(getContext(), parcelableArrayList, c16148leh); this.d = dividendSummaryAdapter2; this.mRecyclerView.setAdapter(c16148leh.d(dividendSummaryAdapter2)); c16148leh.b(this.mRecyclerView); } } else { this.mEmptyTitle.setVisibility(8); this.mEmptyCenterTitle.setVisibility(0); this.mEmptyCenterTitle.setText(getResources().getString(R.string.custom_empty_no_dividend)); this.mEmptyDescription.setVisibility(8); this.mContainerRelativeLayout.setVisibility(0); this.mShowMessages.setVisibility(8); this.mRecyclerView.setVisibility(8); this.mEmptyImage.setVisibility(8); } } else { d(); } return inflate; } private void d() { this.mEmptyTitle.setText(getResources().getString(R.string.ltf_divided_empty_title)); this.mEmptyDescription.setText(getResources().getString(R.string.ltf_divided_empty_description)); this.mContainerRelativeLayout.setVisibility(0); this.mEmptyImage.setVisibility(0); this.mShowMessages.setVisibility(8); this.mRecyclerView.setVisibility(8); } }