what-the-bank/sources/com/scb/phone/view/custom/transferandpay/CustomTransferAndPaySource....

121 lines
3.4 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.transferandpay;
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.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.custom.ImageTextView;
import o.C12891fKc;
import o.C15715hv;
import o.nMh;
/* loaded from: classes5.dex */
public class CustomTransferAndPaySource extends CustomTransferAndPayInfo {
private boolean a;
@BindView
View divider;
@BindView
FrameLayout fmSourceInfo;
@BindView
View mSourceDividerSpace;
@BindView
public LinearLayout mSourceLinearLayout;
@BindView
ImageTextView mSourceNameTextView;
@BindView
TextView mSourceTextView;
@BindView
public TextView tvSourceAccount;
@BindView
public TextView tvSourceAccountBalance;
public CustomTransferAndPaySource(Context context) {
this(context, null);
}
public CustomTransferAndPaySource(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomTransferAndPaySource, 0, 0);
this.a = obtainStyledAttributes.getBoolean(0, true);
obtainStyledAttributes.recycle();
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131559381, (ViewGroup) this, true);
ButterKnife.c(this);
this.divider.setVisibility(this.a ? 0 : 8);
}
public void setAvatar(String str) {
setAvatar(str, R.drawable.bankicon_place_holder);
}
public void setAvatar(String str, int i) {
C12891fKc.c(getContext(), i, this.mSourceNameTextView, str, getResources().getDimensionPixelOffset(R.dimen.f27732131166539), nMh.getColor(getContext(), R.color.f3412131099849));
}
public void setAvatarFromUrl(String str) {
C12891fKc.a(this.mSourceNameTextView, str);
}
public void setText(String str) {
this.mSourceTextView.setText(str);
}
public void setSourceName(String str) {
this.mSourceNameTextView.setText(str);
}
public void setSourceNameGrayColor(Context context) {
this.mSourceNameTextView.setTextColor(nMh.getColor(context, R.color.f3092131099816));
}
public void setAccountNumber(String str) {
this.tvSourceAccount.setText(str);
}
public void setAccountBalance(String str) {
this.tvSourceAccountBalance.setVisibility(0);
this.tvSourceAccountBalance.setText(str);
}
public final void b() {
ImageTextView imageTextView = this.mSourceNameTextView;
imageTextView.c = null;
CharSequence text = imageTextView.getText();
if (text != null) {
imageTextView.setText(text.toString().replace("[scbImage]", ""));
}
}
public void setRightSpace(int i) {
this.mSourceNameTextView.setPadding(0, 0, i, 0);
}
public void setDivider(boolean z) {
this.a = z;
this.divider.setVisibility(z ? 0 : 8);
}
public void setDividerLeftPadding(int i) {
this.divider.setPadding(i, 0, 0, 0);
}
public void setFullDivider(boolean z) {
this.mSourceDividerSpace.setVisibility(z ? 8 : 0);
}
}