正在查看: 鲸鱼借条 v4.1.2 应用的 MT2ACT.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 鲸鱼借条 v4.1.2 应用的 MT2ACT.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.yuxianghua.ui.activitys;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.core.app.NotificationCompat;
import butterknife.BindView;
import com.base.commonlibrary.base.baseapp.AppActivityManager;
import com.base.commonlibrary.base.baserx.RxSchedulers;
import com.base.commonlibrary.netstate.ComNetWorkUtil;
import com.base.commonlibrary.views.TitleLayout;
import com.yuxianghua.mjyp.BMAG01ACT;
import com.yuxianghua.mjyp.app.api.Api;
import com.yuxianghua.mjyp.app.api.AppConfig;
import com.yuxianghua.mjyp.app.base.BaseBindActivity;
import com.yuxianghua.mjyp.app.base.RxSubscriber;
import com.yuxianghua.ui.bean.PostponeBean;
import com.yuxianghua.ui.bean.PostponeStatusBean;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import rx.Subscriber;
import yhgjgdf.ijnhjfyd.ikbujfjfnjkif.R;
public class MT2ACT extends BaseBindActivity {
@BindView(R.id.btn_cancle)
Button btnCancle;
@BindView(R.id.btn_ok)
Button btnOk;
private CountDownTimer countDownTimer;
@BindView(R.id.day_num)
TextView dayNum;
@BindView(R.id.fail_reason)
TextView failReason;
@BindView(R.id.img_status)
ImageView imgStatus;
@BindView(R.id.ll_content)
LinearLayout llContent;
@BindView(R.id.ll_fail)
LinearLayout llFail;
@BindView(R.id.ll_success)
LinearLayout llSuccess;
@BindView(R.id.ll_top)
LinearLayout llTop;
private String msg;
private String orderNo;
@BindView(R.id.p_date)
TextView pDate;
@BindView(R.id.pay_money)
TextView payMoney;
@BindView(R.id.rl_time)
RelativeLayout rl_time;
@BindView(R.id.tip)
TextView tip;
@BindView(R.id.title)
TitleLayout title;
@BindView(R.id.tv_s_tip)
TextView tvSTip;
@BindView(R.id.xq_day)
TextView xqDay;
@Override
protected boolean canLoadMore() {
return false;
}
@Override
public int getLayoutId() {
return R.layout.activity_renewal_status;
}
@Override
public void initPresenter() {
}
@Override
protected void loadMore() {
}
@Override
protected void refresh() {
}
@Override
public void initView(Bundle bundle) {
Bundle extras = getIntent().getExtras();
final int i = extras.getInt(NotificationCompat.CATEGORY_STATUS);
this.orderNo = extras.getString(AppConfig.ORDERID);
this.msg = extras.getString(NotificationCompat.CATEGORY_MESSAGE);
setView((PostponeBean) extras.getSerializable("postponeBean"), i);
this.btnOk.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MT2ACT.this.lambda$initView$0$MT2ACT(i, view);
}
});
this.btnCancle.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AppActivityManager.getAppManager().returnToActivity(BMAG01ACT.class);
}
});
startCountDown();
}
public void lambda$initView$0$MT2ACT(int i, View view) {
if (i == 0) {
String charSequence = this.failReason.getText().toString();
if (TextUtils.isEmpty(charSequence)) {
return;
}
showShortToast(charSequence);
return;
}
String charSequence2 = ((TextView) view).getText().toString();
if (charSequence2.equals(getResources().getString(R.string.back_home))) {
AppActivityManager.getAppManager().returnToActivity(BMAG01ACT.class);
finish();
} else if (getResources().getString(R.string.refresh_see_result).equals(charSequence2)) {
checkPostponeStatus(true);
} else {
finish();
}
}
public void setView(PostponeBean postponeBean, int i) {
if (i == 1) {
this.llSuccess.setVisibility(0);
this.llFail.setVisibility(8);
this.rl_time.setVisibility(8);
this.btnCancle.setVisibility(8);
this.tvSTip.setText(getResources().getString(R.string.deal_wait));
this.imgStatus.setImageResource(R.mipmap.renewaling);
if (postponeBean != null) {
BigDecimal postponeAmount = postponeBean.getPostponeAmount();
String dueDate = postponeBean.getDueDate();
Integer countDay = postponeBean.getCountDay();
this.payMoney.setText(getString(R.string.money_fh) + postponeAmount);
this.xqDay.setText(countDay + getString(R.string.day));
this.dayNum.setText(dueDate);
}
this.btnOk.setText(getResources().getString(R.string.refresh_see_result));
this.tip.setText(getResources().getString(R.string.wait_for_bank));
return;
}
if (i == 2) {
this.llSuccess.setVisibility(0);
this.llFail.setVisibility(8);
this.btnCancle.setVisibility(8);
this.rl_time.setVisibility(0);
this.btnOk.setText(getResources().getString(R.string.back_home));
this.tvSTip.setText(getResources().getString(R.string.apply_success));
this.imgStatus.setImageResource(R.mipmap.ren_success);
this.tip.setText(getResources().getString(R.string.credit_improved));
if (postponeBean != null) {
BigDecimal postponeAmount2 = postponeBean.getPostponeAmount();
String dueDate2 = postponeBean.getDueDate();
Integer countDay2 = postponeBean.getCountDay();
this.payMoney.setText(getString(R.string.money_fh) + postponeAmount2);
this.xqDay.setText(countDay2 + getString(R.string.day));
this.dayNum.setText(dueDate2);
return;
}
return;
}
this.llSuccess.setVisibility(8);
this.llFail.setVisibility(0);
this.btnCancle.setVisibility(0);
this.tvSTip.setText(getResources().getString(R.string.apply_failure));
this.imgStatus.setImageResource(R.mipmap.ren_fail);
this.tip.setText(getResources().getString(R.string.value_your_credit));
this.btnOk.setText(getResources().getString(R.string.continue_apply));
String str = this.msg;
if (str != null) {
this.failReason.setText(str);
}
this.pDate.setText(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(System.currentTimeMillis())));
}
protected void checkPostponeStatus(boolean z) {
if (ComNetWorkUtil.isNetworkAvailable(this.mContext)) {
if (this.orderNo != null) {
this.mRxManager.add(Api.getDefault().checkPostponeStatus(this.orderNo).compose(RxSchedulers.io_main()).subscribe((Subscriber<? super R>) new RxSubscriber<PostponeStatusBean>(this.mContext, z) {
@Override
public void _onNext(PostponeStatusBean postponeStatusBean) {
if (postponeStatusBean.getCode() == 2030) {
PostponeStatusBean.ResultBean result = postponeStatusBean.getResult();
PostponeBean postponeBean = new PostponeBean();
postponeBean.setDueDate(result.getDueDate());
postponeBean.setPostponeAmount(result.getPostponeAmount());
postponeBean.setCountDay(Integer.valueOf(result.getCountDay()));
MT2ACT.this.setView(postponeBean, 1);
return;
}
if (postponeStatusBean.getCode() == 2031) {
PostponeStatusBean.ResultBean result2 = postponeStatusBean.getResult();
PostponeBean postponeBean2 = new PostponeBean();
postponeBean2.setDueDate(result2.getDueDate());
postponeBean2.setPostponeAmount(result2.getPostponeAmount());
postponeBean2.setCountDay(Integer.valueOf(result2.getCountDay()));
MT2ACT.this.setView(postponeBean2, 2);
return;
}
if (postponeStatusBean.getCode() != 2029) {
MT2ACT.this.setView(null, 2);
return;
}
MT2ACT.this.msg = postponeStatusBean.getMessage();
MT2ACT.this.setView(null, 0);
}
@Override
protected void _onError(String str) {
MT2ACT.this.showShortToast(str);
}
}));
return;
}
return;
}
showShortToast(getResources().getString(R.string.net_error));
}
@Override
protected void onDestroy() {
super.onDestroy();
stopCountDown();
}
protected void startCountDown() {
if (this.countDownTimer == null) {
this.countDownTimer = new CountDownTimer(10000L, 1000L) {
@Override
public void onTick(long j) {
if (j == 25000) {
MT2ACT.this.checkPostponeStatus(false);
}
}
@Override
public void onFinish() {
MT2ACT.this.checkPostponeStatus(false);
}
};
}
this.countDownTimer.start();
}
private void stopCountDown() {
CountDownTimer countDownTimer = this.countDownTimer;
if (countDownTimer != null) {
countDownTimer.cancel();
this.countDownTimer = null;
}
}
}