59 lines
1.8 KiB
Java
59 lines
1.8 KiB
Java
|
package com.scb.phone.view.custom.investment.onboarding;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.res.TypedArray;
|
||
|
import android.graphics.drawable.Drawable;
|
||
|
import android.util.AttributeSet;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.widget.ImageView;
|
||
|
import android.widget.LinearLayout;
|
||
|
import android.widget.TextView;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import com.scb.phone.R;
|
||
|
import o.C15715hv;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class CustomImageTitleHeader extends LinearLayout {
|
||
|
private Drawable a;
|
||
|
private String b;
|
||
|
|
||
|
@BindView
|
||
|
ImageView imageViewTitle;
|
||
|
|
||
|
@BindView
|
||
|
TextView textViewDesc;
|
||
|
|
||
|
public CustomImageTitleHeader(Context context, AttributeSet attributeSet) {
|
||
|
super(context, attributeSet);
|
||
|
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomImageTitleHeader, 0, 0);
|
||
|
this.b = obtainStyledAttributes.getString(0);
|
||
|
this.a = obtainStyledAttributes.getDrawable(1);
|
||
|
obtainStyledAttributes.recycle();
|
||
|
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131559039, (ViewGroup) this, true);
|
||
|
ButterKnife.c(this);
|
||
|
if (this.a != null) {
|
||
|
this.imageViewTitle.setVisibility(0);
|
||
|
setDrawableImageTitle(this.a);
|
||
|
}
|
||
|
setTitle(this.b);
|
||
|
}
|
||
|
|
||
|
public CustomImageTitleHeader(Context context) {
|
||
|
super(context);
|
||
|
}
|
||
|
|
||
|
public CustomImageTitleHeader(Context context, AttributeSet attributeSet, int i) {
|
||
|
super(context, attributeSet, i);
|
||
|
}
|
||
|
|
||
|
public void setDrawableImageTitle(Drawable drawable) {
|
||
|
this.imageViewTitle.setImageDrawable(drawable);
|
||
|
}
|
||
|
|
||
|
public void setTitle(String str) {
|
||
|
this.textViewDesc.setText(str);
|
||
|
}
|
||
|
}
|