package com.scb.phone.view.custom.common; 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 butterknife.BindView; import butterknife.ButterKnife; import com.scb.phone.R; import o.C15715hv; /* loaded from: classes5.dex */ public class CustomImageWithText extends LinearLayout { @BindView ImageView ivLeftImage; @BindView ThaiTextView tvRightText; public CustomImageWithText(Context context) { super(context); aoX_(null); } public CustomImageWithText(Context context, AttributeSet attributeSet) { super(context, attributeSet); aoX_(attributeSet); } public CustomImageWithText(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); aoX_(attributeSet); } private void aoX_(AttributeSet attributeSet) { Drawable drawable; String str; LayoutInflater.from(getContext()).inflate(R.layout.2131559040, (ViewGroup) this, true); ButterKnife.c(this); if (attributeSet != null) { TypedArray obtainStyledAttributes = getContext().getTheme().obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomImageWithText, 0, 0); drawable = obtainStyledAttributes.getDrawable(0); str = obtainStyledAttributes.getString(1); obtainStyledAttributes.recycle(); } else { drawable = null; str = ""; } if (drawable != null) { this.ivLeftImage.setImageDrawable(drawable); } if (str == null || str.isEmpty()) { return; } this.tvRightText.setText(str); } }