正在查看: CreditNow v1.0.2 应用的 CatNormalQuestionActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CreditNow v1.0.2 应用的 CatNormalQuestionActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.aa.my.view;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.aa.commonuilibrary.R$id;
import com.aa.commonuilibrary.R$layout;
import com.aa.commonuilibrary.base.activity.BaseActivity;
import com.aa.commonuilibrary.base.activity.BaseVmActivity;
import com.aa.my.databinding.ActivityCatNormalQuestionBinding;
import com.aa.my.model.ItemQuestionBean;
import com.aa.my.view.CatNormalQuestionActivity;
import com.aa.my.viewmodel.CatNormalQuestionViewModel;
import com.google.android.material.tabs.TabLayout;
import com.google.android.material.tabs.b;
import defpackage.a10;
import defpackage.h40;
import defpackage.j40;
import defpackage.jp;
import defpackage.ln4;
import defpackage.tp;
import defpackage.yn2;
import java.util.ArrayList;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
@ln4(hideImageRight = true, title = "Preguntas frecuentes", titleIsCenter = false)
@Metadata
public final class CatNormalQuestionActivity extends BaseActivity<CatNormalQuestionViewModel, ActivityCatNormalQuestionBinding> {
@Metadata
public final class a {
public a() {
}
public final void a() {
CatNormalQuestionActivity.this.startActivity(new Intent("android.intent.action.DIAL", Uri.parse("tel:" + ((CatNormalQuestionViewModel) CatNormalQuestionActivity.this.O0()).getCs())));
}
public final void b() {
a10.a aVar = a10.a;
CatNormalQuestionActivity catNormalQuestionActivity = CatNormalQuestionActivity.this;
aVar.d(catNormalQuestionActivity, ((CatNormalQuestionViewModel) catNormalQuestionActivity.O0()).getEmail());
j40.a.a(CatNormalQuestionActivity.this, "Copiado con éxito", 0);
}
public final void c() {
a10.a aVar = a10.a;
CatNormalQuestionActivity catNormalQuestionActivity = CatNormalQuestionActivity.this;
aVar.d(catNormalQuestionActivity, ((CatNormalQuestionViewModel) catNormalQuestionActivity.O0()).getWhatsApp());
j40.a.a(CatNormalQuestionActivity.this, "Copiado con éxito", 0);
}
}
@Metadata
public static final class b extends jp<tp<List<? extends ItemQuestionBean>>> {
public b() {
}
@Override
public void b(Throwable th) {
CatNormalQuestionActivity.this.M0();
}
@Override
public void a(tp<List<ItemQuestionBean>> tpVar) {
CatNormalQuestionActivity.this.M0();
}
@Override
public void c(@NotNull tp<List<ItemQuestionBean>> tpVar) {
Intrinsics.checkNotNullParameter(tpVar, "resp");
CatNormalQuestionActivity.this.M0();
ArrayList arrayList = new ArrayList();
List<ItemQuestionBean> list = tpVar.data;
Intrinsics.checkNotNullExpressionValue(list, "data");
for (ItemQuestionBean itemQuestionBean : list) {
if (!q70.T(arrayList, itemQuestionBean.getIntersects())) {
String intersects = itemQuestionBean.getIntersects();
if (intersects == null) {
intersects = "field empty";
}
arrayList.add(intersects);
}
}
CatNormalQuestionActivity catNormalQuestionActivity = CatNormalQuestionActivity.this;
List<ItemQuestionBean> list2 = tpVar.data;
Intrinsics.checkNotNullExpressionValue(list2, "data");
catNormalQuestionActivity.x1(arrayList, list2);
}
}
@Metadata
public static final class c implements BaseVmActivity.b {
public c() {
}
@Override
public void a(boolean z) {
if (z) {
CatNormalQuestionActivity.this.j1();
} else {
CatNormalQuestionActivity.this.g1();
}
}
}
public final void u1(TabLayout.g gVar) {
if (gVar == null) {
return;
}
View e = gVar.e();
TextView textView = e != null ? (TextView) e.findViewById(R$id.tv_tab) : null;
if (textView == null) {
return;
}
textView.setSelected(false);
}
public final void v1(TabLayout.g gVar) {
if (gVar == null) {
return;
}
View e = gVar.e();
TextView textView = e != null ? (TextView) e.findViewById(R$id.tv_tab) : null;
if (textView == null) {
return;
}
textView.setSelected(true);
}
private final void w1() {
((CatNormalQuestionViewModel) O0()).questionList(new b());
}
public static final void y1(List list, TabLayout.g gVar, int i) {
Intrinsics.checkNotNullParameter(list, "$tabStrList");
Intrinsics.checkNotNullParameter(gVar, "p0");
gVar.r((CharSequence) list.get(i));
}
public static final void z1(CatNormalQuestionActivity catNormalQuestionActivity) {
Intrinsics.checkNotNullParameter(catNormalQuestionActivity, "this$0");
catNormalQuestionActivity.v1(((ActivityCatNormalQuestionBinding) catNormalQuestionActivity.n1()).tabLayout.z(0));
}
@Override
public void V0(Bundle bundle) {
h40.a.d(this);
((ActivityCatNormalQuestionBinding) n1()).setViewModel((CatNormalQuestionViewModel) O0());
((ActivityCatNormalQuestionBinding) n1()).setLifecycleOwner(this);
((ActivityCatNormalQuestionBinding) n1()).setClickProxy(new a());
l1();
w1();
e1(new c());
}
public final void x1(final List<String> list, List<ItemQuestionBean> list2) {
((ActivityCatNormalQuestionBinding) n1()).viewPager2.setAdapter(new yn2(this, list2, list));
new com.google.android.material.tabs.b(((ActivityCatNormalQuestionBinding) n1()).tabLayout, ((ActivityCatNormalQuestionBinding) n1()).viewPager2, new b.b() {
public final void a(TabLayout.g gVar, int i) {
CatNormalQuestionActivity.y1(list, gVar, i);
}
}).a();
((ActivityCatNormalQuestionBinding) n1()).tabLayout.addOnTabSelectedListener(new d());
((ActivityCatNormalQuestionBinding) n1()).tabLayout.postDelayed(new Runnable() {
@Override
public final void run() {
CatNormalQuestionActivity.z1(CatNormalQuestionActivity.this);
}
}, 500L);
int tabCount = ((ActivityCatNormalQuestionBinding) n1()).tabLayout.getTabCount();
for (int i = 0; i < tabCount; i++) {
View inflate = LayoutInflater.from(this).inflate(R$layout.item_question_tab, (ViewGroup) null);
((TextView) inflate.findViewById(R$id.tv_tab)).setText(list.get(i));
TabLayout.g z = ((ActivityCatNormalQuestionBinding) n1()).tabLayout.z(i);
if (z != null) {
z.o(inflate);
}
}
}
@Metadata
public static final class d implements TabLayout.d {
public d() {
}
public void b(TabLayout.g gVar) {
CatNormalQuestionActivity.this.v1(gVar);
}
public void c(TabLayout.g gVar) {
CatNormalQuestionActivity.this.u1(gVar);
}
public void a(TabLayout.g gVar) {
}
}
}