Exemplo n.º 1
0
  /** 获取投注框提示注码 */
  public String getAlertCode(List<Info> listInfo) {
    String codeStr = "";
    for (int i = 0; i < listInfo.size(); i++) {
      Info info = (Info) listInfo.get(i);
      if (info.onclikNum > 0) {
        codeStr +=
            PublicMethod.stringToHtml(
                    info.getWeeks() + " " + info.getTeamId(), Constants.JC_TOUZHU_TITLE_TEXT_COLOR)
                + " ";
        codeStr += info.getHome() + " vs " + info.getAway() + "<br>半全场:";
        for (int j = 0; j < info.check.length; j++) {
          if (info.check[j].isChecked()) {
            codeStr +=
                PublicMethod.stringToHtml(
                        info.check[j].getChcekTitle(), Constants.JC_TOUZHU_TEXT_COLOR)
                    + "  ";
          }
        }
        if (info.isDan()) {
          codeStr += PublicMethod.stringToHtml("(胆)", Constants.JC_TOUZHU_TEXT_COLOR) + "  ";
        }

        codeStr += "<br>";
      }
    }
    return codeStr;
  }
Exemplo n.º 2
0
  /**
   * 初始化倍数和期数进度条
   *
   * @param view
   */
  public void initImageView() {
    mSeekBarBeishu = (SeekBar) findViewById(R.id.buy_zixuan_seek_beishu);
    mSeekBarBeishu.setOnSeekBarChangeListener(this);
    mSeekBarBeishu.setProgress(iProgressBeishu);
    mSeekBarQishu = (SeekBar) findViewById(R.id.buy_zixuan_seek_qishu);
    mSeekBarQishu.setOnSeekBarChangeListener(this);
    mSeekBarQishu.setProgress(iProgressQishu);

    mTextBeishu = (EditText) findViewById(R.id.buy_zixuan_text_beishu);
    mTextBeishu.setText("" + iProgressBeishu);
    mTextQishu = (EditText) findViewById(R.id.buy_zixuan_text_qishu);
    mTextQishu.setText("" + iProgressQishu);

    PublicMethod.setEditOnclick(mTextBeishu, mSeekBarBeishu, new Handler());
    PublicMethod.setEditOnclick(mTextQishu, mSeekBarQishu, new Handler());
    /*
     * 点击加减图标,对seekbar进行设置:
     *
     * @param int idFind, 图标的id View iV, 当前的view final int isAdd, 1表示加 -1表示减
     * final SeekBar mSeekBar
     *
     * @return void
     */
    setSeekWhenAddOrSub(R.id.buy_zixuan_img_subtract_beishu, -1, mSeekBarBeishu, true);
    setSeekWhenAddOrSub(R.id.buy_zixuan_img_add_beishu, 1, mSeekBarBeishu, true);
    setSeekWhenAddOrSub(R.id.buy_zixuan_img_subtract_qihao, -1, mSeekBarQishu, false);
    setSeekWhenAddOrSub(R.id.buy_zixuan_img_add_qishu, 1, mSeekBarQishu, false);
  }
Exemplo n.º 3
0
 @Override
 public void initLotonoView(JSONObject PrizeDetailJson) throws JSONException {
   // TODO Auto-generated method stub
   prizeBatchCode.setText("22Ñ¡5    µÚ" + PrizeDetailJson.getString("batchCode") + "ÆÚ");
   prizeDate.setText(
       context.getString(R.string.prizedetail_opentime) + PrizeDetailJson.getString("openTime"));
   String prizeNum = PrizeDetailJson.getString("winNo");
   PrizeBallLinearLayout prizeBallLinear =
       new PrizeBallLinearLayout(context, ballLinear, Constants.TWENTYBEL, prizeNum);
   prizeBallLinear.initTwentyjBallLinear();
   totalsellmoney.setText(
       context.getString(R.string.prizedetail_thebatchcodeamt)
           + PublicMethod.toIntYuan(PrizeDetailJson.getString("sellTotalAmount"))
           + context.getString(R.string.game_card_yuan));
   prizepoolmoney.setText(
       context.getString(R.string.prizedetail_theprizepoolamt)
           + PublicMethod.toIntYuan(PrizeDetailJson.getString("prizePoolTotalAmount"))
           + context.getString(R.string.game_card_yuan));
   prizenum1.setText(PrizeDetailJson.getString("onePrizeNum"));
   prizenum1.setText(PrizeDetailJson.getString("onePrizeNum"));
   prizenum2.setText(PrizeDetailJson.getString("twoPrizeNum"));
   prizenum3.setText(PrizeDetailJson.getString("threePrizeNum"));
   prizemoney1.setText(PublicMethod.toIntYuan(PrizeDetailJson.getString("onePrizeAmt")));
   prizemoney2.setText(PublicMethod.toIntYuan(PrizeDetailJson.getString("twoPrizeAmt")));
   prizemoney3.setText(PublicMethod.toIntYuan(PrizeDetailJson.getString("threePrizeAmt")));
 }
