Пример #1
0
 @Override
 public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
   // TODO Auto-generated method stub
   if (progress < 1) seekBar.setProgress(1);
   int iProgress = seekBar.getProgress();
   switch (seekBar.getId()) {
     case R.id.buy_zixuan_seek_beishu:
       iProgressBeishu = iProgress;
       mTextBeishu.setText("" + iProgressBeishu);
       if (Constants.type.equals("zc")) {
         mAmount = /*Integer.valueOf(betAndGift.getZhushu()) * */ mZhushu * 200 * iProgressBeishu;
         allAtm = mAmount / 100;
         //				allAtm = iProgressQishu * addview.getAllAmt() * iProgressBeishu;
       } else {
         allAtm = iProgressQishu * addview.getAllAmt() * iProgressBeishu;
       }
       renText.setText(
           "占总额" + progress(isNull(buyEdit.getText().toString()), "" + allAtm) + "%"); // 总金额
       baoText.setText(
           "占总额" + progress(isNull(safeEdit.getText().toString()), "" + allAtm) + "%"); // 总金额
       // changeTextSumMoney();
       break;
     default:
       break;
   }
   getTouzhuAlert();
 }
Пример #2
0
 /** 投注提示框中的信息 */
 public void getTouzhuAlert() {
   if (Constants.type.equals("zc")) {
     //			int zhuShu = Integer.valueOf(betAndGift.getZhushu()) * iProgressBeishu;
     zhushu.setText(mZhushu * iProgressBeishu + "注     ");
     jine.setText(+iProgressQishu * mZhushu * 2 * iProgressBeishu + "元");
   } else {
     zhushu.setText(addview.getAllZhu() + "注     ");
     jine.setText(iProgressQishu * addview.getAllAmt() * iProgressBeishu + "元");
   }
   // return "注数:"
   // + addview.getAllZhu() + "注     "
   // + "金额:" +
   // + iProgressQishu * addview.getAllAmt() * iProgressBeishu
   // + "元";
 }
Пример #3
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   requestWindowFeature(Window.FEATURE_NO_TITLE);
   setContentView(R.layout.order_hemai);
   context = this;
   ApplicationAddview app = (ApplicationAddview) getApplicationContext();
   betAndGift = app.getPojo();
   addview = app.getAddview();
   if (Constants.type.equals("zc")) {
     allAtm = Integer.valueOf(betAndGift.getAmount()) / 100;
     //			mAmount = Integer.valueOf(betAndGift.getAmount());
     mZhushu = Integer.valueOf(betAndGift.getZhushu());
   } else {
     allAtm = iProgressQishu * addview.getAllAmt() * iProgressBeishu;
   }
   init();
   initRadioGroup();
 }
Пример #4
0
  /** /** 对合买对象进行赋值 */
  public void setPojo() {
    RWSharedPreferences pre = new RWSharedPreferences(JoinStartActivity.this, "addInfo");
    sessionId = pre.getStringValue("sessionid");
    phonenum = pre.getStringValue("phonenum");
    userno = pre.getStringValue("userno");
    betAndGift.setBettype("startcase");
    betAndGift.setTotalAmt(betAndGift.getAmount());
    if (betAndGift.getIssuper().equals("0")) {
      betAndGift.setOneAmount("300");
    } else {
      betAndGift.setOneAmount("200");
    }
    betAndGift.setSafeAmt(isNull(PublicMethod.toFen(isNull(safeEdit.getText().toString()))));
    betAndGift.setBuyAmt(isNull(PublicMethod.toFen(isNull(buyEdit.getText().toString()))));
    betAndGift.setMinAmt(PublicMethod.toFen(isNull(minEdit.getText().toString())));
    betAndGift.setCommisionRation(commisionRation);
    betAndGift.setVisibility(visible);
    betAndGift.setDescription(descriptionEdit.getText().toString());
    betAndGift.setSessionid(sessionId);
    betAndGift.setPhonenum(phonenum);
    betAndGift.setUserno(userno);
    if (!Constants.type.equals("zc")) {
      betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti 倍数 投注的倍数
    }
    betAndGift.setBatchnum("" + iProgressQishu); // batchnum 追号期数 默认为1(不追号)
    if (!Constants.type.equals("zc")) {
      betAndGift.setIsSellWays("1");
      betAndGift.setAmount("" + addview.getAllAmt() * iProgressBeishu * 100);
      betAndGift.setBet_code(addview.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
    } else {
      betAndGift.setIsSellWays("");

      betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti 倍数 投注的倍数
      //			int amount = Integer.valueOf(betAndGift.getAmount()) * iProgressBeishu;
      String zhuShu = String.valueOf(mZhushu * iProgressBeishu);
      String amount = String.valueOf(mZhushu * iProgressBeishu * 200);
      betAndGift.setAmount(amount);
      betAndGift.setZhushu(zhuShu);
    }
  }