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);
 }
 /*
  * 设置投注信息类的彩种编号和投注类型
  */
 void setLotoNoAndType(CodeInfo codeInfo) {
   codeInfo.setLotoNo(Constants.LOTNO_NMK3);
   if (radioId == 0) {
     codeInfo.setTouZhuType("threesame_tong");
   } else if (radioId == 1) {
     codeInfo.setTouZhuType("threesame_dan");
   }
 }
Exemple #3
0
 void setLotoNoAndType(CodeInfo codeInfo) {
   codeInfo.setLotoNo(Constants.LOTNO_PL3);
   if (iCurrentButton == PublicConst.BUY_PL3_ZU3_DAN) {
     codeInfo.setTouZhuType("zu3_danshi");
   } else if (iCurrentButton == PublicConst.BUY_PL3_ZU3_FU) {
     codeInfo.setTouZhuType("zu3_fushi");
   } else {
     codeInfo.setTouZhuType("zu3_hezhi");
   }
 }
 public void getCodeInfo(AddView addView) {
   for (int i = 0; i < balls.size(); i++) {
     String codeStr = getAddZhuma(i);
     CodeInfo codeInfo = addView.initCodeInfo(betAndGift.getAmt(), 1);
     codeInfo.addAreaCode(codeStr, Color.BLACK);
     codeInfo.setTouZhuCode(balls.get(i).getZhuma(balls, 1));
     addView.addCodeInfo(codeInfo);
   }
   addView.setIsJXcode(ballOne.getZhuma(balls, iProgressBeishu));
 }
 public void getCodeInfo(AddView addView) {
   int zhuShu = getZhuShu();
   CodeInfo codeInfo = addView.initCodeInfo(getAmt(zhuShu), zhuShu);
   AreaNum[] areaNums = itemViewArray.get(0).areaNums;
   codeInfo.setTouZhuCode(code.zhuma(areaNums, iProgressBeishu, 0));
   for (AreaNum areaNum : areaNums) {
     int[] codes = areaNum.table.getHighlightBallNOs();
     String codeStr = "";
     for (int i = 0; i < codes.length; i++) {
       codeStr += PublicMethod.isTen(codes[i]);
       if (i != codes.length - 1) {
         codeStr += ",";
       }
     }
     codeInfo.addAreaCode(codeStr, areaNum.textColor);
   }
   addView.addCodeInfo(codeInfo);
 }
 void setLotoNoAndType(CodeInfo codeInfo) {
   codeInfo.setLotoNo(Constants.LOTNO_SSC);
   codeInfo.setTouZhuType("bigsmall");
 }
  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();
  }
 /*
  * 设置投注信息类的彩种编号和投注类型
  */
 void setLotoNoAndType(CodeInfo codeInfo) {
   codeInfo.setLotoNo(Constants.LOTNO_NMK3);
   codeInfo.setTouZhuType("hezhi");
 }