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

131 lines
3.8 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.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import o.C14866gag;
import o.C14957gcv;
import o.InterfaceC14894gbR;
/* loaded from: classes5.dex */
public final class CustomAcceptDeclineConsentButtons extends LinearLayout {
private InterfaceC14894gbR<? super Boolean, C14866gag> a;
@BindView
public Button btAccept;
@BindView
public Button btDecline;
@BindView
public TextView tvContent;
@BindView
public TextView tvModelConsentTitle;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private CustomAcceptDeclineConsentButtons(Context context, byte b) {
super(context);
C14957gcv.e(context, "");
a(0, 0);
}
private /* synthetic */ CustomAcceptDeclineConsentButtons(Context context, char c) {
this(context, (byte) 0);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public CustomAcceptDeclineConsentButtons(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
C14957gcv.e(context, "");
C14957gcv.e(attributeSet, "");
a(0, 0);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public CustomAcceptDeclineConsentButtons(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
C14957gcv.e(context, "");
C14957gcv.e(attributeSet, "");
a(0, 0);
}
private final void a(int i, int i2) {
LayoutInflater.from(getContext()).inflate(R.layout.2131558891, (ViewGroup) this, true);
ButterKnife.c(this);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
layoutParams.setMargins(0, 0, 0, 0);
setLayoutParams(layoutParams);
setOrientation(1);
}
public final void b(boolean z) {
Button button = this.btAccept;
Button button2 = null;
if (button == null) {
C14957gcv.a("");
button = null;
}
button.setSelected(z);
Button button3 = this.btDecline;
if (button3 != null) {
button2 = button3;
} else {
C14957gcv.a("");
}
button2.setSelected(!z);
InterfaceC14894gbR<? super Boolean, C14866gag> interfaceC14894gbR = this.a;
if (interfaceC14894gbR != null) {
interfaceC14894gbR.invoke(Boolean.valueOf(z));
}
}
@OnClick
public final void onAcceptClicked() {
b(true);
}
@OnClick
public final void onDeclineClicked() {
b(false);
}
public final void setTvModelConsentTitle(TextView textView) {
C14957gcv.e(textView, "");
this.tvModelConsentTitle = textView;
}
public final void setTvContent(TextView textView) {
C14957gcv.e(textView, "");
this.tvContent = textView;
}
public final void setOnButtonClickListener(InterfaceC14894gbR<? super Boolean, C14866gag> interfaceC14894gbR) {
this.a = interfaceC14894gbR;
}
public final void setBtDecline(Button button) {
C14957gcv.e(button, "");
this.btDecline = button;
}
public final void setBtAccept(Button button) {
C14957gcv.e(button, "");
this.btAccept = button;
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public CustomAcceptDeclineConsentButtons(Context context) {
this(context, (char) 0);
C14957gcv.e(context, "");
}
}