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

72 lines
2.3 KiB
Java

package com.scb.phone.view.custom.easycash;
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.LinearLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import java.util.List;
import o.C15715hv;
import o.IV;
import o.nMh;
/* loaded from: classes5.dex */
public class CustomSeparatedViews extends LinearLayout {
@BindView
public LinearLayout items;
public CustomSeparatedViews(Context context) {
this(context, null);
}
public CustomSeparatedViews(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public CustomSeparatedViews(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131559334, (ViewGroup) this, true);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomSeparatedViews, 0, 0);
try {
boolean z = obtainStyledAttributes.getBoolean(0, true);
obtainStyledAttributes.recycle();
ButterKnife.c(this);
if (z) {
this.items.setBackgroundColor(nMh.getColor(context, R.color.f14042131100912));
} else {
this.items.setBackgroundColor(nMh.getColor(context, R.color.f14012131100909));
}
} catch (Throwable th) {
obtainStyledAttributes.recycle();
throw th;
}
}
public final void d(List<View> list, int i) {
for (int i2 = 0; i2 < list.size(); i2++) {
this.items.addView(list.get(i2));
if (i2 < list.size() - 1) {
inflate(getContext(), i, this.items);
}
}
}
public final void e(List<IV> list, int i) {
this.items.removeAllViews();
for (int i2 = 0; i2 < list.size(); i2++) {
if (list.get(i2) != null) {
this.items.addView(new CustomInfoItem(getContext(), list.get(i2)));
if (i2 < list.size() - 1 && list.get(i2).c) {
inflate(getContext(), i, this.items);
}
}
}
}
}