what-the-bank/sources/com/scb/phone/view/custom/common/CustomBillsToPay.java

150 lines
4.6 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.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.custom.common.CustomBillsToPay;
import o.C12891fKc;
import o.C15715hv;
import o.C6583cXR;
import o.InterfaceC12843fIr;
import o.nMh;
/* loaded from: classes5.dex */
public class CustomBillsToPay extends RelativeLayout {
private Context a;
private int b;
private int c;
private int d;
private int e;
private InterfaceC12843fIr f;
@BindView
TextView mAmountTitleTextView;
@BindView
TextView mAmountValueTextView;
@BindView
TextView mCompletedText;
@BindView
DefaultButton mDefaultButton;
@BindView
TextView mDueDateTextView;
@BindView
ImageView mIconDrawableImageView;
public CustomBillsToPay(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomBillsToPay, 0, 0);
this.b = obtainStyledAttributes.getColor(0, nMh.getColor(context, R.color.f2982131099805));
this.c = obtainStyledAttributes.getDimensionPixelSize(1, context.getResources().getDimensionPixelSize(R.dimen.f16092131165375));
this.d = obtainStyledAttributes.getColor(2, nMh.getColor(context, R.color.f13682131100876));
this.e = obtainStyledAttributes.getDimensionPixelSize(3, context.getResources().getDimensionPixelSize(R.dimen.f16102131165376));
obtainStyledAttributes.recycle();
this.a = context;
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131558923, (ViewGroup) this, true);
ButterKnife.c(this);
this.mAmountTitleTextView.setTextSize(2, C6583cXR.a(this.c, this.a));
this.mAmountTitleTextView.setTextColor(this.b);
this.mAmountValueTextView.setTextSize(2, C6583cXR.a(this.e, this.a));
this.mAmountValueTextView.setTextColor(this.d);
this.mDefaultButton.setOnClickListener(new View.OnClickListener(this) { // from class: o.eBq
private CustomBillsToPay b;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
CustomBillsToPay.e(this.b);
}
{
this.b = this;
}
});
}
public void setIconDrawable(Drawable drawable, int i) {
if (drawable != null) {
drawable.setColorFilter(i, PorterDuff.Mode.SRC_ATOP);
this.mIconDrawableImageView.setImageDrawable(drawable);
}
}
public void setIconDrawable(Drawable drawable) {
if (drawable != null) {
this.mIconDrawableImageView.setImageDrawable(drawable);
}
}
public void setIconDrawable(String str, int i) {
C12891fKc.azn_(nMh.getDrawable(this.a, i), this.mIconDrawableImageView, str);
}
public void setAmountTitle(String str) {
if (str != null) {
this.mAmountTitleTextView.setText(str);
}
}
public void setAmountValue(String str) {
if (str != null) {
this.mAmountValueTextView.setText(str);
}
}
public void setDueDate(String str) {
if (str != null) {
this.mDueDateTextView.setText(str);
}
}
public void setCompletedText(String str) {
this.mCompletedText.setText(str);
}
public void setPayButtonVisibility(int i) {
this.mDefaultButton.setVisibility(i);
}
public void setAmountTitleTextVisibility(int i) {
this.mAmountTitleTextView.setVisibility(i);
}
public void setAmountVisibility(int i) {
this.mAmountValueTextView.setVisibility(i);
}
public void setDueDateVisibility(int i) {
this.mDueDateTextView.setVisibility(i);
}
public void setCompletedTextVisibility(int i) {
this.mCompletedText.setVisibility(i);
}
public static /* synthetic */ void e(CustomBillsToPay customBillsToPay) {
InterfaceC12843fIr interfaceC12843fIr = customBillsToPay.f;
if (interfaceC12843fIr != null) {
interfaceC12843fIr.c();
}
}
public void setOnCustomBillsToPayClickListener(InterfaceC12843fIr interfaceC12843fIr) {
this.f = interfaceC12843fIr;
}
}