导航菜单

页面标题

页面副标题

六分钟步行测试管理软件 v1.1.0.2112120029 - PopUpDialogActivity.java 源代码

正在查看: 六分钟步行测试管理软件 v1.1.0.2112120029 应用的 PopUpDialogActivity.java JAVA 源代码文件

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


package cn.neoprint.padmonitor.ui;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import cn.neoprint.padmonitor.R;
import cn.neoprint.padmonitor.app.AppGlobal;
import cn.neoprint.padmonitor.utils.FontManager;
import cn.neoprint.padmonitor.utils.constant.SharePreferenceConstant;

public class PopUpDialogActivity extends Activity implements View.OnClickListener {
    private TextView btCancle;
    private TextView btYES;
    private TextView popuptextview;
    private boolean onlyconfirm = false;
    private int resultCode = -1;

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        requestWindowFeature(1);
        setContentView(R.layout.popupdialog);
        ((AppGlobal) getApplication()).setSystemBarVisible(this, false);
        setFinishOnTouchOutside(false);
        FontManager.changeFonts((ViewGroup) getWindow().getDecorView(), this, Typeface.createFromAsset(getAssets(), "fonts/MSBlack.ttf"));
        Bundle extras = getIntent().getExtras();
        String string = getString(R.string.yes);
        String string2 = getString(R.string.cancel);
        if (extras != null) {
            this.onlyconfirm = extras.getBoolean("onlyconfirm");
            string = extras.getString("yes", getString(R.string.yes));
            string2 = extras.getString(SharePreferenceConstant.DEFAULT_VALUE_USER_SN, getString(R.string.cancel));
        }
        this.resultCode = getIntent().getIntExtra("resultCode", -1);
        this.popuptextview = (TextView) findViewById(R.id.popuptextview);
        TextView textView = (TextView) findViewById(R.id.popupyes);
        this.btYES = textView;
        textView.setText(string);
        this.btYES.setOnClickListener(this);
        TextView textView2 = (TextView) findViewById(R.id.popupno);
        this.btCancle = textView2;
        textView2.setText(string2);
        this.btCancle.setOnClickListener(this);
        if (this.onlyconfirm) {
            this.btCancle.setVisibility(8);
        }
        if (extras != null) {
            this.popuptextview.setText(extras.getInt("popuptextview"));
        }
    }

    @Override
    public void onClick(View view) {
        Bundle bundle = new Bundle();
        int id = view.getId();
        if (id == 2131363116) {
            bundle.putBoolean("popupresult", false);
        } else if (id == 2131363119) {
            bundle.putBoolean("popupresult", true);
        }
        Intent intent = new Intent();
        intent.putExtras(bundle);
        int i = this.resultCode;
        if (i == -1) {
            setResult(10, intent);
        } else {
            setResult(i, intent);
        }
        finish();
    }

    @Override
    public void finish() {
        super.finish();
        overridePendingTransition(0, R.anim.zoomout);
    }
}