Exemplo n.º 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.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno()));
   betAndGift.setDescription(descriptionEdit.getText().toString());
   betAndGift.setSessionid(sessionId);
   betAndGift.setPhonenum(phonenum);
   betAndGift.setUserno(userno);
   betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti    倍数   投注的倍数
   betAndGift.setBatchnum("" + iProgressQishu); // batchnum    追号期数 默认为1(不追号)
   betAndGift.setAmount("" + ZixuanActivity.addView.getAllAmt() * iProgressBeishu * 100);
   betAndGift.setIsSellWays("1");
   betAndGift.setBet_code(
       ZixuanActivity.addView.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
 }
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.buy_footballlottery_layout);
    initBatchCode(Constants.LOTNO_LCB);
    iScreenWidth = PublicMethod.getDisplayWidth(this);
    TextView text_sixhalf = (TextView) findViewById(R.id.string_banquanchang);
    text_sixhalf.setVisibility(TextView.VISIBLE);
    ImageView divide = (ImageView) findViewById(R.id.image_divide_sixhalf);
    divide.setVisibility(ImageView.VISIBLE);
    JSONObject rx9LotnoInfo = PublicMethod.getCurrentLotnoBatchCode(Constants.LOTNO_LCB);
    if (rx9LotnoInfo != null) {
      // 成功获取到了期号信息
      try {
        batchCode = rx9LotnoInfo.getString("batchCode");
        qihaoxinxi[0] = batchCode;
        qihaoxinxi[1] = rx9LotnoInfo.getString("endTime");
        qihaoxinxi[2] = Constants.LOTNO_LCB;

      } catch (JSONException e) {
        qihaoxinxi[0] = "";
        qihaoxinxi[1] = "";
        qihaoxinxi[2] = Constants.LOTNO_LCB;
      }
    }
    layout_football_issue = (Button) findViewById(R.id.layout_football_issue);
    layout_football_time = (TextView) findViewById(R.id.layout_football_time);
    batchCode = qihaoxinxi[0];
    initBatchCodeView();
    createView();
    getData(qihaoxinxi[2], qihaoxinxi[0]);
  }
