【无标题】标准

 private void initListener() {
        bt_submit.setOnClickListener(this);
    }
    @Override
    protected void onStart() {
        super.onStart();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
    }

    @Override
    protected void onStop() {
        super.onStop();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_ent:
                Intent mIntent = new Intent();
                mIntent.putExtra("submit","submit");
                // 设置结果,并进行传送
                setResult(2, mIntent);
                finish();
                break;
            default:
                break;
        }
    }
   private void initView() {
       bt_submit= (Button) findViewById(R.id.btn_ent);
       bt_cel= (Button) findViewById(R.id.btn_cel);
       tv_unit= (TextView) findViewById(R.id.tv_spunit);
         tv_name= (TextView) findViewById(R.id.tv_spname);
        tv_et_num= (EditText) findViewById(R.id.et_num);
        tv_price= (EditText) findViewById(R.id.et_price);
         ed_zk= (EditText) findViewById(R.id.tv_zk);
        ed_zksumrice= (EditText) findViewById(R.id.tv_zksumrice);
        ed_bz= (EditText) findViewById(R.id.tv_bz);
}

你可能感兴趣的:(java,前端,javascript)