149 lines
4.6 KiB
Java
149 lines
4.6 KiB
Java
package com.scb.phone.view.custom.tierpricing;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.view.LayoutInflater;
|
|
import android.view.ViewGroup;
|
|
import android.widget.FrameLayout;
|
|
import android.widget.TextView;
|
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
|
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.tierpricing.TierPricingInstallmentAdapter;
|
|
import java.util.List;
|
|
import o.C14957gcv;
|
|
import o.WY;
|
|
import o.WZ;
|
|
import o.nMh;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class TierPricingSimplePromotionView extends ConstraintLayout {
|
|
|
|
@BindView
|
|
public FrameLayout divider;
|
|
private final AttributeSet e;
|
|
|
|
@BindView
|
|
public RecyclerView installments;
|
|
|
|
@BindView
|
|
public TextView promo;
|
|
|
|
@BindView
|
|
public TextView remark;
|
|
|
|
@BindView
|
|
public TextView title;
|
|
|
|
public /* synthetic */ TierPricingSimplePromotionView(Context context, AttributeSet attributeSet, int i, byte b) {
|
|
this(context, (i & 2) != 0 ? null : attributeSet, 0);
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public TierPricingSimplePromotionView(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
C14957gcv.e(context, "");
|
|
this.e = attributeSet;
|
|
LayoutInflater.from(getContext()).inflate(R.layout.2131559374, (ViewGroup) this, true);
|
|
ButterKnife.c(this);
|
|
}
|
|
|
|
public final void setDisplay(WZ wz) {
|
|
C14957gcv.e(wz, "");
|
|
TextView textView = this.promo;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
TextView textView2 = textView;
|
|
boolean z = wz.d;
|
|
C14957gcv.e(textView2, "");
|
|
textView2.setVisibility(z ? 0 : 8);
|
|
TextView textView3 = this.title;
|
|
if (textView3 == null) {
|
|
C14957gcv.a("");
|
|
textView3 = null;
|
|
}
|
|
textView3.setText(wz.b);
|
|
TextView textView4 = this.remark;
|
|
if (textView4 == null) {
|
|
C14957gcv.a("");
|
|
textView4 = null;
|
|
}
|
|
textView4.setText(wz.e);
|
|
RecyclerView recyclerView = this.installments;
|
|
if (recyclerView == null) {
|
|
C14957gcv.a("");
|
|
recyclerView = null;
|
|
}
|
|
getContext();
|
|
recyclerView.setLayoutManager(new LinearLayoutManager());
|
|
List<WY> list = wz.c;
|
|
if (list != null) {
|
|
RecyclerView recyclerView2 = this.installments;
|
|
if (recyclerView2 == null) {
|
|
C14957gcv.a("");
|
|
recyclerView2 = null;
|
|
}
|
|
recyclerView2.setAdapter(new TierPricingInstallmentAdapter(list, null));
|
|
}
|
|
}
|
|
|
|
public final void setRemarkTextColor(int i) {
|
|
TextView textView = this.remark;
|
|
TextView textView2 = null;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setTextColor(nMh.getColor(getContext(), i));
|
|
TextView textView3 = this.remark;
|
|
if (textView3 != null) {
|
|
textView2 = textView3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
textView2.setTextSize(0, getResources().getDimension(R.dimen.f16072131165373));
|
|
}
|
|
|
|
public final void setTitle(TextView textView) {
|
|
C14957gcv.e(textView, "");
|
|
this.title = textView;
|
|
}
|
|
|
|
public final void setRemark(TextView textView) {
|
|
C14957gcv.e(textView, "");
|
|
this.remark = textView;
|
|
}
|
|
|
|
public final void setPromo(TextView textView) {
|
|
C14957gcv.e(textView, "");
|
|
this.promo = textView;
|
|
}
|
|
|
|
public final void setInstallments(RecyclerView recyclerView) {
|
|
C14957gcv.e(recyclerView, "");
|
|
this.installments = recyclerView;
|
|
}
|
|
|
|
public final void setDivider(FrameLayout frameLayout) {
|
|
C14957gcv.e(frameLayout, "");
|
|
this.divider = frameLayout;
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
public TierPricingSimplePromotionView(Context context, AttributeSet attributeSet) {
|
|
this(context, attributeSet, 4, (byte) 0);
|
|
C14957gcv.e(context, "");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
public TierPricingSimplePromotionView(Context context) {
|
|
this(context, null, 6, (byte) 0);
|
|
C14957gcv.e(context, "");
|
|
}
|
|
}
|