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

71 lines
2.0 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.common;
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.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import o.C15715hv;
/* loaded from: classes5.dex */
public class CustomInfoArrow extends ConstraintLayout {
private boolean a;
private String b;
private String c;
@BindView
TextView descriptionTextView;
@BindView
public View divider;
private String e;
@BindView
TextView infoTextView;
@BindView
TextView titleTextView;
public CustomInfoArrow(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
LayoutInflater.from(context).inflate(R.layout.2131559042, (ViewGroup) this, true);
ButterKnife.c(this);
if (attributeSet != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomInfoArrow, 0, 0);
try {
this.e = obtainStyledAttributes.getString(3);
this.c = obtainStyledAttributes.getString(2);
this.b = obtainStyledAttributes.getString(1);
this.a = obtainStyledAttributes.getBoolean(0, false);
} finally {
obtainStyledAttributes.recycle();
}
}
setTitle(this.e);
setSubtitle(this.c);
setDescription(this.b);
this.divider.setVisibility(this.a ? 0 : 8);
}
public void setTitle(String str) {
this.titleTextView.setText(str);
}
public void setSubtitle(String str) {
this.infoTextView.setText(str);
}
public void setDescription(String str) {
if (str != null) {
this.descriptionTextView.setVisibility(0);
this.descriptionTextView.setText(str);
}
}
}