导航菜单

页面标题

页面副标题

Easycash v3.75.13 - BankAccountActivity.java 源代码

正在查看: Easycash v3.75.13 应用的 BankAccountActivity.java JAVA 源代码文件

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


package com.fintopia.lender.module.profile;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.OnClick;
import com.fintopia.lender.R;
import com.fintopia.lender.module.baseui.LenderCommonActivity;
import com.fintopia.lender.module.profile.model.BankInfo;
import com.lingyue.idnbaselib.framework.lifecycle.LifecycleEvent;
import com.lingyue.idnbaselib.framework.lifecycle.m;
import com.lingyue.idnbaselib.utils.EcFormatUtil;
import com.lingyue.supertoolkit.widgets.BaseUtils;
import com.veda.android.imageloaderlib.Imager;
import io.reactivex.disposables.Disposable;

public class BankAccountActivity extends LenderCommonActivity {
    public static final String BANK_INFO = "bankInfo";
    public static final String CUSTOMER_SERVICE_PHONE = "customer_service_phone";

    @BindView(5016)
    ImageView ivBankLogo;

    @BindView(5115)
    LinearLayout llBank;

    @BindView(5148)
    LinearLayout llNoBank;

    @BindView(5560)
    TextView tvAccountNumber;

    @BindView(5590)
    TextView tvBankAccountName;

    @BindView(5592)
    TextView tvBankName;

    @BindView(5800)
    TextView tvPhoneNumber;

    private BankInfo f139u;

    private String f140v;

    private void K() {
        this.tvBankName.setText(this.f139u.bankName);
        if (TextUtils.isEmpty(this.f139u.accountNumber) || this.f139u.accountNumber.length() < 4) {
            this.tvAccountNumber.setVisibility(8);
        } else {
            this.tvAccountNumber.setText(getString(R.string.lender_bank_account_last_four_digit) + " " + EcFormatUtil.w(this.f139u.accountNumber));
        }
        this.tvPhoneNumber.setText(this.f140v);
        this.tvBankAccountName.setText(this.f139u.name);
        Imager.a().b(this, this.f139u.bankLogoUrl, this.ivBankLogo);
    }

    public static void startBankAccountActivity(Activity activity, BankInfo bankInfo) {
        Intent intent = new Intent(activity, (Class<?>) BankAccountActivity.class);
        Bundle bundle = new Bundle();
        bundle.putSerializable(BANK_INFO, bankInfo);
        intent.putExtras(bundle);
        activity.startActivity(intent);
    }

    @Override
    protected void A() {
        super.A();
        if (this.f139u == null) {
            this.llBank.setVisibility(8);
            this.llNoBank.setVisibility(0);
        } else {
            K();
            this.llBank.setVisibility(0);
            this.llNoBank.setVisibility(8);
        }
    }

    @Override
    protected void G(@NonNull Bundle bundle) {
        super.G(bundle);
        bundle.putSerializable(BANK_INFO, this.f139u);
        bundle.putString(CUSTOMER_SERVICE_PHONE, this.f140v);
    }

    @Override
    public int getLayoutID() {
        return R.layout.lender_activity_bank_account;
    }

    @Override
    protected void init() {
        super.init();
        this.f140v = this.userSession.f().customerServiceNumber;
    }

    @OnClick({5118})
    void onClickedCallTel() {
        if (BaseUtils.l() || TextUtils.isEmpty(this.f140v)) {
            return;
        }
        startActivity(new Intent("android.intent.action.DIAL", Uri.parse("tel:" + this.f140v)));
    }

    @Override
    public Disposable runOnActiveEvent(Runnable runnable) {
        return m.a(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnCreated(@NonNull Runnable runnable) {
        return m.b(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnDestroy(@NonNull Runnable runnable) {
        return m.c(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnEvent(@NonNull LifecycleEvent lifecycleEvent, @Nullable Runnable runnable) {
        return m.d(this, lifecycleEvent, runnable);
    }

    @Override
    public Disposable runOnEvents(@NonNull LifecycleEvent[] lifecycleEventArr, @Nullable Runnable runnable) {
        return m.e(this, lifecycleEventArr, runnable);
    }

    @Override
    protected void y(@NonNull Bundle bundle) {
        super.y(bundle);
        this.f139u = (BankInfo) bundle.getSerializable(BANK_INFO);
        this.f140v = bundle.getString(CUSTOMER_SERVICE_PHONE);
    }
}