290 lines
12 KiB
Java
290 lines
12 KiB
Java
package com.scb.phone.view.custom.common;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.util.Base64;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.ImageView;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.RelativeLayout;
|
|
import android.widget.TextView;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.custom.common.CustomFundSelect;
|
|
import java.nio.charset.StandardCharsets;
|
|
import o.C14957gcv;
|
|
import o.Kic;
|
|
import o.fIF;
|
|
import o.nMh;
|
|
import o.qeC;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class CustomFundSelect extends RelativeLayout {
|
|
private static int a = 1;
|
|
private static int c = 0;
|
|
private static byte e = 6;
|
|
public final Kic b;
|
|
private fIF d;
|
|
|
|
private /* synthetic */ CustomFundSelect(Context context, byte b) {
|
|
this(context, (AttributeSet) null);
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public CustomFundSelect(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
C14957gcv.e(context, "");
|
|
CustomFundSelect customFundSelect = this;
|
|
View inflate = LayoutInflater.from(context).inflate(R.layout.2131559142, (ViewGroup) customFundSelect, false);
|
|
customFundSelect.addView(inflate);
|
|
int i = R.id.iv_icon_select_fund;
|
|
ImageView imageView = (ImageView) qeC.e(inflate, R.id.iv_icon_select_fund);
|
|
if (imageView != null) {
|
|
i = R.id.ll_layout_select_fund_info;
|
|
LinearLayout linearLayout = (LinearLayout) qeC.e(inflate, R.id.ll_layout_select_fund_info);
|
|
if (linearLayout != null) {
|
|
i = R.id.ll_layout_select_fund_subtitle;
|
|
LinearLayout linearLayout2 = (LinearLayout) qeC.e(inflate, R.id.ll_layout_select_fund_subtitle);
|
|
if (linearLayout2 != null) {
|
|
RelativeLayout relativeLayout = (RelativeLayout) inflate;
|
|
i = R.id.tv_omnibus_capsule;
|
|
TextView textView = (TextView) qeC.e(inflate, R.id.tv_omnibus_capsule);
|
|
if (textView != null) {
|
|
i = R.id.tv_select_fund_available_amount;
|
|
TextView textView2 = (TextView) qeC.e(inflate, R.id.tv_select_fund_available_amount);
|
|
if (textView2 != null) {
|
|
i = R.id.tv_select_fund_available_units;
|
|
TextView textView3 = (TextView) qeC.e(inflate, R.id.tv_select_fund_available_units);
|
|
if (textView3 != null) {
|
|
i = R.id.tv_select_fund_description;
|
|
TextView textView4 = (TextView) qeC.e(inflate, R.id.tv_select_fund_description);
|
|
if (textView4 != null) {
|
|
i = R.id.tv_select_fund_subtitle;
|
|
TextView textView5 = (TextView) qeC.e(inflate, R.id.tv_select_fund_subtitle);
|
|
if (textView5 != null) {
|
|
i = R.id.tv_select_fund_title_label;
|
|
TextView textView6 = (TextView) qeC.e(inflate, R.id.tv_select_fund_title_label);
|
|
if (textView6 != null) {
|
|
i = R.id.vw_top_divider;
|
|
View e2 = qeC.e(inflate, R.id.vw_top_divider);
|
|
if (e2 != null) {
|
|
Kic kic = new Kic(relativeLayout, imageView, linearLayout, linearLayout2, relativeLayout, textView, textView2, textView3, textView4, textView5, textView6, e2);
|
|
C14957gcv.c(kic, "");
|
|
this.b = kic;
|
|
kic.c.setOnClickListener(new View.OnClickListener(this) { // from class: o.eBO
|
|
private CustomFundSelect e;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
CustomFundSelect.a(this.e);
|
|
}
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
|
|
}
|
|
|
|
private void f(String str, Object[] objArr) {
|
|
byte[] decode = Base64.decode(str, 0);
|
|
byte[] bArr = new byte[decode.length];
|
|
for (int i = 0; i < decode.length; i++) {
|
|
bArr[i] = (byte) (decode[(decode.length - i) - 1] ^ e);
|
|
}
|
|
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
|
|
}
|
|
|
|
public final void setTopDividerVisibility(int i) {
|
|
this.b.i.setVisibility(i);
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:10:0x0055, code lost:
|
|
|
|
r0 = new android.text.SpannableString(r6);
|
|
r14 = (android.text.SpannableString) r0;
|
|
android.text.TextUtils.copySpansFrom((android.text.SpannedString) r14, 0, r6.length(), java.lang.Object.class, r0, 0);
|
|
r6 = r0;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:11:0x006e, code lost:
|
|
|
|
r14 = com.scb.phone.view.custom.common.CustomFundSelect.c + 31;
|
|
com.scb.phone.view.custom.common.CustomFundSelect.a = r14 % 128;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:12:0x0077, code lost:
|
|
|
|
if ((r14 % 2) != 0) goto L15;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:13:0x0079, code lost:
|
|
|
|
r3 = 4 / 4;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:15:0x0039, code lost:
|
|
|
|
if (r6.startsWith(",*,)") != false) goto L9;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:4:0x0026, code lost:
|
|
|
|
if ((!r6.startsWith(",*,)")) != true) goto L9;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:8:0x003b, code lost:
|
|
|
|
r4 = new java.lang.Object[1];
|
|
f(r6.substring(4), r4);
|
|
r6 = ((java.lang.String) r4[0]).intern();
|
|
r14 = r5.getText(r14);
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:9:0x0053, code lost:
|
|
|
|
if ((r14 instanceof android.text.Spanned) == false) goto L12;
|
|
*/
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r0v1, types: [android.text.SpannableString, android.text.Spannable] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final void setFundTitle(int r14) {
|
|
/*
|
|
r13 = this;
|
|
r0 = 2
|
|
int r1 = r0 % r0
|
|
int r1 = com.scb.phone.view.custom.common.CustomFundSelect.c
|
|
int r1 = r1 + 103
|
|
int r2 = r1 % 128
|
|
com.scb.phone.view.custom.common.CustomFundSelect.a = r2
|
|
int r1 = r1 % r0
|
|
r2 = 0
|
|
java.lang.String r3 = ",*,)"
|
|
r4 = 1
|
|
if (r1 != 0) goto L29
|
|
o.Kic r1 = r13.b
|
|
android.widget.TextView r1 = r1.j
|
|
android.content.Context r5 = r1.getContext()
|
|
java.lang.String r6 = r5.getString(r14)
|
|
boolean r3 = r6.startsWith(r3)
|
|
r7 = 37
|
|
int r7 = r7 / r2
|
|
r3 = r3 ^ r4
|
|
if (r3 == r4) goto L7a
|
|
goto L3b
|
|
L29:
|
|
o.Kic r1 = r13.b
|
|
android.widget.TextView r1 = r1.j
|
|
android.content.Context r5 = r1.getContext()
|
|
java.lang.String r6 = r5.getString(r14)
|
|
boolean r3 = r6.startsWith(r3)
|
|
if (r3 == 0) goto L7a
|
|
L3b:
|
|
r3 = 4
|
|
java.lang.String r6 = r6.substring(r3)
|
|
java.lang.Object[] r4 = new java.lang.Object[r4]
|
|
r13.f(r6, r4)
|
|
r2 = r4[r2]
|
|
java.lang.String r2 = (java.lang.String) r2
|
|
java.lang.String r6 = r2.intern()
|
|
java.lang.CharSequence r14 = r5.getText(r14)
|
|
boolean r2 = r14 instanceof android.text.Spanned
|
|
if (r2 == 0) goto L6e
|
|
android.text.SpannableString r0 = new android.text.SpannableString
|
|
r0.<init>(r6)
|
|
r7 = r14
|
|
android.text.SpannedString r7 = (android.text.SpannedString) r7
|
|
r8 = 0
|
|
int r9 = r6.length()
|
|
java.lang.Class<java.lang.Object> r10 = java.lang.Object.class
|
|
r14 = r0
|
|
android.text.SpannableString r14 = (android.text.SpannableString) r14
|
|
r12 = 0
|
|
r11 = r0
|
|
android.text.TextUtils.copySpansFrom(r7, r8, r9, r10, r11, r12)
|
|
r6 = r0
|
|
goto L7a
|
|
L6e:
|
|
int r14 = com.scb.phone.view.custom.common.CustomFundSelect.c
|
|
int r14 = r14 + 31
|
|
int r2 = r14 % 128
|
|
com.scb.phone.view.custom.common.CustomFundSelect.a = r2
|
|
int r14 = r14 % r0
|
|
if (r14 != 0) goto L7a
|
|
int r3 = r3 / r3
|
|
L7a:
|
|
r1.setText(r6)
|
|
return
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.custom.common.CustomFundSelect.setFundTitle(int):void");
|
|
}
|
|
|
|
public final void setFundCode(String str) {
|
|
this.b.h.setText(str);
|
|
}
|
|
|
|
public final void setFundIconEmpty() {
|
|
this.b.a.setImageDrawable(nMh.getDrawable(getContext(), R.drawable.ic_dark_chevron_up));
|
|
}
|
|
|
|
public final void setFundIconEdit() {
|
|
this.b.a.setImageDrawable(nMh.getDrawable(getContext(), R.drawable.ic_accent_edit));
|
|
}
|
|
|
|
public final void setDescription(String str) {
|
|
this.b.g.setText(str);
|
|
}
|
|
|
|
public final void setInfo(String str, String str2) {
|
|
Kic kic = this.b;
|
|
if (kic.e.getVisibility() != 0) {
|
|
this.b.e.setVisibility(0);
|
|
}
|
|
kic.d.setText(str);
|
|
kic.f.setText(str2);
|
|
}
|
|
|
|
public final void setEnableFund(boolean z) {
|
|
setEnabled(z);
|
|
int i = z ? R.color.f2982131099805 : R.color.f3412131099849;
|
|
float f = z ? 1.0f : 0.5f;
|
|
Kic kic = this.b;
|
|
kic.h.setTextColor(nMh.getColor(getContext(), i));
|
|
kic.h.setEnabled(z);
|
|
kic.a.setAlpha(f);
|
|
}
|
|
|
|
public final void setOmnibusCapsule(boolean z) {
|
|
this.b.b.setVisibility(z ? 0 : 8);
|
|
}
|
|
|
|
public static /* synthetic */ void a(CustomFundSelect customFundSelect) {
|
|
C14957gcv.e(customFundSelect, "");
|
|
fIF fif = customFundSelect.d;
|
|
if (fif == null) {
|
|
C14957gcv.a("");
|
|
fif = null;
|
|
}
|
|
fif.b(customFundSelect);
|
|
}
|
|
|
|
public final void setOnFundSelectClickListener(fIF fif) {
|
|
C14957gcv.e(fif, "");
|
|
this.d = fif;
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
public CustomFundSelect(Context context) {
|
|
this(context, (byte) 0);
|
|
C14957gcv.e(context, "");
|
|
}
|
|
}
|