267 lines
11 KiB
Java
267 lines
11 KiB
Java
package com.scb.phone.view.custom.common;
|
|
|
|
import android.content.Context;
|
|
import android.text.Editable;
|
|
import android.text.InputFilter;
|
|
import android.util.AttributeSet;
|
|
import android.view.KeyEvent;
|
|
import android.view.View;
|
|
import android.widget.EditText;
|
|
import android.widget.TextView;
|
|
import o.C12919fLP;
|
|
import o.C14957gcv;
|
|
import o.fJJ;
|
|
import o.gjJ;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class CustomLaserIdInputWithoutHeader extends CustomLaserIdInput {
|
|
private final int a;
|
|
private final int b;
|
|
private final String c;
|
|
private final int d;
|
|
private final int e;
|
|
private final int f;
|
|
|
|
public CustomLaserIdInputWithoutHeader(Context context) {
|
|
super(context);
|
|
this.b = 12;
|
|
this.c = "^[a-zA-Z\\d]+$";
|
|
this.e = 3;
|
|
this.d = 10;
|
|
this.a = 12;
|
|
this.tvLaserIdError.setVisibility(8);
|
|
d(true);
|
|
this.laserIdHeader.setVisibility(8);
|
|
EditText editText = this.etLaserIdFirst;
|
|
C14957gcv.c(editText, "");
|
|
apl_(editText, 12);
|
|
EditText editText2 = this.etLaserIdFirst;
|
|
EditText editText3 = this.etLaserIdFirst;
|
|
C14957gcv.c(editText3, "");
|
|
editText2.addTextChangedListener(new LWm(this, 3, editText3, null, this.etLaserIdSecond));
|
|
EditText editText4 = this.etLaserIdFirst;
|
|
EditText editText5 = this.etLaserIdFirst;
|
|
C14957gcv.c(editText5, "");
|
|
editText4.setOnKeyListener(new RVV(this, editText5, null));
|
|
EditText editText6 = this.etLaserIdSecond;
|
|
C14957gcv.c(editText6, "");
|
|
apl_(editText6, 9);
|
|
EditText editText7 = this.etLaserIdSecond;
|
|
EditText editText8 = this.etLaserIdSecond;
|
|
C14957gcv.c(editText8, "");
|
|
editText7.addTextChangedListener(new LWm(this, 7, editText8, this.etLaserIdFirst, this.etLaserIdThird));
|
|
EditText editText9 = this.etLaserIdSecond;
|
|
EditText editText10 = this.etLaserIdSecond;
|
|
C14957gcv.c(editText10, "");
|
|
editText9.setOnKeyListener(new RVV(this, editText10, this.etLaserIdFirst));
|
|
EditText editText11 = this.etLaserIdThird;
|
|
C14957gcv.c(editText11, "");
|
|
apl_(editText11, 2);
|
|
EditText editText12 = this.etLaserIdThird;
|
|
EditText editText13 = this.etLaserIdThird;
|
|
C14957gcv.c(editText13, "");
|
|
editText12.addTextChangedListener(new LWm(this, 2, editText13, this.etLaserIdSecond, null));
|
|
EditText editText14 = this.etLaserIdThird;
|
|
EditText editText15 = this.etLaserIdThird;
|
|
C14957gcv.c(editText15, "");
|
|
editText14.setOnKeyListener(new RVV(this, editText15, this.etLaserIdSecond));
|
|
}
|
|
|
|
public CustomLaserIdInputWithoutHeader(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
this.b = 12;
|
|
this.c = "^[a-zA-Z\\d]+$";
|
|
this.e = 3;
|
|
this.d = 10;
|
|
this.a = 12;
|
|
this.tvLaserIdError.setVisibility(8);
|
|
d(true);
|
|
this.laserIdHeader.setVisibility(8);
|
|
EditText editText = this.etLaserIdFirst;
|
|
C14957gcv.c(editText, "");
|
|
apl_(editText, 12);
|
|
EditText editText2 = this.etLaserIdFirst;
|
|
EditText editText3 = this.etLaserIdFirst;
|
|
C14957gcv.c(editText3, "");
|
|
editText2.addTextChangedListener(new LWm(this, 3, editText3, null, this.etLaserIdSecond));
|
|
EditText editText4 = this.etLaserIdFirst;
|
|
EditText editText5 = this.etLaserIdFirst;
|
|
C14957gcv.c(editText5, "");
|
|
editText4.setOnKeyListener(new RVV(this, editText5, null));
|
|
EditText editText6 = this.etLaserIdSecond;
|
|
C14957gcv.c(editText6, "");
|
|
apl_(editText6, 9);
|
|
EditText editText7 = this.etLaserIdSecond;
|
|
EditText editText8 = this.etLaserIdSecond;
|
|
C14957gcv.c(editText8, "");
|
|
editText7.addTextChangedListener(new LWm(this, 7, editText8, this.etLaserIdFirst, this.etLaserIdThird));
|
|
EditText editText9 = this.etLaserIdSecond;
|
|
EditText editText10 = this.etLaserIdSecond;
|
|
C14957gcv.c(editText10, "");
|
|
editText9.setOnKeyListener(new RVV(this, editText10, this.etLaserIdFirst));
|
|
EditText editText11 = this.etLaserIdThird;
|
|
C14957gcv.c(editText11, "");
|
|
apl_(editText11, 2);
|
|
EditText editText12 = this.etLaserIdThird;
|
|
EditText editText13 = this.etLaserIdThird;
|
|
C14957gcv.c(editText13, "");
|
|
editText12.addTextChangedListener(new LWm(this, 2, editText13, this.etLaserIdSecond, null));
|
|
EditText editText14 = this.etLaserIdThird;
|
|
EditText editText15 = this.etLaserIdThird;
|
|
C14957gcv.c(editText15, "");
|
|
editText14.setOnKeyListener(new RVV(this, editText15, this.etLaserIdSecond));
|
|
}
|
|
|
|
public CustomLaserIdInputWithoutHeader(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
this.b = 12;
|
|
this.c = "^[a-zA-Z\\d]+$";
|
|
this.e = 3;
|
|
this.d = 10;
|
|
this.a = 12;
|
|
this.tvLaserIdError.setVisibility(8);
|
|
d(true);
|
|
this.laserIdHeader.setVisibility(8);
|
|
EditText editText = this.etLaserIdFirst;
|
|
C14957gcv.c(editText, "");
|
|
apl_(editText, 12);
|
|
EditText editText2 = this.etLaserIdFirst;
|
|
EditText editText3 = this.etLaserIdFirst;
|
|
C14957gcv.c(editText3, "");
|
|
editText2.addTextChangedListener(new LWm(this, 3, editText3, null, this.etLaserIdSecond));
|
|
EditText editText4 = this.etLaserIdFirst;
|
|
EditText editText5 = this.etLaserIdFirst;
|
|
C14957gcv.c(editText5, "");
|
|
editText4.setOnKeyListener(new RVV(this, editText5, null));
|
|
EditText editText6 = this.etLaserIdSecond;
|
|
C14957gcv.c(editText6, "");
|
|
apl_(editText6, 9);
|
|
EditText editText7 = this.etLaserIdSecond;
|
|
EditText editText8 = this.etLaserIdSecond;
|
|
C14957gcv.c(editText8, "");
|
|
editText7.addTextChangedListener(new LWm(this, 7, editText8, this.etLaserIdFirst, this.etLaserIdThird));
|
|
EditText editText9 = this.etLaserIdSecond;
|
|
EditText editText10 = this.etLaserIdSecond;
|
|
C14957gcv.c(editText10, "");
|
|
editText9.setOnKeyListener(new RVV(this, editText10, this.etLaserIdFirst));
|
|
EditText editText11 = this.etLaserIdThird;
|
|
C14957gcv.c(editText11, "");
|
|
apl_(editText11, 2);
|
|
EditText editText12 = this.etLaserIdThird;
|
|
EditText editText13 = this.etLaserIdThird;
|
|
C14957gcv.c(editText13, "");
|
|
editText12.addTextChangedListener(new LWm(this, 2, editText13, this.etLaserIdSecond, null));
|
|
EditText editText14 = this.etLaserIdThird;
|
|
EditText editText15 = this.etLaserIdThird;
|
|
C14957gcv.c(editText15, "");
|
|
editText14.setOnKeyListener(new RVV(this, editText15, this.etLaserIdSecond));
|
|
}
|
|
|
|
public final void setOnEditorActionListener(TextView.OnEditorActionListener onEditorActionListener) {
|
|
C14957gcv.e(onEditorActionListener, "");
|
|
this.etLaserIdThird.setOnEditorActionListener(onEditorActionListener);
|
|
}
|
|
|
|
public final void setImeOptions(int i) {
|
|
this.etLaserIdThird.setImeOptions(i);
|
|
}
|
|
|
|
public final void setPlaceholder(String str) {
|
|
C14957gcv.e(str, "");
|
|
EditText editText = this.etLaserIdFirst;
|
|
String substring = str.substring(this.f, this.e);
|
|
C14957gcv.c((Object) substring, "");
|
|
editText.setHint(substring);
|
|
EditText editText2 = this.etLaserIdSecond;
|
|
String substring2 = str.substring(this.e, this.d);
|
|
C14957gcv.c((Object) substring2, "");
|
|
editText2.setHint(substring2);
|
|
EditText editText3 = this.etLaserIdThird;
|
|
String substring3 = str.substring(this.d, this.a);
|
|
C14957gcv.c((Object) substring3, "");
|
|
editText3.setHint(substring3);
|
|
}
|
|
|
|
private final void apl_(EditText editText, int i) {
|
|
editText.setFilters(new InputFilter[]{new C12919fLP(this.c), new InputFilter.AllCaps(), new InputFilter.LengthFilter(i)});
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
final class LWm extends fJJ {
|
|
private final EditText a;
|
|
private CustomLaserIdInputWithoutHeader b;
|
|
private final EditText c;
|
|
private final int d;
|
|
private final EditText e;
|
|
|
|
public LWm(CustomLaserIdInputWithoutHeader customLaserIdInputWithoutHeader, int i, EditText editText, EditText editText2, EditText editText3) {
|
|
C14957gcv.e(editText, "");
|
|
this.b = customLaserIdInputWithoutHeader;
|
|
this.d = i;
|
|
this.e = editText;
|
|
this.c = editText2;
|
|
this.a = editText3;
|
|
}
|
|
|
|
@Override // o.fJJ, android.text.TextWatcher
|
|
public final void afterTextChanged(Editable editable) {
|
|
EditText editText;
|
|
C14957gcv.e(editable, "");
|
|
if (editable.length() >= this.d) {
|
|
int length = editable.length();
|
|
int i = this.d;
|
|
if (length > i) {
|
|
EditText editText2 = this.a;
|
|
if (editText2 != null) {
|
|
editText2.append(editable.subSequence(i, editable.length()).toString());
|
|
}
|
|
this.e.setText(editable.subSequence(this.b.f, this.d).toString());
|
|
}
|
|
EditText editText3 = this.a;
|
|
if (editText3 != null) {
|
|
editText3.requestFocus();
|
|
EditText editText4 = this.a;
|
|
editText4.setSelection(editText4.length());
|
|
} else {
|
|
this.e.requestFocus();
|
|
EditText editText5 = this.e;
|
|
editText5.setSelection(editText5.length());
|
|
}
|
|
}
|
|
if (editable.length() != 0 || (editText = this.c) == null) {
|
|
return;
|
|
}
|
|
editText.requestFocus();
|
|
EditText editText6 = this.c;
|
|
editText6.setSelection(editText6.length());
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
final class RVV implements View.OnKeyListener {
|
|
private final EditText a;
|
|
private final EditText c;
|
|
private CustomLaserIdInputWithoutHeader e;
|
|
|
|
public RVV(CustomLaserIdInputWithoutHeader customLaserIdInputWithoutHeader, EditText editText, EditText editText2) {
|
|
C14957gcv.e(editText, "");
|
|
this.e = customLaserIdInputWithoutHeader;
|
|
this.a = editText;
|
|
this.c = editText2;
|
|
}
|
|
|
|
@Override // android.view.View.OnKeyListener
|
|
public final boolean onKey(View view, int i, KeyEvent keyEvent) {
|
|
C14957gcv.e(view, "");
|
|
C14957gcv.e(keyEvent, "");
|
|
if (keyEvent.getAction() != 0 || i != 67 || this.c == null || !gjJ.b(this.a.getText())) {
|
|
return false;
|
|
}
|
|
this.c.requestFocus();
|
|
EditText editText = this.c;
|
|
editText.setSelection(editText.length());
|
|
return true;
|
|
}
|
|
}
|
|
}
|