what-the-bank/sources/com/scb/phone/view/custom/easycash/CustomEasyCashSectionLabel....

63 lines
2.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.easycash;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import o.C15715hv;
import o.nMh;
/* loaded from: classes5.dex */
public class CustomEasyCashSectionLabel extends LinearLayout {
@BindView
View bottomDivider;
@BindView
TextView textView;
@BindView
View topDivider;
public CustomEasyCashSectionLabel(Context context) {
this(context, null);
}
public CustomEasyCashSectionLabel(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public CustomEasyCashSectionLabel(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131559006, (ViewGroup) this, true);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomEasyCashSectionLabel, 0, 0);
try {
String string = obtainStyledAttributes.getString(2);
boolean z = obtainStyledAttributes.getBoolean(0, false);
boolean z2 = obtainStyledAttributes.getBoolean(1, false);
obtainStyledAttributes.recycle();
ButterKnife.c(this);
if (string != null) {
this.textView.setText(z2 ? string.toUpperCase() : string);
}
if (z) {
this.textView.setBackground(nMh.getDrawable(context, R.drawable.border_gray_bg_lighter_gray));
}
} catch (Throwable th) {
obtainStyledAttributes.recycle();
throw th;
}
}
public void setText(String str) {
this.textView.setText(str);
}
}