Exemplo n.º 6
0
 @Override
 public String getShareString() {
   // TODO Auto-generated method stub
   StringBuffer str = new StringBuffer();
   try {
     str.append("#如意彩客户端#,").append("大乐透第" + json.getString("batchCode") + "期,");
     str.append(
         context.getString(R.string.prizedetail_opentime) + json.getString("openTime") + ",");
     str.append("开奖号码:" + wincode + ",");
     str.append(
         context.getString(R.string.prizedetail_thebatchcodeamt)
             + PublicMethod.toIntYuan(json.getString("sellTotalAmount"))
             + context.getString(R.string.game_card_yuan)
             + ",");
     str.append(
         "奖池奖金"
             + PublicMethod.toIntYuan(json.getString("prizePoolTotalAmount"))
             + context.getString(R.string.game_card_yuan)
             + ",");
     str.append("在@如意彩 买彩票,中奖福地,精“彩”不断!也许下一个大奖就属于您!");
   } catch (JSONException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   return str.toString();
 }
Exemplo n.º 7
0
 /** 设置开机图片 */
 public void initImgView() {
   imageview = (ImageView) this.findViewById(R.id.cp1);
   File sdcardDir = Environment.getExternalStorageDirectory();
   String path = sdcardDir.getParent() + "/" + sdcardDir.getName();
   // 得到开机图片
   Bitmap bitmap = BitmapFactory.decodeFile(path + DownLoadImg.LOCAL_DIR + DownLoadImg.IMG_NAME);
   String errorCode = shellRW.getStringValue("errorCode");
   if (bitmap == null || errorCode.equals("") || errorCode.equals("false")) {
     Resources r = this.getResources();
     InputStream is = r.openRawResource(R.drawable.cp1);
     BitmapDrawable bmpDraw = new BitmapDrawable(is);
     bitmap = bmpDraw.getBitmap();
   }
   // 缩放开机图片
   Matrix matrix = new Matrix();
   float iScreenWidth = PublicMethod.getDisplayWidth(this);
   float iScreenHeight = PublicMethod.getDisplayHeight(this);
   float w = iScreenWidth / bitmap.getWidth();
   float h = iScreenHeight / bitmap.getHeight();
   if (w != 1 || h != 1) {
     matrix.postScale(w, h);
     bitmap =
         Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
   }
   imageview.setImageBitmap(bitmap);
 }
Exemplo n.º 8
0
 @Override
 public void initLotonoView(JSONObject PrizeDetailJson) throws JSONException {
   // TODO Auto-generated method stub
   json = PrizeDetailJson;
   prizeBatchCode.setText("排列五    第" + PrizeDetailJson.getString("batchCode") + "期");
   prizeDate.setText(
       context.getString(R.string.prizedetail_opentime) + PrizeDetailJson.getString("openTime"));
   String prizeNum = PrizeDetailJson.getString("winNo");
   PrizeBallLinearLayout prizeBallLinear =
       new PrizeBallLinearLayout(context, ballLinear, Constants.PL5LABEL, prizeNum);
   wincode = prizeBallLinear.initPL5BallLinear();
   totalsellmoney.setText(
       context.getString(R.string.prizedetail_thebatchcodeamt)
           + PublicMethod.toIntYuan(PrizeDetailJson.getString("sellTotalAmount"))
           + context.getString(R.string.game_card_yuan));
   prizenum1.setText(PrizeDetailJson.getString("onePrizeNum"));
   prizemoney1.setText(PublicMethod.toIntYuan(PrizeDetailJson.getString("onePrizeAmt")));
   tobet.setText("排列五投注");
   tobet.setOnClickListener(
       new OnClickListener() {
         @Override
         public void onClick(View v) {
           // TODO Auto-generated method stub
           Intent intent = new Intent(context, PL5.class);
           context.startActivity(intent);
         }
       });
 }
  private String getNumbersPart() {
    StringBuffer numbersPart = new StringBuffer();

    // 如果是通选
    if (radioId == 0) {
      numbersPart.append("");
    }
    // 如果是单选
    else if (radioId == 1) {
      // 获取高亮小球号码数组
      int[] numbers = areaNums[0].table.getHighlightBallNOs();

      // 如果是单选复试
      if (numbers.length > 1) {
        for (int number_i = 0; number_i < numbers.length; number_i++) {
          String numberPart = PublicMethod.getZhuMa(numbers[number_i] % 10);
          numbersPart.append(numberPart);
        }
      }
      // 如果是单选单式
      else if (numbers.length == 1) {
        String numberString = String.valueOf(numbers[0]);
        for (int number_i = 0; number_i < numberString.length(); number_i++) {
          numbersPart.append(
              PublicMethod.getZhuMa(
                  Integer.valueOf(numberString.substring(number_i, number_i + 1))));
        }
      }
    }

    return numbersPart.toString();
  }
Exemplo n.º 10
0
 @Override
 public void errorCode_0000() {
   for (int i = 0; i < ballTables.size(); i++) {
     ballTables.get(i).clearAllHighlights();
   }
   String lotnoString = PublicMethod.toLotno(lotno);
   PublicMethod.showDialog(FootballSixSemiFinal.this, lotnoString + codeStr);
 }
Exemplo n.º 11
0
 /**
  * 复式玩法注数计算方法
  *
  * @param int aRedBalls 红球个数
  * @param int aBlueBalls 篮球个数
  * @param int iProgressBeishu 倍数提示框
  * @return long 注数
  */
 private long getDltNormalZhuShu(int aRedBalls, int aBlueBalls, int iProgressBeishu) {
   long dltZhuShu = 0L;
   if (aRedBalls > 0 && aBlueBalls > 0) {
     dltZhuShu +=
         (PublicMethod.zuhe(5, aRedBalls) * PublicMethod.zuhe(2, aBlueBalls) * iProgressBeishu);
   }
   return dltZhuShu;
 }
 /**
  * 获得各种玩法的注数
  *
  * @return 返回注数
  */
 private long getZhuShu(int aRedBalls, int aBlueBalls) {
   long ssqZhuShu = 0L;
   if (aRedBalls > 0 && aBlueBalls > 0) {
     ssqZhuShu +=
         (PublicMethod.zuhe(6, aRedBalls) * PublicMethod.zuhe(1, aBlueBalls) * iProgressBeishu);
   }
   return ssqZhuShu;
 }
Exemplo n.º 13
0
 @Override
 public void errorCode_0000() {
   // TODO Auto-generated method stub
   for (int i = 0; i < ballTables.size(); i++) {
     ballTables.get(i).clearAllHighlights();
   }
   String lotnoString = PublicMethod.toLotno(lotno);
   PublicMethod.showDialog(FootballSFLottery.this, lotnoString + codeStr);
 }
Exemplo n.º 14
0
 public String getZhuma(int index) {
   int num[] = getBalls(index);
   String str = "";
   for (int i = 0; i < num.length; i++) {
     if (i != num.length - 1) str += PublicMethod.getZhuMa(num[i]) + ",";
     else str += PublicMethod.getZhuMa(num[i]);
   }
   return str;
 }
Exemplo n.º 15
0
 public AlertDialog lookDetailDialog(final WinPrizeQueryInfo info) {
   LayoutInflater factory = LayoutInflater.from(this);
   /* 中奖查询的查看详情使用余额查询的布局 */
   View view = factory.inflate(R.layout.win_detail, null);
   final AlertDialog dialog = new AlertDialog.Builder(this).create();
   TextView lotkind = (TextView) view.findViewById(R.id.gift_detail_text_lotno);
   TextView batchcode = (TextView) view.findViewById(R.id.gift_detail_text_batchcode);
   TextView dingdanno = (TextView) view.findViewById(R.id.gift_detail_text_dingdan);
   TextView beishu = (TextView) view.findViewById(R.id.gift_detail_text_beishu);
   TextView zhushu = (TextView) view.findViewById(R.id.gift_detail_text_zhushu);
   TextView atm = (TextView) view.findViewById(R.id.gift_detail_text_atm);
   TextView statetext = (TextView) view.findViewById(R.id.gift_detail_text_state);
   TextView bettime = (TextView) view.findViewById(R.id.gift_detail_tex_gifttime);
   TextView content = (TextView) view.findViewById(R.id.gift_detail_text_content);
   TextView person = (TextView) view.findViewById(R.id.gift_detail_text_person);
   TextView kaijianghao = (TextView) view.findViewById(R.id.gift_detail_text_kaijianghao);
   TextView atmz = (TextView) view.findViewById(R.id.gift_detail_text_atmzhong);
   TextView cashtime = (TextView) view.findViewById(R.id.gift_detail_tex_time);
   final String lotno = info.getLotNo();
   lotkind.append(info.getLotName());
   if (lotno.equals("J00001")
       || lotno.equals("J00002")
       || lotno.equals("J00003")
       || lotno.equals("J00004")
       || lotno.equals(Constants.LOTNO_JCLQ)
       || lotno.equals(Constants.LOTNO_JCLQ_DXF)
       || lotno.equals(Constants.LOTNO_JCLQ_RF)
       || lotno.equals(Constants.LOTNO_JCLQ_SFC)) {
     batchcode.setVisibility(View.GONE);
   } else {
     batchcode.setVisibility(TextView.VISIBLE);
     batchcode.append(info.getBatchCode());
   }
   dingdanno.append(info.getOrderId());
   beishu.append(info.getLotMulti());
   zhushu.append(info.getBetNum());
   final String FormatAmount = PublicMethod.toYuan(info.getAmount());
   atm.append(FormatAmount + "元");
   atmz.append(PublicMethod.toYuan(info.getWinAmount()) + "元");
   cashtime.append(info.getCashTime());
   person.setVisibility(View.GONE);
   statetext.setVisibility(View.GONE);
   kaijianghao.setVisibility(View.GONE);
   bettime.append(info.getSellTime());
   content.setText(Html.fromHtml("方案内容:<br>" + info.getBetCodeHtml()));
   Button cancleLook = (Button) view.findViewById(R.id.gift_detail_img_cannle);
   cancleLook.setOnClickListener(
       new OnClickListener() {
         public void onClick(View v) {
           dialog.cancel();
         }
       });
   dialog.show();
   dialog.getWindow().setContentView(view);
   return dialog;
 }
Exemplo n.º 16
0
 @Override
 public void init() {
   // TODO Auto-generated method stub
   int[] baiNum = PublicMethod.getRandomsWithoutCollision(1, 0, 9);
   int[] shiNum = PublicMethod.getRandomsWithoutCollision(1, 0, 9);
   int[] geNum = PublicMethod.getRandomsWithoutCollision(1, 0, 9);
   add(baiNum, null);
   add(shiNum, null);
   add(geNum, null);
 }
Exemplo n.º 17
0
  /** 创建直选机选 */
  public void createTable(LinearLayout layout) {
    for (int i = 0; i < balls.size(); i++) {
      final int index = i;
      int iScreenWidth = PublicMethod.getDisplayWidth(this);
      LinearLayout lines = new LinearLayout(layout.getContext());
      for (int j = 0; j < balls.get(i).getVZhuma().size(); j++) {
        String color = (String) balls.get(i).getVColor().get(j);
        TableLayout table;
        if (color.equals("red")) {
          table =
              PublicMethod.makeBallTableJiXuan(
                  null, iScreenWidth, redBallResId, balls.get(i).getBalls(j), this);
        } else {
          table =
              PublicMethod.makeBallTableJiXuan(
                  null, iScreenWidth, blueBallResId, balls.get(i).getBalls(j), this);
        }

        lines.addView(table);
      }
      ImageButton delet = new ImageButton(lines.getContext());
      delet.setBackgroundResource(R.drawable.shanchu);
      delet.setOnClickListener(
          new OnClickListener() {

            @Override
            public void onClick(View v) {
              if (balls.size() > 1) {
                zhumaView.removeAllViews();
                balls.remove(index);
                isOnclik = false;
                jixuanZhu.setSelection(balls.size() - 1);
                createTable(zhumaView);
              } else {
                Toast.makeText(
                        DanshiJiXuan.this,
                        getResources().getText(R.string.zhixuan_jixuan_toast),
                        Toast.LENGTH_SHORT)
                    .show();
              }
            }
          });
      LinearLayout.LayoutParams param =
          new LinearLayout.LayoutParams(
              LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
      param.setMargins(10, 5, 0, 0);
      lines.addView(delet, param);
      lines.setGravity(Gravity.CENTER_HORIZONTAL);
      if (i % 2 == 0) {
        lines.setBackgroundResource(R.drawable.jixuan_list_bg);
      }
      lines.setPadding(0, 3, 0, 0);
      layout.addView(lines);
    }
  }
Exemplo n.º 18
0
 public String getFreedomGuoGuanPrize(int muti) {
   double max = freedomMaxprize * muti;
   double mix = freedomMixprize * muti;
   StringBuffer result = new StringBuffer();
   result
       .append("预计中奖金额:")
       .append(PublicMethod.formatStringToTwoPoint(mix))
       .append("元~")
       .append(PublicMethod.formatStringToTwoPoint(max))
       .append("元 ");
   return result + "";
 }
Exemplo n.º 19
0
 /** 初始化投注信息 */
 public void initBet() {
   betAndGift.setIsSellWays("1");
   betAndGift.setAmount("" + addView.getAllAmt() * iProgressBeishu * 100);
   betAndGift.setSessionid(sessionId);
   betAndGift.setPhonenum(phonenum);
   betAndGift.setUserno(userno);
   betAndGift.setBettype("bet"); // 投注为bet,赠彩为gift
   betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti 倍数 投注的倍数
   betAndGift.setBatchnum("" + iProgressQishu); // batchnum 追号期数 默认为1(不追号)
   betAndGift.setBet_code(addView.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
   lotno = PublicMethod.toLotno(betAndGift.getLotno());
   betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno())); // 期号
 }
Exemplo n.º 20
0
 public void setFistWith() {
   if (Constants.SCREEN_WIDTH == 240) {
     FIRST_WITH = PublicMethod.getPxInt(200, context);
     SECOND_WITH = PublicMethod.getPxInt(100, context);
   } else if (Constants.SCREEN_WIDTH == 320) {
     FIRST_WITH = PublicMethod.getPxInt(200, context);
     SECOND_WITH = PublicMethod.getPxInt(100, context);
   } else if (Constants.SCREEN_WIDTH == 480) {
     return;
   } else if (Constants.SCREEN_WIDTH == 540) {
     FIRST_WITH = PublicMethod.getPxInt(280, context);
   } else {
     return;
   }
 }
Exemplo n.º 21
0
 /** 超级大乐透子列表 */
 private void showSubChaoJiDaLeTouListView() {
   adpterlist = getSubInfoForListView("cjdlt");
   noticePrizesTitle.setText(R.string.chaojidaletou_kaijianggonggao);
   adapter = new SubEfficientAdapter(this, str, adpterlist, LISTDLT, true);
   listview.setAdapter(adapter);
   PublicMethod.setmydividerHeight(listview);
 }
Exemplo n.º 22
0
 /** 11运夺金子列表 */
 private void showSubYdjCaiListView() {
   adpterlist = getSubInfoForListView("11-ydj");
   noticePrizesTitle.setText(R.string.ydj_kaijianggonggao);
   adapter = new SubEfficientAdapter(this, str, adpterlist, LISTYDJ, false);
   listview.setAdapter(adapter);
   PublicMethod.setmydividerHeight(listview);
 }
Exemplo n.º 23
0
 /** 22选5 */
 private void showSubTwentyListView() {
   adpterlist = getSubInfoForListView("22-5");
   noticePrizesTitle.setText(R.string.ydj_kaijianggonggao);
   adapter = new SubEfficientAdapter(this, str, adpterlist, LISTTWENTY, true);
   listview.setAdapter(adapter);
   PublicMethod.setmydividerHeight(listview);
 }
Exemplo n.º 24
0
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      // TODO Auto-generated method stub
      index = position;
      ViewHolder holder = null;
      Info info = (Info) mList.get(position).get(INFO);

      if (convertView == null) {
        convertView = mInflater.inflate(R.layout.join_info_listview_item, null);
        holder = new ViewHolder();
        holder.name = (TextView) convertView.findViewById(R.id.join_info_item_text_name);
        holder.starNum = (LinearLayout) convertView.findViewById(R.id.join_info_item_linear_star);
        holder.progress = (TextView) convertView.findViewById(R.id.join_info_item_text_progress);
        holder.allAtm = (TextView) convertView.findViewById(R.id.join_info_item_text_all_amt);
        holder.atm = (TextView) convertView.findViewById(R.id.join_info_item_text_amt);
        convertView.setTag(holder);
      } else {
        holder = (ViewHolder) convertView.getTag();
      }
      holder.name.setText("发起人:" + info.getName());
      holder.progress.setText(info.getProgress());
      holder.allAtm.setText("¥" + info.getAllAtm());
      holder.atm.setText("¥" + info.getAtm());
      PublicMethod.createStar(
          holder.starNum,
          info.getCrown(),
          info.getCup(),
          info.getDiamond(),
          info.getStarNum(),
          JoinInfoActivity.this);
      return convertView;
    }
