正在查看: Easycash v3.75.13 应用的 ECSearchBankActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Easycash v3.75.13 应用的 ECSearchBankActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.lingyue.easycash.authentication.bindbankcard;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatEditText;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.OnClick;
import com.lingyue.easycash.R;
import com.lingyue.easycash.activity.EasyCashWebViewActivity;
import com.lingyue.easycash.adapters.SearchBankListAdapter;
import com.lingyue.easycash.commom.EasyCashCommonActivity;
import com.lingyue.easycash.models.bank.SupportedBankBean;
import com.lingyue.easycash.utils.EasycashUmengEvent;
import com.lingyue.easycash.widght.EasycashSingleButtonDialog;
import com.lingyue.idnbaselib.framework.lifecycle.LifecycleEvent;
import com.lingyue.idnbaselib.utils.ThirdPartEventUtils;
import com.lingyue.idnbaselib.widget.OnItemClickListener;
import com.lingyue.supertoolkit.customtools.CollectionUtils;
import com.lingyue.supertoolkit.screen.IScreenShotProtectPage;
import com.yangqianguan.statistics.AutoTrackHelper;
import io.reactivex.disposables.Disposable;
import java.util.ArrayList;
import java.util.Iterator;
public class ECSearchBankActivity extends EasyCashCommonActivity implements IScreenShotProtectPage {
public static final String CURRENT_CHOOSE_POSITION = "currentChoosePosition";
public static final String PARAM_BANK_INFO = "paramBankInfo";
private ArrayList<SupportedBankBean> B;
private ArrayList<SupportedBankBean> C;
private SearchBankListAdapter D;
private int E = -1;
@BindView(R.id.et_search_bank)
AppCompatEditText etSearchBank;
@BindView(R.id.rcl_banks)
RecyclerView rvBanks;
private void U() {
this.rvBanks.setLayoutManager(new LinearLayoutManager(this));
SearchBankListAdapter searchBankListAdapter = new SearchBankListAdapter(this, this.B);
this.D = searchBankListAdapter;
searchBankListAdapter.f(this.E);
this.rvBanks.setAdapter(this.D);
this.D.g(new OnItemClickListener() {
public final void a(View view, int i, Object obj) {
ECSearchBankActivity.this.V(view, i, (SupportedBankBean) obj);
}
});
}
public void V(View view, int i, SupportedBankBean supportedBankBean) {
if (supportedBankBean == null) {
AutoTrackHelper.trackRecyclerViewItemOnClick(view, i, supportedBankBean);
return;
}
if (TextUtils.isEmpty(supportedBankBean.popWindowText) || supportedBankBean.popupDisplayed.booleanValue()) {
Intent intent = new Intent();
intent.putExtra(PARAM_BANK_INFO, supportedBankBean);
setResult(EasyCashWebViewActivity.REQUEST_CODE_CHOOSE_FROM_ALBUM, intent);
finish();
} else {
supportedBankBean.popupDisplayed = Boolean.TRUE;
Z(supportedBankBean.popWindowText);
}
AutoTrackHelper.trackRecyclerViewItemOnClick(view, i, supportedBankBean);
}
public void X(DialogInterface dialogInterface) {
ThirdPartEventUtils.D(this, EasycashUmengEvent.n2, "");
}
public void Y(String str) {
if (CollectionUtils.f(this.C)) {
return;
}
this.B.clear();
if (str.length() == 0) {
this.B.addAll(this.C);
this.D.notifyDataSetChanged();
return;
}
Iterator<SupportedBankBean> it = this.C.iterator();
while (it.hasNext()) {
SupportedBankBean next = it.next();
if (next.label.toLowerCase().contains(str.toLowerCase())) {
this.B.add(next);
}
}
this.D.notifyDataSetChanged();
}
private void Z(String str) {
EasycashSingleButtonDialog j = EasycashSingleButtonDialog.d(this).f(R.string.easycash_confirm).h(str).l(new EasycashSingleButtonDialog.OnDialogButtonClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
}
}).j(false);
j.setOnShowListener(new DialogInterface.OnShowListener() {
@Override
public final void onShow(DialogInterface dialogInterface) {
ECSearchBankActivity.this.X(dialogInterface);
}
});
j.show();
}
public static void startSearchBankActivityForResult(Activity activity, ArrayList<SupportedBankBean> arrayList, int i) {
Intent intent = new Intent(activity, (Class<?>) ECSearchBankActivity.class);
Bundle bundle = new Bundle();
bundle.putSerializable(PARAM_BANK_INFO, arrayList);
bundle.putInt(CURRENT_CHOOSE_POSITION, i);
intent.putExtras(bundle);
activity.startActivityForResult(intent, 10024);
}
@Override
protected void B(@NonNull Bundle bundle) {
super.B(bundle);
this.C = bundle.getParcelableArrayList(PARAM_BANK_INFO);
this.E = bundle.getInt(CURRENT_CHOOSE_POSITION);
ArrayList<SupportedBankBean> arrayList = new ArrayList<>();
this.B = arrayList;
arrayList.addAll(this.C);
}
@Override
protected void D() {
super.D();
ThirdPartEventUtils.m(this.etSearchBank);
U();
this.etSearchBank.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable editable) {
ECSearchBankActivity.this.Y(editable.toString());
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
});
}
@Override
protected void N(@NonNull Bundle bundle) {
super.N(bundle);
bundle.putInt(CURRENT_CHOOSE_POSITION, this.E);
bundle.putSerializable(PARAM_BANK_INFO, this.C);
}
@OnClick({R.id.iv_back})
public void clickBack() {
finish();
}
@Override
public int getLayoutID() {
return R.layout.layout_search_bank;
}
@Override
public String getTrackUrl() {
return j0.b.a(this);
}
@Override
public boolean isNeedProcessScreenShot() {
return j0.a.a(this);
}
@Override
public Disposable runOnActiveEvent(Runnable runnable) {
return com.lingyue.idnbaselib.framework.lifecycle.m.a(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnCreated(@NonNull Runnable runnable) {
return com.lingyue.idnbaselib.framework.lifecycle.m.b(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnDestroy(@NonNull Runnable runnable) {
return com.lingyue.idnbaselib.framework.lifecycle.m.c(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnEvent(@NonNull LifecycleEvent lifecycleEvent, @Nullable Runnable runnable) {
return com.lingyue.idnbaselib.framework.lifecycle.m.d(this, lifecycleEvent, runnable);
}
@Override
public Disposable runOnEvents(@NonNull LifecycleEvent[] lifecycleEventArr, @Nullable Runnable runnable) {
return com.lingyue.idnbaselib.framework.lifecycle.m.e(this, lifecycleEventArr, runnable);
}
@Override
protected void z() {
super.z();
L();
}
public static void startSearchBankActivityForResult(Fragment fragment, ArrayList<SupportedBankBean> arrayList, int i) {
Intent intent = new Intent(fragment.requireContext(), (Class<?>) ECSearchBankActivity.class);
Bundle bundle = new Bundle();
bundle.putSerializable(PARAM_BANK_INFO, arrayList);
bundle.putInt(CURRENT_CHOOSE_POSITION, i);
intent.putExtras(bundle);
fragment.startActivityForResult(intent, 10024);
}
}