导航菜单

页面标题

页面副标题

klikUMKM v2.0.1 - RepaymentDetailActivity.java 源代码

正在查看: klikUMKM v2.0.1 应用的 RepaymentDetailActivity.java JAVA 源代码文件

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


package com.yx.credit.indonesia.ui.repayment;

import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.viewpager2.widget.ViewPager2;
import cb.b;
import com.yx.credit.base.R$font;
import com.yx.credit.base.YxApplication;
import com.yx.credit.base.activity.BaseFragmentActivity;
import com.yx.credit.base.net.k;
import com.yx.credit.indonesia.R$id;
import com.yx.credit.indonesia.R$layout;
import com.yx.credit.indonesia.http.entity.PrepaymentProtocolRsp;
import com.yx.credit.indonesia.http.entity.RepaymentDetailRsp;
import com.yx.credit.indonesia.ui.repayment.RepaymentDetailActivity;
import com.yx.credit.indonesia.view.LoadingErrorView;
import com.yx.credit.indonesia.view.LoadingView;
import h4.h;
import j4.m;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import o2.l;
import ua.a;

public class RepaymentDetailActivity extends BaseFragmentActivity implements View.OnClickListener, a {
    public static final int j0 = 0;
    public ImageView K;
    public TextView L;
    public LoadingView M;
    public LoadingErrorView N;
    public TextView O;
    public TextView P;
    public LinearLayout Q;
    public LinearLayout R;
    public TextView S;
    public View T;
    public LinearLayout U;
    public TextView V;
    public View W;
    public LinearLayout X;
    public TextView Y;
    public View Z;

    public ViewPager2 f7635a0;

    public TextView f7636b0;

    public final ArrayList f7637c0 = new ArrayList();

    public final ArrayList f7638d0 = new ArrayList();

    public final ArrayList f7639e0 = new ArrayList();

    public k2.a f7640f0;

    public String f7641g0;

    public String f7642h0;
    public RepaymentDetailRsp.Data i0;

    public final void M() {
        if (TextUtils.isEmpty(this.f7642h0)) {
            return;
        }
        this.M.setVisibility(0);
        this.N.setVisibility(8);
        k2.a aVar = this.f7640f0;
        String str = this.f7642h0;
        aVar.getClass();
        HashMap hashMap = new HashMap();
        hashMap.put("paymentChannelCode", str);
        k.a.w("https://api.klikumkm.co.id/api/indo/paymentchannel/agreements/content", hashMap, PrepaymentProtocolRsp.class, true).M(b.a()).R(new k2.a(28, aVar));
    }

    public final void N(int i10) {
        this.f7635a0.setCurrentItem(i10);
        ArrayList arrayList = this.f7639e0;
        int size = arrayList.size();
        for (int i11 = 0; i11 < size; i11++) {
            ArrayList arrayList2 = this.f7638d0;
            if (i11 == i10) {
                ((View) arrayList.get(i11)).setVisibility(0);
                ((TextView) arrayList2.get(i11)).setTypeface(l.b(this.F, R$font.opensans_bold));
            } else {
                Typeface b3 = l.b(this.F, R$font.opensans_light);
                ((View) arrayList.get(i11)).setVisibility(4);
                ((TextView) arrayList2.get(i11)).setTypeface(b3);
            }
        }
    }

    @Override
    public final void a() {
    }

    @Override
    public final void c(List list) {
        this.M.setVisibility(8);
        this.N.setVisibility(8);
        if (h.s(list) > 3) {
            list = list.subList(0, 3);
        }
        if (h.s(list) > 1) {
            this.Q.setVisibility(0);
            if (h.s(list) == 2) {
                this.R.setGravity(8388611);
                this.U.setGravity(8388611);
            } else {
                this.R.setGravity(8388611);
                this.U.setGravity(17);
                this.X.setGravity(8388613);
            }
        } else {
            this.Q.setVisibility(8);
        }
        ArrayList arrayList = new ArrayList();
        this.f7635a0.setUserInputEnabled(false);
        for (int i10 = 0; i10 < list.size(); i10++) {
            PrepaymentProtocolRsp.Data data = (PrepaymentProtocolRsp.Data) list.get(i10);
            String content = data.getContent();
            ga.k kVar = new ga.k();
            kVar.f8558c0 = content;
            arrayList.add(kVar);
            ((LinearLayout) this.f7637c0.get(i10)).setVisibility(0);
            ((TextView) this.f7638d0.get(i10)).setText(data.getName());
        }
        this.f7635a0.setAdapter(new ca.a(this, arrayList));
        N(0);
    }

