Maxcredito v1.2.1版本的 MD5 值为:2605738f37f8ddb81288799ddcbfcbe8
以下内容为反编译后的 StartVerificationFragment.java 源代码,内容仅作参考
package com.getmati.mati_sdk.ui.start;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.view.View;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.facebook.appevents.internal.ViewHierarchyConstants;
import com.getmati.mati_sdk.R;
import com.getmati.mati_sdk.ui.common.KYCBaseFragment;
import com.getmati.mati_sdk.ui.data_prefetch.model.Config;
import com.getmati.mati_sdk.widgets.MatiToolbar;
import com.sensorsdata.analytics.android.sdk.SensorsDataAutoTrackHelper;
import com.sensorsdata.analytics.android.sdk.SensorsDataInstrumented;
import e.a.e;
import g.g.a.d.d.o;
import g.g.a.k.p.h;
import j.u.u;
import j.z.c.t;
import j.z.c.w;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.text.StringsKt__StringsKt;
public final class StartVerificationFragment extends KYCBaseFragment {
public final String d;
public static final class a implements View.OnClickListener {
public a() {
}
@Override
@SensorsDataInstrumented
public final void onClick(View view) {
g.g.a.d.b.a(new o("primaryButton", new g.g.a.d.d.c(), StartVerificationFragment.this.t()));
StartVerificationFragment.this.r().k();
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
public static final class b extends e {
public b(boolean z) {
super(z);
}
@Override
public void b() {
StartVerificationFragment.this.r().b();
}
}
public static final class c extends ClickableSpan {
public c() {
}
@Override
@SensorsDataInstrumented
public void onClick(View view) {
t.f(view, "widget");
StartVerificationFragment.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://getmati.com/privacypolicy")));
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
public static final class d extends ClickableSpan {
public d() {
}
@Override
@SensorsDataInstrumented
public void onClick(View view) {
t.f(view, "widget");
StartVerificationFragment.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://getmati.com/termsofservice")));
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
public StartVerificationFragment() {
super(R.layout.fragment_start_verification);
this.d = "verificationStart";
}
@Override
public void l(MatiToolbar matiToolbar) {
t.f(matiToolbar, "toolbar");
super.l(matiToolbar);
Config b2 = p().j().b();
matiToolbar.setChooseLanguageVisible((b2 != null ? b2.d() : null) == null);
matiToolbar.setBackImageVisibile(false);
}
@Override
public void onViewCreated(View view, Bundle bundle) {
t.f(view, ViewHierarchyConstants.VIEW_KEY);
super.onViewCreated(view, bundle);
RecyclerView recyclerView = (RecyclerView) h.b(this, R.id.verificationStepsRV);
recyclerView.setAdapter(new VerificationStepDescriptionAdapter(n()));
RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
Objects.requireNonNull(layoutManager, "null cannot be cast to non-null type androidx.recyclerview.widget.LinearLayoutManager");
LinearLayoutManager linearLayoutManager = (LinearLayoutManager) layoutManager;
List<g.g.a.k.e> g2 = n().g();
ArrayList arrayList = new ArrayList(u.o(g2, 10));
Iterator<T> it = g2.iterator();
while (it.hasNext()) {
arrayList.add(w.b(((g.g.a.k.e) it.next()).getClass()));
}
linearLayoutManager.setOrientation(CollectionsKt___CollectionsKt.j0(arrayList).size() == 2 ? 0 : 1);
z();
((TextView) h.b(this, R.id.action_primary)).setOnClickListener(new a());
FragmentActivity requireActivity = requireActivity();
t.e(requireActivity, "requireActivity()");
requireActivity.getOnBackPressedDispatcher().a(getViewLifecycleOwner(), new b(true));
}
@Override
public String t() {
return this.d;
}
public final void y(String str, TextView textView, String[] strArr, ClickableSpan[] clickableSpanArr) {
SpannableString spannableString = new SpannableString(str);
int length = strArr.length;
for (int i2 = 0; i2 < length; i2++) {
ClickableSpan clickableSpan = clickableSpanArr[i2];
String str2 = strArr[i2];
int J = StringsKt__StringsKt.J(str, str2, 0, false, 6, null);
spannableString.setSpan(clickableSpan, J, str2.length() + J, 33);
}
t.d(textView);
textView.setHighlightColor(0);
textView.setMovementMethod(LinkMovementMethod.getInstance());
textView.setText(spannableString, TextView.BufferType.SPANNABLE);
}
public final void z() {
d dVar = new d();
c cVar = new c();
String string = getString(R.string.label_mati_agreement);
t.e(string, "getString(R.string.label_mati_agreement)");
String string2 = getString(R.string.label_user_terms_and_cond);
t.e(string2, "getString(R.string.label_user_terms_and_cond)");
String string3 = getString(R.string.label_mati_privacy_notice);
t.e(string3, "getString(R.string.label_mati_privacy_notice)");
y(string, (TextView) requireView().findViewById(R.id.terms_and_conditions_tv_start_verification_frag), new String[]{string2, string3}, new ClickableSpan[]{dVar, cVar});
}
}