导航菜单

页面标题

页面副标题

EfectivoYa v2.3 - FFAuthActivity.java 源代码

正在查看: EfectivoYa v2.3 应用的 FFAuthActivity.java JAVA 源代码文件

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


package com.mxff.ffxxmm.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import androidx.exifinterface.media.ExifInterface;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import c1.a;
import com.gyf.immersionbar.l;
import com.mxff.ffxxmm.R$id;
import com.mxff.ffxxmm.R$mipmap;
import com.mxff.ffxxmm.activity.FFAuthActivity;
import com.mxff.ffxxmm.databinding.FfActivityAuthBinding;
import com.mxff.ffxxmm.fragment.FFBankInfoFragment;
import com.mxff.ffxxmm.fragment.FFIdCardFragment;
import com.mxff.ffxxmm.fragment.FFInfoFragment;
import com.mxff.ffxxmm.utils.k;
import com.mxff.ffxxmm.viewmodel.BaseViewModel;
import java.util.Iterator;
import java.util.Objects;

public class FFAuthActivity extends BaseActivity<BaseViewModel, FfActivityAuthBinding> {

    private int f2066l = 1;

    private void B(int i2) {
        FragmentManager supportFragmentManager = getSupportFragmentManager();
        FragmentTransaction beginTransaction = supportFragmentManager.beginTransaction();
        Iterator<Fragment> it = supportFragmentManager.getFragments().iterator();
        while (it.hasNext()) {
            beginTransaction.hide(it.next());
        }
        if (i2 == 1) {
            if (supportFragmentManager.findFragmentByTag("1") == null) {
                beginTransaction.add(R$id.flFragmentContainer, (Fragment) new FFIdCardFragment(), "1");
            } else {
                Fragment findFragmentByTag = supportFragmentManager.findFragmentByTag("1");
                Objects.requireNonNull(findFragmentByTag);
                beginTransaction.show(findFragmentByTag);
            }
            this.f2065i.customToolBar.setCenterTitle(a.a("Información de identidad"));
        } else if (i2 == 2) {
            if (supportFragmentManager.findFragmentByTag(ExifInterface.GPS_MEASUREMENT_2D) == null) {
                beginTransaction.add(R$id.flFragmentContainer, (Fragment) new FFInfoFragment(), ExifInterface.GPS_MEASUREMENT_2D);
            } else {
                Fragment findFragmentByTag2 = supportFragmentManager.findFragmentByTag(ExifInterface.GPS_MEASUREMENT_2D);
                Objects.requireNonNull(findFragmentByTag2);
                beginTransaction.show(findFragmentByTag2);
            }
            this.f2065i.customToolBar.setCenterTitle(a.a("Completar información"));
        } else if (i2 == 3) {
            if (supportFragmentManager.findFragmentByTag(ExifInterface.GPS_MEASUREMENT_3D) == null) {
                beginTransaction.add(R$id.flFragmentContainer, (Fragment) new FFBankInfoFragment(), ExifInterface.GPS_MEASUREMENT_3D);
            } else {
                Fragment findFragmentByTag3 = supportFragmentManager.findFragmentByTag(ExifInterface.GPS_MEASUREMENT_3D);
                Objects.requireNonNull(findFragmentByTag3);
                beginTransaction.show(findFragmentByTag3);
            }
            this.f2065i.customToolBar.setCenterTitle(a.a("Tarjeta bancaria"));
        }
        beginTransaction.commitAllowingStateLoss();
    }

    private void C() {
        int i2 = this.f2066l;
        if (i2 == 1) {
            this.f2065i.ivStepOne.setImageResource(R$mipmap.ff_ic_auth_2);
            this.f2065i.ivStepTwo.setImageResource(R$mipmap.ff_ic_auth_3);
            this.f2065i.ivStepThree.setImageResource(R$mipmap.ff_ic_auth_4);
            this.f2065i.ivStepLineOne.setImageResource(R$mipmap.ff_ic_auth_5);
            this.f2065i.ivStepLineTwo.setImageResource(R$mipmap.ff_ic_auth_6);
            return;
        }
        if (i2 == 2) {
            this.f2065i.ivStepOne.setImageResource(R$mipmap.ff_ic_auth_2);
            this.f2065i.ivStepTwo.setImageResource(R$mipmap.ff_ic_auth_7);
            this.f2065i.ivStepThree.setImageResource(R$mipmap.ff_ic_auth_4);
            this.f2065i.ivStepLineOne.setImageResource(R$mipmap.ff_ic_auth_5);
            this.f2065i.ivStepLineTwo.setImageResource(R$mipmap.ff_ic_auth_6);
            return;
        }
        if (i2 != 3) {
            return;
        }
        this.f2065i.ivStepOne.setImageResource(R$mipmap.ff_ic_auth_2);
        this.f2065i.ivStepTwo.setImageResource(R$mipmap.ff_ic_auth_7);
        this.f2065i.ivStepThree.setImageResource(R$mipmap.ff_ic_auth_8);
        this.f2065i.ivStepLineOne.setImageResource(R$mipmap.ff_ic_auth_5);
        this.f2065i.ivStepLineTwo.setImageResource(R$mipmap.ff_ic_auth_5);
    }

    public void E(View view) {
        int i2 = this.f2066l;
        if (i2 == 1) {
            finish();
            return;
        }
        int i3 = i2 - 1;
        this.f2066l = i3;
        B(i3);
        C();
    }

    public static void F(Context context, int i2) {
        Intent intent = new Intent(context, (Class<?>) FFAuthActivity.class);
        intent.putExtra("index", i2);
        context.startActivity(intent);
    }

    public void D() {
        int i2 = this.f2066l + 1;
        this.f2066l = i2;
        B(i2);
        C();
    }

    @Override
    public boolean onKeyDown(int i2, KeyEvent keyEvent) {
        if (i2 != 4) {
            return super.onKeyDown(i2, keyEvent);
        }
        int i3 = this.f2066l;
        if (i3 == 1) {
            return super.onKeyDown(i2, keyEvent);
        }
        int i4 = i3 - 1;
        this.f2066l = i4;
        B(i4);
        C();
        return true;
    }

    @Override
    protected void r() {
    }

    @Override
    protected void u(Bundle bundle) {
        this.f2066l = getIntent().getIntExtra("index", 1);
        l.l0(this).f0(this.f2065i.customToolBar).D();
        k.a(this.f2065i.customToolBar, "", new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                FFAuthActivity.this.E(view);
            }
        });
        C();
        B(this.f2066l);
    }
}