what-the-bank/sources/com/scb/phone/view/custom/investment/onboarding/CustomTextViewNavigation.java

93 lines
2.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.investment.onboarding;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import o.C15715hv;
/* loaded from: classes5.dex */
public class CustomTextViewNavigation extends LinearLayout {
private String a;
private int b;
private String c;
private RVV d;
private int e;
@BindView
TextView labelTitle;
@BindView
RelativeLayout layoutDetailNavigation;
@BindView
public TextView textViewDesc;
/* loaded from: classes5.dex */
public interface RVV {
void b();
}
public CustomTextViewNavigation(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomTextViewNavigation, 0, 0);
this.a = obtainStyledAttributes.getString(3);
this.c = obtainStyledAttributes.getString(2);
this.b = obtainStyledAttributes.getInt(1, -1);
this.e = obtainStyledAttributes.getInt(0, -1);
obtainStyledAttributes.recycle();
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131559370, (ViewGroup) this, true);
ButterKnife.c(this);
setLabelTitle(this.a);
setPlaceholderText(this.c);
int i = this.b;
if (-1 != i) {
this.textViewDesc.setMaxLines(i);
}
int i2 = this.e;
if (-1 != i2) {
this.textViewDesc.setLines(i2);
}
}
public CustomTextViewNavigation(Context context) {
super(context);
}
public void setLabelTitle(String str) {
this.labelTitle.setText(str);
}
public void setPlaceholderText(String str) {
this.textViewDesc.setHint(str);
}
public void setDescriptionText(String str) {
this.textViewDesc.setText(str);
}
public void setEnableNavigationArea(boolean z) {
this.layoutDetailNavigation.setEnabled(z);
}
@OnClick
public void onClickDetailNavigation() {
RVV rvv = this.d;
if (rvv != null) {
rvv.b();
}
}
public void setOnClickDetailNavigationCompletion(RVV rvv) {
this.d = rvv;
}
}