    @Override
    public final void i(RepaymentDetailRsp.Data data) {
    }

    @Override
    public void onClick(View view) {
        if (view.getId() == this.K.getId()) {
            finish();
        }
    }

    @Override
    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R$layout.activity_repayment_detail);
        Intent intent = getIntent();
        if (intent != null) {
            this.f7642h0 = intent.getStringExtra("payment_channel_code");
            this.f7641g0 = intent.getStringExtra("title");
            this.i0 = (RepaymentDetailRsp.Data) intent.getSerializableExtra("detail_data");
        }
        G();
        J();
        K();
        int i10 = 0;
        ((ViewGroup) findViewById(R$id.ll_back)).setPadding(0, m.o(YxApplication.f7325c), 0, 0);
        this.K = (ImageView) findViewById(R$id.iv_back_base_title);
        this.L = (TextView) findViewById(R$id.tv_title_base_title);
        this.M = (LoadingView) findViewById(R$id.loading_view_activity);
        this.N = (LoadingErrorView) findViewById(R$id.loading_error_view_activity);
        this.O = (TextView) findViewById(R$id.tv_card_number);
        this.P = (TextView) findViewById(R$id.tv_valid_time);
        this.Q = (LinearLayout) findViewById(R$id.ll_bottom_order);
        this.R = (LinearLayout) findViewById(R$id.ll_first);
        this.S = (TextView) findViewById(R$id.tv_first);
        this.T = findViewById(R$id.view_line_first);
        this.U = (LinearLayout) findViewById(R$id.ll_second);
        this.V = (TextView) findViewById(R$id.tv_second);
        this.W = findViewById(R$id.view_line_second);
        this.X = (LinearLayout) findViewById(R$id.ll_third);
        this.Y = (TextView) findViewById(R$id.tv_third);
        this.Z = findViewById(R$id.view_line_third);
        this.f7635a0 = (ViewPager2) findViewById(R$id.view_pager);
        this.f7636b0 = (TextView) findViewById(R$id.tv_copy);
        ArrayList arrayList = this.f7637c0;
        arrayList.clear();
        arrayList.add(this.R);
        arrayList.add(this.U);
        arrayList.add(this.X);
        ArrayList arrayList2 = this.f7638d0;
        arrayList2.clear();
        arrayList2.add(this.S);
        arrayList2.add(this.V);
        arrayList2.add(this.Y);
        ArrayList arrayList3 = this.f7639e0;
        arrayList3.clear();
        arrayList3.add(this.T);
        arrayList3.add(this.W);
        arrayList3.add(this.Z);
        this.K.setOnClickListener(this);
        final int i11 = 0;
        while (true) {
            ArrayList arrayList4 = this.f7637c0;
            if (i11 >= arrayList4.size()) {
                break;
            }
            ((LinearLayout) arrayList4.get(i11)).setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    int i12 = RepaymentDetailActivity.j0;
                    RepaymentDetailActivity.this.N(i11);
                }
            });
            i11++;
        }
        this.N.setRetryListener(new ba.a(16, this));
        this.f7640f0 = new k2.a(29, this);
        this.L.setText(this.f7641g0);
        RepaymentDetailRsp.Data data = this.i0;
        TextView textView = this.O;
        String repayCode = data.getRepayCode();
        StringBuilder sb2 = new StringBuilder();
        if (!TextUtils.isEmpty(repayCode)) {
            while (i10 < repayCode.length()) {
                sb2.append(repayCode.charAt(i10));
                int i12 = i10 + 1;
                if (i12 % 4 == 0 && i10 != repayCode.length() - 1) {
                    sb2.append(' ');
                }
                i10 = i12;
            }
        }
        textView.setText(sb2.toString());
        this.P.setText(data.getExpireDate());
        this.f7636b0.setOnClickListener(new ba.a(15, data));
        M();
    }

    @Override
    public final void s() {
        this.M.setVisibility(8);
        this.N.setVisibility(0);
        this.Q.setVisibility(8);
    }
}