导航菜单

页面标题

页面副标题

Súper Préstamo v1.9.1 - PersonInfoActivity.java 源代码

正在查看: Súper Préstamo v1.9.1 应用的 PersonInfoActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.pf.prestafast.view.activity.apply;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.blankj.utilcode.util.CollectionUtils;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.analytics.ktx.AnalyticsKt;
import com.google.firebase.analytics.ktx.ParametersBuilder;
import com.google.firebase.ktx.Firebase;
import com.pf.prestafast.R$id;
import com.pf.prestafast.R$layout;
import com.pf.prestafast.base.BaseActivity;
import com.pf.prestafast.model.Api;
import com.pf.prestafast.model.resp.Glide;
import com.pf.prestafast.model.resp.NextStepResp;
import com.pf.prestafast.model.resp.PersonalMaterialResp;
import com.pf.prestafast.model.resp.TimeData;
import com.pf.prestafast.mrytNetwork.RxObservable;
import com.pf.prestafast.mrytNetwork.mrytBase.MrytBaseObserver;
import com.pf.prestafast.mrytNetwork.mrytBase.MrytBaseResponse;
import com.pf.prestafast.view.activity.ApplyProcessListActivity;
import com.pf.prestafast.view.activity.MainActivity;
import com.pf.prestafast.view.activity.apply.PersonInfoActivity;
import com.pf.prestafast.view.weight.CountdownCertificationView;
import com.pf.prestafast.view.weight.ProgressView;
import com.xiaweizi.marquee.MarqueeTextView;
import defpackage.f30;
import defpackage.ji0;
import defpackage.s51;
import defpackage.w51;
import defpackage.y5;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public final class PersonInfoActivity extends BaseActivity {
    public String h;
    public String j;
    public boolean o;
    public ji0 p;
    public Map r = new LinkedHashMap();
    public FirebaseAnalytics f = AnalyticsKt.getAnalytics(Firebase.INSTANCE);
    public int m = 1;
    public int n = 5;
    public long q = System.currentTimeMillis();

    public static final class a extends MrytBaseObserver {
        public a() {
        }

        @Override
        public void _onSuccess(MrytBaseResponse mrytBaseResponse) {
            List list;
            if (mrytBaseResponse == null || (list = (List) mrytBaseResponse.getWise()) == null) {
                return;
            }
            PersonInfoActivity personInfoActivity = PersonInfoActivity.this;
            if (CollectionUtils.isEmpty(list)) {
                return;
            }
            ((LinearLayout) personInfoActivity.D(R$id.mLlMarqueeViewContainer)).setVisibility(0);
            StringBuilder sb = new StringBuilder();
            Iterator it = list.iterator();
            while (it.hasNext()) {
                sb.append((String) it.next());
                sb.append("            ");
            }
            int i = R$id.mMtvMarquee;
            ((MarqueeTextView) personInfoActivity.D(i)).setText(sb.toString());
            ((MarqueeTextView) personInfoActivity.D(i)).g();
        }
    }

    public static final class b extends MrytBaseObserver {
        public b() {
        }

        @Override
        public void hideLoading() {
            PersonInfoActivity.this.r();
        }

        @Override
        public void showLoading() {
            PersonInfoActivity.this.A();
        }

        @Override
        public void _onSuccess(MrytBaseResponse mrytBaseResponse) {
            if (mrytBaseResponse != null) {
                PersonInfoActivity personInfoActivity = PersonInfoActivity.this;
                Iterator<T> it = ((PersonalMaterialResp) mrytBaseResponse.getWise()).getGlides().iterator();
                while (it.hasNext()) {
                    boolean z = true;
                    if (((Glide) it.next()).getStrides() != 1) {
                        z = false;
                    }
                    personInfoActivity.o = z;
                }
                List<Glide> glides = ((PersonalMaterialResp) mrytBaseResponse.getWise()).getGlides();
                ArrayList arrayList = new ArrayList();
                for (Object obj : glides) {
                    if (((Glide) obj).getReach()) {
                        arrayList.add(obj);
                    }
                }
                ji0 ji0Var = personInfoActivity.p;
                if (ji0Var != null) {
                    ji0Var.setNewData(((PersonalMaterialResp) mrytBaseResponse.getWise()).getGlides());
                }
                PersonalMaterialResp personalMaterialResp = (PersonalMaterialResp) mrytBaseResponse.getWise();
                TimeData time_data = personalMaterialResp != null ? personalMaterialResp.getTime_data() : null;
                PersonalMaterialResp personalMaterialResp2 = (PersonalMaterialResp) mrytBaseResponse.getWise();
                personInfoActivity.R(time_data, personalMaterialResp2 != null ? personalMaterialResp2.getBUramigLnre() : null);
            }
            PersonInfoActivity.this.S(4);
        }
    }

    public static final class c extends MrytBaseObserver {
        public c() {
        }

        @Override
        public void hideLoading() {
            PersonInfoActivity.this.r();
        }

        @Override
        public void showLoading() {
            PersonInfoActivity.this.A();
        }

        @Override
        public void _onSuccess(MrytBaseResponse mrytBaseResponse) {
            NextStepResp nextStepResp;
            NextStepResp.NextStep postcNext;
            PersonInfoActivity.this.O("personInfo_submit_success_a");
            y5.y().z(PersonInfoActivity.this.Q(), PersonInfoActivity.this.h, "", "7", PersonInfoActivity.this.j);
            ApplyProcessListActivity.p.a(PersonInfoActivity.this, (mrytBaseResponse == null || (nextStepResp = (NextStepResp) mrytBaseResponse.getWise()) == null || (postcNext = nextStepResp.getPostcNext()) == null) ? null : postcNext.getWhich(), PersonInfoActivity.this.h, PersonInfoActivity.this.j, PersonInfoActivity.this.m + 1, PersonInfoActivity.this.n, PersonInfoActivity.this.o);
            PersonInfoActivity.this.setResult(-1, new Intent());
            PersonInfoActivity.this.finish();
        }
    }

    public static final class d implements s51.b {
        public d() {
        }

        @Override
        public void a() {
        }

        @Override
        public void onCancel() {
            PersonInfoActivity.this.setResult(-1);
            PersonInfoActivity.this.finish();
        }
    }

    public static final void X(PersonInfoActivity personInfoActivity, View view) {
        f30.h(personInfoActivity, "this$0");
        personInfoActivity.O("person_back_click_a");
        if (personInfoActivity.o) {
            personInfoActivity.setResult(-1);
            personInfoActivity.finish();
        } else {
            s51 a2 = s51.f.a(personInfoActivity.m, personInfoActivity.n);
            a2.g(personInfoActivity.new d());
            a2.showNow(personInfoActivity.getSupportFragmentManager(), "UrgeToStayDialogFragment");
        }
    }

    public static final void Y(PersonInfoActivity personInfoActivity, View view) {
        f30.h(personInfoActivity, "this$0");
        personInfoActivity.O("personInfo_submit_a");
        personInfoActivity.U();
    }

    public View D(int i) {
        Map map = this.r;
        View view = (View) map.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        if (findViewById == null) {
            return null;
        }
        map.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final void O(String str) {
        if (MainActivity.s.b()) {
            this.f.logEvent(str, new ParametersBuilder().getBundle());
        }
    }

    public final void P() {
        this.h = getIntent().getStringExtra("behind");
        this.j = getIntent().getStringExtra("dreaming");
        this.m = getIntent().getIntExtra(FirebaseAnalytics.Param.INDEX, 1);
        this.n = getIntent().getIntExtra("total", 5);
        this.o = getIntent().getBooleanExtra("CertificationResult", false);
    }

    public final long Q() {
        return this.q;
    }

    public final void R(TimeData timeData, String str) {
        if (timeData != null) {
            if (timeData.getTime_num() == null || timeData.getTime_num().longValue() <= 0) {
                ((CountdownCertificationView) D(R$id.mCcvCountDown)).setVisibility(8);
            } else {
                int i = R$id.mCcvCountDown;
                ((CountdownCertificationView) D(i)).startCountDown(timeData.getTime_num().longValue());
                ((CountdownCertificationView) D(i)).setVisibility(0);
            }
            ((CountdownCertificationView) D(R$id.mCcvCountDown)).setNoticeMsg(timeData.getTime_msg(), timeData.getTime_log());
        }
        if (TextUtils.isEmpty(str)) {
            ((ImageView) D(R$id.ad)).setVisibility(8);
            return;
        }
        int i2 = R$id.ad;
        ((ImageView) D(i2)).setVisibility(0);
        com.bumptech.glide.Glide.with(this).load(str).into((ImageView) D(i2));
    }

    public final void S(Integer num) {
        RxObservable.getObservable(((Api) RxObservable.createService(Api.class)).httpGetTopNoticeMsgList(num), o()).subscribe(new a());
    }

    public final void T() {
        RxObservable.getObservable(((Api) RxObservable.createService(Api.class)).httpPersonalMaterial(w51.a().b(), this.h), o()).subscribe(new b());
    }

    public final void U() {
        List<Glide> data;
        HashMap hashMap = new HashMap();
        ji0 ji0Var = this.p;
        if (ji0Var != null && (data = ji0Var.getData()) != null) {
            for (Glide glide : data) {
                hashMap.put(glide.getLeave(), glide.getFlowing());
            }
        }
        hashMap.put("dreaming", this.j);
        hashMap.put("blink", this.h);
        RxObservable.getObservable(((Api) RxObservable.createService(Api.class)).httpSavePersonalMaterial(hashMap), o()).subscribe(new c());
    }

    public final void V() {
        this.p = new ji0(new ArrayList());
        int i = R$id.mRlvPersonInfoList;
        D(i).setAdapter(this.p);
        ji0 ji0Var = this.p;
        if (ji0Var == null) {
            return;
        }
        ji0Var.F((RecyclerView) D(i));
    }

    public final void W() {
        ((ImageView) D(R$id.mIvFinish)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PersonInfoActivity.X(PersonInfoActivity.this, view);
            }
        });
        ((TextView) D(R$id.mTvSubmit)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PersonInfoActivity.Y(PersonInfoActivity.this, view);
            }
        });
    }

    public final void Z() {
        int i = R$id.mRlvPersonInfoList;
        D(i).setLayoutManager(new LinearLayoutManager(this, 1, false));
        D(i).setItemAnimator(new DefaultItemAnimator());
        int i2 = R$id.mProgressView;
        ((ProgressView) D(i2)).setLeftStepText(String.valueOf(this.m));
        ((ProgressView) D(i2)).setRightStepText(String.valueOf(this.n));
        ((ProgressView) D(i2)).setProgressMax(this.n);
        ((ProgressView) D(i2)).setProgress(this.m);
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R$layout.activity_person_info);
        O("person_info_enter_a");
        P();
        Z();
        V();
        W();
        T();
    }

    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (i != 4) {
            return super.onKeyDown(i, keyEvent);
        }
        ((ImageView) D(R$id.mIvFinish)).performClick();
        return true;
    }
}