导航菜单

页面标题

页面副标题

大众借. v4.1.2 - MT5ACT.java 源代码

正在查看: 大众借. v4.1.2 应用的 MT5ACT.java JAVA 源代码文件

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


package com.shiliuj.ui.activitys;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.OnClick;
import com.base.commonlibrary.base.BaseResult;
import com.base.commonlibrary.base.baserx.RxSchedulers;
import com.base.commonlibrary.views.ClearEditText;
import com.base.commonlibrary.views.TitleLayout;
import com.shiliuj.mjyp.app.api.Api;
import com.shiliuj.mjyp.app.base.BaseBindActivity;
import com.shiliuj.mjyp.app.base.RxSubscriber;
import com.shiliuj.ui.bean.PwdBean;
import com.shiliuj.ui.views.EditTextChangeListener;
import com.shiliuj.ui.views.SureAndCancelDialog;

public class MT5ACT extends BaseBindActivity {

    @BindView(2131296385)
    Button btnGet;

    @BindView(2131296616)
    View line;

    @BindView(2131296751)
    ClearEditText oldPwd;

    @BindView(2131296429)
    ClearEditText pwd;

    @BindView(2131296813)
    RelativeLayout rl;

    @BindView(2131296998)
    TitleLayout title;

    protected boolean canLoadMore() {
        return false;
    }

    public int getLayoutId() {
        return 2131492921;
    }

    protected void loadMore() {
    }

    protected void refresh() {
    }

    public void initPresenter() {
        new EditTextChangeListener(this.btnGet, 2131231132).setEditText(new EditText[]{this.oldPwd, this.pwd});
    }

    public void initView(Bundle bundle) {
        final SureAndCancelDialog sureAndCancelDialog = new SureAndCancelDialog(this.mContext, 2131492961);
        ((TextView) sureAndCancelDialog.getView(2131296444)).setText(getResources().getString(2131689745));
        sureAndCancelDialog.setOnClickCancel(new SureAndCancelDialog.onClickCancel() {
            public void onClickCancel() {
                sureAndCancelDialog.dismiss();
            }
        });
        sureAndCancelDialog.setOnClickSure(new SureAndCancelDialog.onClickSure() {
            public void onClickSure() {
                sureAndCancelDialog.dismiss();
            }
        });
        sureAndCancelDialog.show();
    }

    protected void pwdBean() {
        this.btnGet.setEnabled(false);
        this.mRxManager.add(Api.getDefault().changePassword(new PwdBean(this.oldPwd.getText().toString(), this.pwd.getText().toString())).compose(RxSchedulers.io_main()).subscribe(new RxSubscriber<BaseResult>(this.mContext, true) {
            public void _onNext(BaseResult baseResult) {
                String message = baseResult.getMessage();
                if (baseResult.getCode() == 200) {
                    MT5ACT.this.finish();
                    MT5ACT mt5act = MT5ACT.this;
                    mt5act.showShortToast(mt5act.getResources().getString(2131689823));
                    return;
                }
                MT5ACT.this.showShortToast(message);
            }

            protected void _onError(String str) {
                MT5ACT.this.showShortToast(str);
                MT5ACT.this.btnGet.setEnabled(true);
            }
        }));
    }

    @OnClick({2131296385})
    protected void onClick(View view) {
        if (view.getId() != 2131296385) {
            return;
        }
        pwdBean();
    }
}