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

62 lines
2.2 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.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import o.C15715hv;
import o.nMh;
/* loaded from: classes5.dex */
public class CustomDisclosureCell extends RelativeLayout {
private Drawable a;
private int b;
private int c;
private boolean d;
@BindView
View divider;
private Drawable e;
@BindView
ImageView icon;
private String j;
@BindView
View ripple;
@BindView
TextView text;
public CustomDisclosureCell(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomCellOptions, 0, 0);
this.b = obtainStyledAttributes.getColor(5, nMh.getColor(context, R.color.f14042131100912));
this.j = obtainStyledAttributes.getString(4) != null ? obtainStyledAttributes.getString(4) : "";
this.e = obtainStyledAttributes.getDrawable(0) != null ? obtainStyledAttributes.getDrawable(0) : nMh.getDrawable(context, R.drawable.ic_arrow_8);
this.a = obtainStyledAttributes.getDrawable(1) != null ? obtainStyledAttributes.getDrawable(1) : nMh.getDrawable(context, R.drawable.ripple_purple);
this.c = obtainStyledAttributes.getDimensionPixelSize(2, -1);
this.d = obtainStyledAttributes.getBoolean(3, true);
obtainStyledAttributes.recycle();
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131558938, (ViewGroup) this, true);
ButterKnife.c(this);
this.text.setText(this.j);
this.text.setTextColor(this.b);
this.icon.setImageDrawable(this.e);
this.ripple.setBackground(this.a);
this.ripple.getLayoutParams().height = this.c;
if (this.d) {
this.divider.setVisibility(0);
}
}
}