public void getCodeInfo(AddView addView) {
   int zhuShu = getZhuShu();
   CodeInfo codeInfo = addView.initCodeInfo(getAmt(zhuShu), zhuShu);
   setLotoNoAndType(codeInfo);
   String lotoNo = codeInfo.getLotoNo();
   String touzhuType = codeInfo.getTouZhuType();
   AreaNum[] areaNums = itemViewArray.get(0).areaNums;
   codeInfo.setTouZhuCode(code.zhuma(areaNums, iProgressBeishu, 0));
   boolean isFirst = true;
   for (AreaNum areaNum : areaNums) {
     int[] codes = areaNum.table.getHighlightBallNOs();
     String codeStr = "";
     for (int i = 0; i < codes.length; i++) {
       if (isTen) {
         codeStr += PublicMethod.isTen(codes[i]);
       } else {
         codeStr += String.valueOf(codes[i]);
       }
       if (i != codes.length - 1) {
         if (!lotoNo.equals(Constants.LOTNO_QXC)
             && !lotoNo.equals(Constants.LOTNO_PL5)
             && !(lotoNo.equals(Constants.LOTNO_PL3) && touzhuType.equals("zhixuan"))) {
           codeStr += ",";
         }
       }
     }
     if (lotoNo.equals(Constants.LOTNO_PL3) && touzhuType.equals("zu3_danshi") && isFirst) {
       codeStr += ("," + codeStr);
       isFirst = false;
     }
     codeInfo.addAreaCode(codeStr, areaNum.textColor);
   }
   addView.addCodeInfo(codeInfo);
 }
  public void init() {
    beishulayLayout = (LinearLayout) findViewById(R.id.beishulayout);
    if (betAndGift.isZhui()) {
      initZhuiJia();
    }
    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);
    if (Constants.type.equals("hight") || Constants.type.equals("zc")) {
      issueText.setText("第" + betAndGift.getBatchcode() + "期");
    } else {
      getNetIssue();
    }
    getTouzhuAlert();
    if (Constants.type.equals("zc")) {
      textTitle.setText("注码:共有1笔投注");
      textZhuma.setText(betAndGift.getBet_code());
      initImageView();
      //			beishulayLayout.setVisibility(View.GONE);
      codeInfo = (Button) findViewById(R.id.alert_dialog_touzhu_btn_look_code);
      codeInfo.setVisibility(View.GONE);
    } else {
      beishulayLayout.setVisibility(View.VISIBLE);
      initImageView();
      CodeInfo code = addview.getCodeList().get(addview.getSize() - 1);
      code.setTextCodeColor(textZhuma, code.getLotoNo(), code.getTouZhuType());
      textTitle.setText("注码:" + "共有" + addview.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
              addview.createCodeInfoDialog(context);
              addview.showDialog();
            }
          });
    }
    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(JoinStartActivity.this, "addInfo");
            sessionId = pre.getStringValue("sessionid");
            phonenum = pre.getStringValue("phonenum");
            userno = pre.getStringValue("userno");
            if (userno.equals("")) {
              toLogin = true;
              Intent intentSession = new Intent(JoinStartActivity.this, UserLogin.class);
              startActivityForResult(intentSession, 0);
            } else {
              isJoin();
            }
          }
        });
    titleText = (TextView) findViewById(R.id.layout_join_text_title);
    renText = (TextView) findViewById(R.id.layout_join_text_rengou);
    baoText = (TextView) findViewById(R.id.layout_join_text_baodi);
    buyEdit = (EditText) findViewById(R.id.layout_join_edit_rengou);
    minEdit = (EditText) findViewById(R.id.layout_join_edit_gendan);
    safeEdit = (EditText) findViewById(R.id.layout_join_edit_baodi);
    descriptionEdit = (EditText) findViewById(R.id.layout_join_edit_description);
    buyEdit.setText("1");
    safeEdit.setText("1");
    minEdit.setText("1");
    deductSpinner = (Spinner) findViewById(R.id.layout_join_start_spinner);
    deductSpinner.setSelection(9);
    // 初始化spinner
    deductSpinner.setOnItemSelectedListener(
        new OnItemSelectedListener() {
          @Override
          public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
            commisionRation = (String) deductSpinner.getSelectedItem();
          }

          @Override
          public void onNothingSelected(AdapterView<?> arg0) {}
        });
    // 赋值
    renText.setText(
        "占总额" + progress(isNull(buyEdit.getText().toString()), "" + allAtm) + "%"); // 总金额
    baoText.setText(
        "占总额" + progress(isNull(safeEdit.getText().toString()), "" + allAtm) + "%"); // 总金额
    onEditTextClik();
  }