private void init() { zhushu = (TextView) findViewById(R.id.alert_dialog_touzhu_textview_zhushu); jine = (TextView) findViewById(R.id.alert_dialog_touzhu_textview_jine); caizhong = (TextView) findViewById(R.id.alert_dialog_touzhu_textview_caizhong); caizhong.setText(PublicMethod.toLotno(betAndGift.getLotno())); issueText = (TextView) findViewById(R.id.alert_dialog_touzhu_textview_qihao); textZhuma = (TextView) findViewById(R.id.alert_dialog_touzhu_text_zhuma); textTitle = (TextView) findViewById(R.id.alert_dialog_touzhu_text_zhuma_title); getNetIssue(); if (type.equals("zc")) { textTitle.setText("注码:共有1笔投注"); textZhuma.setText(betAndGift.getBet_code()); } else { initImageView(); CodeInfo code = addviewmiss.getCodeList().get(addviewmiss.getSize() - 1); code.setTextCodeColor(textZhuma, code.getLotoNo(), code.getTouZhuType()); textTitle.setText("注码:" + "共有" + addviewmiss.getSize() + "笔投注"); codeInfo = (Button) findViewById(R.id.alert_dialog_touzhu_btn_look_code); isCodeText(codeInfo); codeInfo.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub addviewmiss.createCodeInfoDialog(ZiXuanTouZhu.this); addviewmiss.showDialog(); } }); } if (betAndGift.isZhui()) { initZhuiJia(); } getTouzhuAlert(); Button cancel = (Button) findViewById(R.id.alert_dialog_touzhu_button_cancel); Button ok = (Button) findViewById(R.id.alert_dialog_touzhu_button_ok); cancel.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub alertExit(getString(R.string.buy_alert_exit_detail)); } }); ok.setOnClickListener( new OnClickListener() { public void onClick(View v) { RWSharedPreferences pre = new RWSharedPreferences(ZiXuanTouZhu.this, "addInfo"); sessionId = pre.getStringValue("sessionid"); phonenum = pre.getStringValue("phonenum"); userno = pre.getStringValue("userno"); if (userno.equals("")) { toLogin = true; Intent intentSession = new Intent(ZiXuanTouZhu.this, UserLogin.class); startActivityForResult(intentSession, 0); } else { touZhu(); } } }); }
private void init() { initImageView(); if (betAndGift.isZhui()) { initZhuiJia(); } zhuiqishezhi = (LinearLayout) findViewById(R.id.zhuiqishezhi); zhuiqi = (Button) findViewById(R.id.zhuiqi); zhuiqi.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (state == 0) { getbatchcodes(); state = 2; } else if (state == 1) { zhuiqishezhi.setVisibility(View.VISIBLE); state = 2; } else if (state == 2) { zhuiqishezhi.setVisibility(View.GONE); state = 1; } } }); zhushu = (TextView) findViewById(R.id.alert_dialog_touzhu_textview_zhushu); jine = (TextView) findViewById(R.id.alert_dialog_touzhu_text_one); caizhong = (TextView) findViewById(R.id.alert_dialog_touzhu_textview_caizhong); caizhong.setText(PublicMethod.toLotno(betAndGift.getLotno())); issueText = (TextView) findViewById(R.id.alert_dialog_touzhu_textview_qihao); textZhuma = (TextView) findViewById(R.id.alert_dialog_touzhu_text_zhuma); textTitle = (TextView) findViewById(R.id.alert_dialog_touzhu_text_zhuma_title); CodeInfo code = addviewmiss.getCodeList().get(addviewmiss.getSize() - 1); code.setTextCodeColor(textZhuma, code.getLotoNo(), code.getTouZhuType()); if (Constants.type.equals("luck")) { getNetIssue(); } else { issueText.setText("第" + PublicMethod.toIssue(betAndGift.getLotno()) + "期"); } textTitle.setText("注码:" + "共有" + addviewmiss.getSize() + "笔投注"); getTouzhuAlert(); Button cancel = (Button) findViewById(R.id.alert_dialog_touzhu_button_cancel); Button ok = (Button) findViewById(R.id.alert_dialog_touzhu_button_ok); codeInfo = (Button) findViewById(R.id.alert_dialog_touzhu_btn_look_code); isCodeText(codeInfo); CheckBox checkPrize = (CheckBox) findViewById(R.id.alert_dialog_touzhu_check_prize); checkPrize.setChecked(true); // 设置betAndGift.prizeend与checkPrize保持一致 betAndGift.setPrizeend("1"); checkPrize.setButtonDrawable(R.drawable.check_on_off); checkPrize.setOnCheckedChangeListener( new OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { // TODO Auto-generated method stub if (isChecked) { betAndGift.setPrizeend("1"); } else { betAndGift.setPrizeend("0"); } } }); codeInfo.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub addviewmiss.createCodeInfoDialog(ZixuanZhuihao.this); addviewmiss.showDialog(); } }); cancel.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub finish(); } }); ok.setOnClickListener( new OnClickListener() { public void onClick(View v) { RWSharedPreferences pre = new RWSharedPreferences(ZixuanZhuihao.this, "addInfo"); sessionId = pre.getStringValue("sessionid"); phonenum = pre.getStringValue("phonenum"); userno = pre.getStringValue("userno"); if (userno.equals("")) { toLogin = true; Intent intentSession = new Intent(ZixuanZhuihao.this, UserLogin.class); startActivityForResult(intentSession, 0); } else { touZhu(); } } }); }