Exemplo n.º 25
0
  /** 赠送彩票联网 */
  public void giftNet() {
    isMsg = false;
    betAndGift.setBettype("gift");
    betAndGift.setAmount(PublicMethod.toFen(Integer.toString(allAtm)));
    betAndGift.setTo_mobile_code(editPhone.getText().toString().replace(",", ","));
    betAndGift.setAdvice(editLanguage.getText().toString());
    showDialog(0); // 显示网络提示框 2010/7/4
    // 加入是否改变切入点判断 陈晨 8.11
    Thread t =
        new Thread(
            new Runnable() {
              String str = "00";

              @Override
              public void run() {
                str = BetAndGiftInterface.getInstance().betOrGift(betAndGift);
                try {
                  obj = new JSONObject(str);
                  message = obj.getString("message");
                  String error = obj.getString("error_code");
                  handler.handleMsg(error, message);
                } catch (JSONException e) {
                  e.printStackTrace();
                }
                progressdialog.dismiss();
              }
            });
    t.start();
  }
Exemplo n.º 26
0
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {

        final String prizeName = (String) mList.get(position).get(NAME);
        final String prizeAmt = (String) mList.get(position).get(PRIZEAMT);
        PrizeViewHolder holder = new PrizeViewHolder();
        if (convertView == null) {
          convertView = mAdapterInflater.inflate(R.layout.prizerank_listitem, null);
          holder = new PrizeViewHolder();
          holder.prizeId = (TextView) convertView.findViewById(R.id.prizeRank_id);
          holder.prizerName = (TextView) convertView.findViewById(R.id.prizeRank_name);
          holder.prizeNumber = (TextView) convertView.findViewById(R.id.prizeRank_number);
        } else {
          holder = (PrizeViewHolder) convertView.getTag();
        }
        int rank = position + 1;
        setPrizeRankIDBg(holder.prizeId, rank);
        holder.prizeId.setText(rank + "");
        holder.prizerName.setText(prizeName);
        String prizeAmtHtml =
            "<font color=\"#ff0000\"><B>"
                + PublicMethod.toYuan(prizeAmt)
                + "</B></font>"
                + "元"; // 以Html格式设置颜色
        holder.prizeNumber.setText(Html.fromHtml(prizeAmtHtml));
        convertView.setTag(holder);
        return convertView;
      }
