183 lines
6.8 KiB
Java
183 lines
6.8 KiB
Java
package com.scb.phone.view.fragment.easycash.landing;
|
|
|
|
import android.content.Context;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.easycash.EasycashReferralSendDfwActivity;
|
|
import com.scb.phone.view.activity.easycash.EasycashReferralSendProductActivity;
|
|
import com.scb.phone.view.activity.easycash.EasycashSalesheetIndexActivity;
|
|
import com.scb.phone.view.activity.easycash.LoanRequestorActivity;
|
|
import com.scb.phone.view.custom.common.DefaultButton;
|
|
import com.scb.phone.view.fragment.BaseFragment;
|
|
import com.scb.phone.view.fragment.easycash.landing.EasycashBaseLandingFragment;
|
|
import o.C0664Lr;
|
|
import o.C14957gcv;
|
|
import o.InterfaceC6621cYR;
|
|
import o.LV;
|
|
import o.LW;
|
|
import o.LX;
|
|
import o.aWQ;
|
|
import o.nMh;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class EasycashBaseLandingFragment extends BaseFragment implements InterfaceC6621cYR.huo {
|
|
private aWQ<?> c;
|
|
private LinearLayout d;
|
|
|
|
protected abstract View asx_(ViewGroup viewGroup);
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
return asx_(viewGroup);
|
|
}
|
|
|
|
@Override // o.InterfaceC6621cYR.huo
|
|
public final void e(LW lw) {
|
|
C14957gcv.e(lw, "");
|
|
startActivity(EasycashReferralSendProductActivity.aeA_(getContext(), lw));
|
|
}
|
|
|
|
@Override // o.InterfaceC6621cYR.huo
|
|
public final void d(LW lw) {
|
|
C14957gcv.e(lw, "");
|
|
EasycashReferralSendDfwActivity.a(getContext(), lw);
|
|
}
|
|
|
|
@Override // o.InterfaceC6621cYR.huo
|
|
public final void e(LX lx) {
|
|
C14957gcv.e(lx, "");
|
|
EasycashSalesheetIndexActivity.c(getContext(), lx);
|
|
}
|
|
|
|
@Override // o.InterfaceC6621cYR.huo
|
|
public final void d(LV lv) {
|
|
C14957gcv.e(lv, "");
|
|
LoanRequestorActivity.b(getContext(), lv);
|
|
}
|
|
|
|
@Override // o.InterfaceC6621cYR.huo
|
|
public final void e(C0664Lr c0664Lr) {
|
|
C14957gcv.e(c0664Lr, "");
|
|
b(c0664Lr, true);
|
|
}
|
|
|
|
@Override // o.InterfaceC6621cYR.huo
|
|
public final void c(C0664Lr c0664Lr) {
|
|
C14957gcv.e(c0664Lr, "");
|
|
b(c0664Lr, false);
|
|
}
|
|
|
|
@Override // o.InterfaceC6621cYR.huo
|
|
public final void b(final C0664Lr c0664Lr) {
|
|
LinearLayout linearLayout;
|
|
C14957gcv.e(c0664Lr, "");
|
|
Context context = getContext();
|
|
if (context == null || (linearLayout = this.d) == null) {
|
|
return;
|
|
}
|
|
TextView textView = new TextView(getContext());
|
|
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-2, -2);
|
|
layoutParams.gravity = 1;
|
|
layoutParams.setMargins((int) textView.getResources().getDimension(R.dimen.f16332131165399), (int) textView.getResources().getDimension(R.dimen.f16352131165401), (int) textView.getResources().getDimension(R.dimen.f16312131165397), 0);
|
|
textView.setLayoutParams(layoutParams);
|
|
textView.setTextAppearance(R.style.f57022132017963);
|
|
textView.setText(c0664Lr.j);
|
|
textView.setTextColor(nMh.getColor(context, R.color.f13682131100876));
|
|
textView.setOnClickListener(new View.OnClickListener(this, c0664Lr) { // from class: o.eVE
|
|
private C0664Lr a;
|
|
private EasycashBaseLandingFragment b;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
EasycashBaseLandingFragment.d(this.b, this.a);
|
|
}
|
|
|
|
{
|
|
this.b = this;
|
|
this.a = c0664Lr;
|
|
}
|
|
});
|
|
linearLayout.addView(textView);
|
|
}
|
|
|
|
private final void b(final C0664Lr c0664Lr, boolean z) {
|
|
LinearLayout linearLayout;
|
|
Context context = getContext();
|
|
if (context == null || (linearLayout = this.d) == null) {
|
|
return;
|
|
}
|
|
DefaultButton defaultButton = new DefaultButton(context);
|
|
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, (int) defaultButton.getResources().getDimension(R.dimen.f16282131165394));
|
|
layoutParams.setMargins((int) defaultButton.getResources().getDimension(R.dimen.f16332131165399), (int) defaultButton.getResources().getDimension(R.dimen.f16352131165401), (int) defaultButton.getResources().getDimension(R.dimen.f16312131165397), 0);
|
|
defaultButton.setLayoutParams(layoutParams);
|
|
if (z) {
|
|
defaultButton.setBackground(nMh.getDrawable(context, R.drawable.bg_button));
|
|
defaultButton.setRipple(nMh.getDrawable(context, R.drawable.ripple_rounded_dark_purple));
|
|
defaultButton.setTextColor(nMh.getColor(context, R.color.f14042131100912));
|
|
} else {
|
|
defaultButton.setBackground(nMh.getDrawable(context, R.drawable.bg_button_transparent));
|
|
defaultButton.setRipple(nMh.getDrawable(context, R.drawable.ripple_rounded_purple));
|
|
defaultButton.setTextColor(nMh.getColor(context, R.color.f13682131100876));
|
|
}
|
|
defaultButton.setText(c0664Lr.j);
|
|
defaultButton.setOnClickListener(new View.OnClickListener(this, c0664Lr) { // from class: o.eVH
|
|
private EasycashBaseLandingFragment b;
|
|
private C0664Lr c;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
EasycashBaseLandingFragment.c(this.b, this.c);
|
|
}
|
|
|
|
{
|
|
this.b = this;
|
|
this.c = c0664Lr;
|
|
}
|
|
});
|
|
linearLayout.addView(defaultButton);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onDestroy() {
|
|
super.onDestroy();
|
|
aWQ<?> awq = this.c;
|
|
if (awq != null) {
|
|
awq.w_();
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void d(EasycashBaseLandingFragment easycashBaseLandingFragment, C0664Lr c0664Lr) {
|
|
C14957gcv.e(easycashBaseLandingFragment, "");
|
|
C14957gcv.e(c0664Lr, "");
|
|
aWQ<?> awq = easycashBaseLandingFragment.c;
|
|
if (awq != null) {
|
|
awq.a(c0664Lr);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void c(EasycashBaseLandingFragment easycashBaseLandingFragment, C0664Lr c0664Lr) {
|
|
C14957gcv.e(easycashBaseLandingFragment, "");
|
|
C14957gcv.e(c0664Lr, "");
|
|
aWQ<?> awq = easycashBaseLandingFragment.c;
|
|
if (awq != null) {
|
|
awq.a(c0664Lr);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
public final void a(aWQ<?> awq) {
|
|
this.c = awq;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
public final void asv_(LinearLayout linearLayout) {
|
|
this.d = linearLayout;
|
|
}
|
|
}
|