214 lines
6.1 KiB
Java
214 lines
6.1 KiB
Java
|
package com.scb.phone.view.custom.common;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.res.TypedArray;
|
||
|
import android.graphics.PorterDuff;
|
||
|
import android.graphics.drawable.Drawable;
|
||
|
import android.util.AttributeSet;
|
||
|
import android.view.View;
|
||
|
import android.widget.Button;
|
||
|
import android.widget.ImageView;
|
||
|
import android.widget.TextView;
|
||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.custom.common.CustomBaseBillsToPay;
|
||
|
import o.C12891fKc;
|
||
|
import o.C14957gcv;
|
||
|
import o.C15715hv;
|
||
|
import o.C6583cXR;
|
||
|
import o.InterfaceC12836fIk;
|
||
|
import o.nMh;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public abstract class CustomBaseBillsToPay<T extends InterfaceC12836fIk> extends ConstraintLayout {
|
||
|
private int a;
|
||
|
private int b;
|
||
|
private int c;
|
||
|
private int d;
|
||
|
private T e;
|
||
|
|
||
|
protected abstract TextView ape_();
|
||
|
|
||
|
protected abstract TextView apf_();
|
||
|
|
||
|
protected abstract TextView apg_();
|
||
|
|
||
|
protected abstract ImageView aph_();
|
||
|
|
||
|
protected abstract TextView api_();
|
||
|
|
||
|
protected abstract Button apj_();
|
||
|
|
||
|
protected abstract TextView apk_();
|
||
|
|
||
|
protected abstract void e();
|
||
|
|
||
|
public final void setCompletedText(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
}
|
||
|
|
||
|
public final void setCompletedTextVisibility(int i) {
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
public CustomBaseBillsToPay(Context context, AttributeSet attributeSet) {
|
||
|
super(context, attributeSet);
|
||
|
C14957gcv.e(context, "");
|
||
|
C14957gcv.e(attributeSet, "");
|
||
|
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomBillsToPay, 0, 0);
|
||
|
C14957gcv.c(obtainStyledAttributes, "");
|
||
|
this.b = obtainStyledAttributes.getColor(0, nMh.getColor(context, R.color.f2982131099805));
|
||
|
this.d = obtainStyledAttributes.getDimensionPixelSize(1, context.getResources().getDimensionPixelSize(R.dimen.f16092131165375));
|
||
|
this.a = obtainStyledAttributes.getColor(2, nMh.getColor(context, R.color.f13682131100876));
|
||
|
this.c = obtainStyledAttributes.getDimensionPixelSize(3, context.getResources().getDimensionPixelSize(R.dimen.f16102131165376));
|
||
|
obtainStyledAttributes.recycle();
|
||
|
e();
|
||
|
k();
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public void k() {
|
||
|
TextView ape_ = ape_();
|
||
|
if (ape_ != null) {
|
||
|
ape_.setTextSize(2, C6583cXR.a(this.d, getContext()));
|
||
|
}
|
||
|
TextView ape_2 = ape_();
|
||
|
if (ape_2 != null) {
|
||
|
ape_2.setTextColor(this.b);
|
||
|
}
|
||
|
TextView apf_ = apf_();
|
||
|
if (apf_ != null) {
|
||
|
apf_.setTextSize(2, C6583cXR.a(this.c, getContext()));
|
||
|
}
|
||
|
TextView apf_2 = apf_();
|
||
|
if (apf_2 != null) {
|
||
|
apf_2.setTextColor(this.a);
|
||
|
}
|
||
|
Button apj_ = apj_();
|
||
|
if (apj_ != null) {
|
||
|
apj_.setOnClickListener(new View.OnClickListener(this) { // from class: o.eBp
|
||
|
private CustomBaseBillsToPay a;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
CustomBaseBillsToPay.b(this.a);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = this;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void setIconDrawable(Drawable drawable, int i) {
|
||
|
if (drawable != null) {
|
||
|
drawable.setColorFilter(i, PorterDuff.Mode.SRC_ATOP);
|
||
|
ImageView aph_ = aph_();
|
||
|
if (aph_ != null) {
|
||
|
aph_.setImageDrawable(drawable);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void setIconDrawable(Drawable drawable) {
|
||
|
ImageView aph_;
|
||
|
if (drawable == null || (aph_ = aph_()) == null) {
|
||
|
return;
|
||
|
}
|
||
|
aph_.setImageDrawable(drawable);
|
||
|
}
|
||
|
|
||
|
public final void setIconDrawable(String str, int i) {
|
||
|
C14957gcv.e(str, "");
|
||
|
getContext();
|
||
|
C12891fKc.azn_(nMh.getDrawable(getContext(), i), aph_(), str);
|
||
|
}
|
||
|
|
||
|
public final void setAmountTitle(String str) {
|
||
|
TextView ape_;
|
||
|
if (str == null || (ape_ = ape_()) == null) {
|
||
|
return;
|
||
|
}
|
||
|
ape_.setText(str);
|
||
|
}
|
||
|
|
||
|
public final void setAmountValue(String str) {
|
||
|
TextView apf_;
|
||
|
if (str == null || (apf_ = apf_()) == null) {
|
||
|
return;
|
||
|
}
|
||
|
apf_.setText(str);
|
||
|
}
|
||
|
|
||
|
public final void setDueDateValue(String str) {
|
||
|
TextView apg_;
|
||
|
if (str == null || (apg_ = apg_()) == null) {
|
||
|
return;
|
||
|
}
|
||
|
apg_.setText(str);
|
||
|
}
|
||
|
|
||
|
public final void setMinimumPaymentValue(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
TextView api_ = api_();
|
||
|
if (api_ != null) {
|
||
|
api_.setText(str);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void setStatementDateValue(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
TextView apk_ = apk_();
|
||
|
if (apk_ != null) {
|
||
|
apk_.setText(str);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void setPayButtonVisibility(int i) {
|
||
|
Button apj_ = apj_();
|
||
|
if (apj_ != null) {
|
||
|
apj_.setVisibility(i);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void setAmountTitleTextVisibility(int i) {
|
||
|
TextView ape_ = ape_();
|
||
|
if (ape_ != null) {
|
||
|
ape_.setVisibility(i);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void setAmountVisibility(int i) {
|
||
|
TextView apf_ = apf_();
|
||
|
if (apf_ != null) {
|
||
|
apf_.setVisibility(i);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void setDueDateVisibility(int i) {
|
||
|
TextView apg_ = apg_();
|
||
|
if (apg_ != null) {
|
||
|
apg_.setVisibility(i);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void b(CustomBaseBillsToPay customBaseBillsToPay) {
|
||
|
C14957gcv.e(customBaseBillsToPay, "");
|
||
|
T t = customBaseBillsToPay.e;
|
||
|
if (t != null) {
|
||
|
t.h();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void setOnBillClickListener(T t) {
|
||
|
C14957gcv.e(t, "");
|
||
|
this.e = t;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public final T j() {
|
||
|
return this.e;
|
||
|
}
|
||
|
}
|