Exemplo n.º 27
0
 /**
  * 绘制小球
  *
  * @param canvas
  */
 public void onDrawCenter(Canvas canvas) {
   onDrawTable(canvas, 0, 0);
   drawLine(canvas);
   for (int i = 0; i < line; i++) {
     for (int j = 0; j < row; j++) {
       int balls[] = list.get(i).getBallNum();
       int num = j + startNum;
       int height = (int) (WITH - (8 * release));
       int with = (int) (WITH / 2 - (8 * release));
       for (int n = 0; n < balls.length; n++) {
         if (num == balls[n]) {
           if (isRed) {
             canvas.drawBitmap(bitRedBall, FIRST_WITH + j * WITH, WITH + i * WITH, null);
           } else {
             canvas.drawBitmap(bitBlueBall, FIRST_WITH + j * WITH, WITH + i * WITH, null);
           }
           p.setColor(Color.WHITE);
           canvas.drawText(
               "" + PublicMethod.isTen(balls[n]),
               FIRST_WITH + j * WITH + with,
               WITH + i * WITH + height,
               p);
         }
       }
     }
   }
 }
Exemplo n.º 28
0
  private void isAgencyNet() {
    RWSharedPreferences pre = new RWSharedPreferences(this, "addInfo");
    String userno = pre.getStringValue(ShellRWConstants.USERNO);
    String phonenum = pre.getStringValue(ShellRWConstants.PHONENUM);
    String toPhonenum = userName.getText().toString();
    String amout = userAmt.getText().toString();
    String password = userPassword.getText().toString();

    if (toPhonenum == null || toPhonenum.equals("")) {
      Toast.makeText(context, "您输入的用户名不能为空!", Toast.LENGTH_SHORT).show();
    } else if (amout == null || amout.equals("")) {
      Toast.makeText(context, "您输入的金额不能为空!", Toast.LENGTH_SHORT).show();
    } else if (password == null || password.equals("")) {
      Toast.makeText(context, "您输入的密码不能为空!", Toast.LENGTH_SHORT).show();
    } else if (Integer.parseInt(amout.substring(0, 1)) == 0) {
      Toast.makeText(context, "您输入的金额第一位数不能为零", Toast.LENGTH_SHORT).show();
    } else if (amout.length() > 5) {
      Toast.makeText(context, "您输入的金额不能超过10万元!", Toast.LENGTH_SHORT).show();
    } else if (Integer.parseInt(amout) == 0) {
      Toast.makeText(context, "您输入的金额不能为零!", Toast.LENGTH_SHORT).show();
    } else {
      amout = PublicMethod.toFen(amout);
      agencyNet(userno, phonenum, toPhonenum, amout, password);
    }
  }
Exemplo n.º 29
0
 /**
  * 获得排列三组3复式注数
  *
  * @param iZu3balls 选择小球个数
  * @return 返回注数
  */
 private long getPL3Zu3FushiZhushu(int iZu3balls) {
   long tempzhushu = 0l;
   if (iZu3balls > 0) {
     tempzhushu += PublicMethod.zuhe(2, iZu3balls) * 2;
   }
   return tempzhushu;
 }
Exemplo n.º 30
0
 /*
  * 复式玩法注数计算方法
  *
  * @param int aRedBalls 红球个数
  *
  *
  * @return long 注数
  */
 private long getQLCFSZhuShu(int aRedBalls) {
   long qlcZhuShu = 0L;
   if (aRedBalls > 0) {
     qlcZhuShu += (PublicMethod.zuhe(7, aRedBalls) * iProgressBeishu);
   }
   return qlcZhuShu;
 }