what-the-bank/sources/com/scb/phone/view/custom/easycash/CustomEasyCashLoanInformati...

130 lines
4.0 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.easycash;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.custom.ImageTextView;
import com.scb.phone.view.custom.easycash.CustomDeltaSlider;
import java.util.List;
import o.AQw;
import o.C12891fKc;
import o.IS;
import o.IV;
import o.gjJ;
import o.nMh;
/* loaded from: classes5.dex */
public class CustomEasyCashLoanInformationCard extends LinearLayout {
@BindView
protected CustomSeparatedViews detailViews;
@BindView
protected ImageTextView loanName;
@BindView
protected CustomDeltaSliderPressed slider;
/* loaded from: classes5.dex */
public interface LWm {
void c(double d);
void d();
}
public CustomEasyCashLoanInformationCard(Context context) {
this(context, null);
}
public CustomEasyCashLoanInformationCard(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public CustomEasyCashLoanInformationCard(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131559002, (ViewGroup) this, true);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AQw.Sts.CustomEasyCashLoanInformationCard, 0, 0);
try {
int dimensionPixelSize = obtainStyledAttributes.getDimensionPixelSize(1, (int) TypedValue.applyDimension(1, 24.0f, getResources().getDisplayMetrics()));
Drawable drawable = obtainStyledAttributes.getDrawable(0);
CharSequence text = obtainStyledAttributes.getText(2);
obtainStyledAttributes.recycle();
ButterKnife.c(this);
setLoanImageSize(dimensionPixelSize);
setLoanImage(drawable);
setLoanName(text);
} catch (Throwable th) {
obtainStyledAttributes.recycle();
throw th;
}
}
public void setLoanImage(Drawable drawable) {
if (drawable != null) {
this.loanName.setDrawable(drawable);
}
}
public void setLoanImageFromUrl(String str) {
if (str != null) {
C12891fKc.a(this.loanName, str);
}
}
public void setLoanName(CharSequence charSequence) {
if (gjJ.b(charSequence)) {
return;
}
this.loanName.setText(charSequence);
}
public void setLoanImageSize(int i) {
this.loanName.setImageSize(i);
}
public void setSlider(IS is, LWm lWm) {
if (is != null && lWm != null) {
this.slider.b(is, new CustomDeltaSlider.HBt(this, lWm) { // from class: com.scb.phone.view.custom.easycash.CustomEasyCashLoanInformationCard.4
private CustomEasyCashLoanInformationCard c;
private LWm d;
@Override // com.scb.phone.view.custom.easycash.CustomDeltaSlider.HBt
public final void c(double d) {
}
{
this.c = this;
this.d = lWm;
}
@Override // com.scb.phone.view.custom.easycash.CustomDeltaSlider.HBt
public final void d(double d) {
this.d.d();
}
@Override // com.scb.phone.view.custom.easycash.CustomDeltaSlider.HBt
public final void b(double d) {
this.d.c(d);
}
});
}
this.slider.setBackgroundColor(nMh.getColor(getContext(), R.color.f14042131100912));
}
public void setEnableSlider(boolean z) {
this.slider.setEnable(z);
}
public void setLoanDetails(List<IV> list) {
this.detailViews.e(list, R.layout.2131559336);
}
}