/** 初始化列表 */
  public void initList() {
    TextView title = (TextView) findViewById(R.id.join_text_title);
    title.setText("合买大厅");
    title.append("-" + PublicMethod.toLotno(lotno));
    if (viewInfos[topIndex][lottypeIndex].newPage == 0 || isSelect) {
      isSelect = false;
      adapter[topIndex][lottypeIndex] =
          new JoinInfoAdapter(this, viewInfos[topIndex][lottypeIndex].listdata);
      listview.setAdapter(adapter[topIndex][lottypeIndex]);
    } else {
      adapter[topIndex][lottypeIndex].notifyDataSetChanged();
    }

    /* 列表的点击后的背景 */
    OnItemClickListener clickListener =
        new OnItemClickListener() {

          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            Info info = (Info) viewInfos[topIndex][lottypeIndex].listdata.get(position);
            if (info.getAtm().equals(info.getAllAtm())) {
              Toast.makeText(JoinInfoActivity.this, "该方案已经满员,请您选择其他方案!", Toast.LENGTH_SHORT).show();
            } else {
              Intent intent = new Intent(JoinInfoActivity.this, JoinDetailActivity.class);
              intent.putExtra(ID, info.getId());
              intent.putExtra(JoinHallActivity.LOTNO, info.getLotno());
              intent.putExtra(JoinHallActivity.ISSUE, info.getBatchCode());
              intent.putExtra(USER_NO, info.getStarterUserNo());
              startActivity(intent);
            }
          }
        };
    listview.setOnItemClickListener(clickListener);
  }
 @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);
 }
 @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);
 }
示例#4
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())); // 期号
 }
  /** 初始化组件 */
  public void init() {
    TextView title = (TextView) findViewById(R.id.join_text_title);
    Button imgRetrun = (Button) findViewById(R.id.join_img_return);
    title.setText("合买大厅");
    title.append("-" + PublicMethod.toLotno(lotno));
    imgRetrun.setBackgroundResource(R.drawable.returnselecter);
    imgRetrun.setText("筛选");
    imgRetrun.setVisibility(view.VISIBLE);
    // ImageView的返回事件
    imgRetrun.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            // finish();
            selecetDialog().show();
          }
        });
    LinearLayout top = (LinearLayout) findViewById(R.id.join_info_check_linear_top);
    top.setVisibility(LinearLayout.VISIBLE);
    progress = (Button) findViewById(R.id.join_info_btn_progress);
    progress.setBackgroundResource(R.drawable.join_info_btn_selecter);
    allAtm = (Button) findViewById(R.id.join_info_btn_all_atm);
    allAtm.setBackgroundResource(R.drawable.join_info_btn_selecter);
    atm = (Button) findViewById(R.id.join_info_btn_atm);
    atm.setBackgroundResource(R.drawable.join_info_btn_selecter);
    check = (CheckBox) findViewById(R.id.jion_info_check);
    check.setButtonDrawable(R.drawable.join_info_check_select);
    listview = (ListView) findViewById(R.id.join_listview);
    LayoutInflater mInflater =
        (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    view = mInflater.inflate(R.layout.lookmorebtn, null);
    progressbar = (ProgressBar) view.findViewById(R.id.getmore_progressbar);
    listview.addFooterView(view);
    // 数据源
    view.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {

            // TODO Auto-generated method stub
            progressbar.setVisibility(ProgressBar.VISIBLE);
            view.setEnabled(false);
            // TODO Auto-generated method stub
            addmore();
          }
        });
  }
示例#6
0
 /** 初始化投注信息 */
 public void initBet() {
   betAndGift.setIsSellWays("1");
   betAndGift.setAmount("" + addviewmiss.getAllAmt() * iProgressBeishu * 100);
   betAndGift.setSessionid(sessionId);
   betAndGift.setPhonenum(phonenum);
   betAndGift.setUserno(userno);
   betAndGift.setDescription("");
   betAndGift.setBettype("bet"); // 投注为bet,赠彩为gift
   betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti    倍数   投注的倍数
   betAndGift.setBatchnum("" + iProgressQishu); // batchnum    追号期数 默认为1(不追号)
   betAndGift.setBet_code(addviewmiss.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
   lotno = PublicMethod.toLotno(betAndGift.getLotno());
   if (PublicMethod.toIssue(betAndGift.getLotno()) != null) {
     betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno())); // 期号
   }
   if (state == 2) {
     betAndGift.setSubscribeInfo(getSubstringforset());
   } else {
     betAndGift.setSubscribeInfo("");
   }
 }
示例#7
0
  /** 赠送彩票联网 */
  public void giftNet() {
    isMsg = false;
    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));
    betAndGift.setBettype("gift");
    lotno = PublicMethod.toLotno(betAndGift.getLotno());
    betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno())); // 期号
    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();
  }
示例#8
0
  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();
            }
          }
        });
  }
示例#9
0
 private void init() {
   beishulayLayout = (LinearLayout) findViewById(R.id.beishulayout);
   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 (type.equals("hight")) {
     issueText.setText("第" + betAndGift.getBatchcode() + "期");
   } else if (type.equals("zc")) {
     issueText.setText("第" + betAndGift.getBatchcode() + "期");
   } else {
     issueText.setText("第" + PublicMethod.toIssue(betAndGift.getLotno()) + "期");
   }
   if (type.equals("zc")) {
     textTitle.setText("注码:共有1笔投注");
     textZhuma.setText(betAndGift.getBet_code());
     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();
     addview.getCodeList().get(addview.getSize() - 1).setTextCodeColor(textZhuma);
     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();
           }
         });
   }
   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
           ZiXuanTouZhu.this.finish();
         }
       });
   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();
           }
         }
       });
 }
示例#10
0
  /** 初始化组件 */
  public void init() {
    isDialog = false;
    if (betAndGift.isZhui()) {
      initZhuiJia();
    }
    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);
    issueText.setText("第" + PublicMethod.toIssue(betAndGift.getLotno()) + "期");
    getTouzhuAlert();
    if (type.equals("zc")) {
      textTitle.setText("注码:共有1笔投注");
      textZhuma.setText(betAndGift.getBet_code());
    } else {
      initImageView();
      ZixuanActivity.addView
          .getCodeList()
          .get(ZixuanActivity.addView.getSize() - 1)
          .setTextCodeColor(textZhuma);
      textTitle.setText("注码:" + "共有" + ZixuanActivity.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
              ZixuanActivity.addView.createCodeInfoDialog(GiftActivity.this);
              ZixuanActivity.addView.showDialog();
            }
          });
    }
    Button cancel = (Button) findViewById(R.id.alert_dialog_touzhu_button_cancel);
    Button ok = (Button) findViewById(R.id.alert_dialog_touzhu_button_ok);
    editLanguage = (EditText) findViewById(R.id.gift_edit_language);
    editLanguage.setText(languageStr);
    editPhone = (EditText) findViewById(R.id.gift_edit_phone);
    ok = (Button) findViewById(R.id.alert_dialog_touzhu_button_ok);
    ok.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            addPerson();
            if (checkedPersons.size() != 0) {
              beginTouZhu();
            } else {
              Toast.makeText(
                      GiftActivity.this, R.string.ruyichuanqing_atleastone, Toast.LENGTH_SHORT)
                  .show();
            }
          }
        });
    cancel = (Button) findViewById(R.id.alert_dialog_touzhu_button_cancel);
    cancel.setOnClickListener(
        new OnClickListener() {
          public void onClick(View v) {
            // TODO Auto-generated method stub
            finish();
          }
        });
    language = (ImageButton) findViewById(R.id.gift_img_language);
    language.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            if (Constants.avdiceStr == null) {
              giftMsgNet();
            } else {
              adviceDialog();
            }
          }
        });
    phone = (ImageButton) findViewById(R.id.gift_img_phone);
    phone.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            editPhone.setText("");
            checkedPersons.clear();
            LinkDialog();
          }
        });
    //		zhuma = (TextView) findViewById(R.id.gift_text_zhuma);
    //		zhushu = (TextView) findViewById(R.id.gift_text_zhushu);
    editLanguage.setOnTouchListener(
        new OnTouchListener() {

          @Override
          public boolean onTouch(View arg0, MotionEvent arg1) {
            // TODO Auto-generated method stub
            editLanguage.setFocusable(true);
            return false;
          }
        });
    editPhone.setOnTouchListener(
        new OnTouchListener() {

          @Override
          public boolean onTouch(View arg0, MotionEvent arg1) {
            // TODO Auto-generated method stub
            editPhone.setFocusable(true);
            return false;
          }
        });
  }
示例#11
0
 public void setTitle(String title) {
   this.title = PublicMethod.toLotno(title);
 }
示例#12
0
  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();
  }
示例#13
0
  /** 初始化组件 */
  public void init() {
    TextView title = (TextView) findViewById(R.id.join_text_title);
    Button imgRetrun = (Button) findViewById(R.id.join_img_return);
    title.setText("合买大厅");
    title.append("-" + PublicMethod.toLotno(lotno));
    imgRetrun.setBackgroundResource(R.drawable.returnselecter);
    // ImageView的返回事件
    imgRetrun.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            finish();
          }
        });
    LinearLayout top = (LinearLayout) findViewById(R.id.join_info_check_linear_top);
    top.setVisibility(LinearLayout.VISIBLE);
    progress = (Button) findViewById(R.id.join_info_btn_progress);
    progress.setBackgroundResource(R.drawable.join_info_btn_selecter);
    allAtm = (Button) findViewById(R.id.join_info_btn_all_atm);
    allAtm.setBackgroundResource(R.drawable.join_info_btn_selecter);
    atm = (Button) findViewById(R.id.join_info_btn_atm);
    atm.setBackgroundResource(R.drawable.join_info_btn_selecter);
    check = (CheckBox) findViewById(R.id.jion_info_check);
    check.setButtonDrawable(R.drawable.join_info_check_select);
    listview = (ListView) findViewById(R.id.join_listview);
    imgUp = (ImageButton) findViewById(R.id.join_img_up);
    imgUp.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            newPage--;
            if (newPage < 0) {
              newPage = 0;
              Toast.makeText(JoinInfoActivity.this, "已至首页", Toast.LENGTH_SHORT).show();
            } else {
              initList();
            }
          }
        });
    imgDown = (ImageButton) findViewById(R.id.join_img_down);
    imgDown.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            if (newPage > listPages.size() - 1) {
              newPage = listPages.size() - 1;
            }
            newPage++;
            if (newPage < allPage) {
              if (newPage > listPages.size() - 1) {
                joinInfokNet(orderBy, orderDir);
              } else {
                initList();
              }
            } else {
              newPage = allPage - 1;
              Toast.makeText(JoinInfoActivity.this, "已至尾页", Toast.LENGTH_SHORT).show();
            }
          }
        });
    pageText = (TextView) findViewById(R.id.join_text_page);
    pageText.setText(getTextPage(-1, 0));
  }
示例#14
0
  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();
            }
          }
        });
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.betting_success);

    // 获取意图数据的数据
    Intent intent = getIntent();
    // 获取页面标识
    pageInt = intent.getIntExtra("page", -1);
    fromInt = intent.getIntExtra("from", -1);
    // 获取彩种编号
    lotnoString = intent.getStringExtra("lotno");
    // 获取投注金额
    String amountString = intent.getStringExtra("amount");
    // 是否是双色球
    boolean isSsq = intent.getBooleanExtra("isssq", false);

    // 初始化返回按钮
    returnBettingButton = (Button) findViewById(R.id.ssq_bettingsuccess_returnbetting);
    returnBettingButton.setOnClickListener(new ButtonOnClickListener());

    /** modify by pengcx 20130723 start */
    // 初始化投注提示语显示
    promptTextView = (TextView) findViewById(R.id.ssq_bettingsuccess_prompt);
    switch (pageInt) {
      case BETTING:
        promptTextView.setText("恭喜您,方案发起成功!");
        returnBettingButton.setText(R.string.ssq_bettingsuccess_returnbet);
        break;
      case ADDTO:
        promptTextView.setText("恭喜您,方案发起成功!");
        returnBettingButton.setText(R.string.ssq_bettingsuccess_returnbet);
        break;
      case COOPERATION:
        promptTextView.setText("恭喜您,发起合买成功!");
        returnBettingButton.setText(R.string.ssq_bettingsuccess_returnbet);
        break;
      case PRESENT:
        promptTextView.setText("恭喜您,方案赠送成功!");
        returnBettingButton.setText(R.string.ssq_bettingsuccess_returnbet);
        break;
      case HIGHTADDTO:
        promptTextView.setText("恭喜您,方案发起成功!");
        returnBettingButton.setText(R.string.ssq_bettingsuccess_returnbet);
        break;
    }

    if (fromInt == JOINCOOPERATION) {
      promptTextView.setText("恭喜您,参与合买成功!");
      returnBettingButton.setText(R.string.ssq_bettingsuccess_returnjoin);
    }

    betDetailButton = (Button) findViewById(R.id.ssq_bettingsuccess_betdetail);
    betDetailButton.setOnClickListener(new ButtonOnClickListener());
    if (lotnoString.equals(Constants.LOTNO_JCZQ_HUN)
        || lotnoString.equals(Constants.LOTNO_JCZQ)
        || lotnoString.equals(Constants.LOTNO_JCZQ_RQSPF)
        || lotnoString.equals(Constants.LOTNO_JCZQ_ZQJ)
        || lotnoString.equals(Constants.LOTNO_JCZQ_BF)
        || lotnoString.equals(Constants.LOTNO_JCZQ_BQC)
        || lotnoString.equals(Constants.LOTNO_ZC)
        || lotnoString.equals(Constants.LOTNO_JQC)
        || lotnoString.equals(Constants.LOTNO_LCB)
        || lotnoString.equals(Constants.LOTNO_SFC)
        || lotnoString.equals(Constants.LOTNO_RX9)
        || lotnoString.equals(Constants.LOTNO_JCLQ)
        || lotnoString.equals(Constants.LOTNO_JCLQ_RF)
        || lotnoString.equals(Constants.LOTNO_JCLQ_SFC)
        || lotnoString.equals(Constants.LOTNO_JCLQ_DXF)
        || lotnoString.equals(Constants.LOTNO_JCLQ_HUN)
        || lotnoString.equals(Constants.LOTNO_BEIJINGSINGLEGAME_WINTIELOSS)
        || lotnoString.equals(Constants.LOTNO_BEIJINGSINGLEGAME_TOTALGOALS)
        || lotnoString.equals(Constants.LOTNO_BEIJINGSINGLEGAME_OVERALL)
        || lotnoString.equals(Constants.LOTNO_BEIJINGSINGLEGAME_HALFTHEAUDIENCE)
        || lotnoString.equals(Constants.LOTNO_BEIJINGSINGLEGAME_UPDOWNSINGLEDOUBLE)) {
      betDetailButton.setVisibility(View.VISIBLE);
    }

    /** modify by pengcx 20130723 end */
    // 初始化彩种的显示
    lottypeTextView = (TextView) findViewById(R.id.ssq_bettingsuccess_lottype);
    String lottypeStrig = PublicMethod.toLotno(lotnoString);
    lottypeTextView.setText(lottypeStrig);

    // 初始化金额的显示
    amtTextView = (TextView) findViewById(R.id.ssq_bettingsuccess_amt);
    long menoy = Long.valueOf(amountString) / 100;
    amtTextView.setText(menoy + "元");

    // 如果没有绑定,则显示;否则默认不显示
    if (!isBindedEmail() && isSsq) {
      // 初始化发送到邮箱
      sendToEmailLayout = (RelativeLayout) findViewById(R.id.ssq_bettingsuccess_sendtoemail);
      sendToEmailLayout.setOnClickListener(new ButtonOnClickListener());
      sendToEmailLayout.setVisibility(View.VISIBLE);
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.alert_dialog_beijing_touzhu);

    reduceMutipleButton = (ImageButton) findViewById(R.id.buy_zixuan_img_subtract_beishu);
    reduceMutipleButton.setOnClickListener(new BeiJingSingleGameIndentOnClickListener());
    addMutipleButton = (ImageButton) findViewById(R.id.buy_zixuan_img_add_beishu);
    addMutipleButton.setOnClickListener(new BeiJingSingleGameIndentOnClickListener());
    mutipleSeekBar = (SeekBar) findViewById(R.id.buy_jc_zixuan_seek_beishu);
    mutipleSeekBar.setOnSeekBarChangeListener(new BeiJingSingleGameIndentOnSeekBarChangeListener());
    mutipleSeekBar.setProgress(1);
    mutipleEditText = (EditText) findViewById(R.id.buy_zixuan_text_beishu);
    /** add by pengcx 20130722 start */
    mutipleEditText.addTextChangedListener(
        new TextWatcher() {

          @Override
          public void afterTextChanged(Editable s) {
            if (s.length() > 1 && s.charAt(0) == '0') {
              Integer integer = Integer.valueOf(s.toString());
              mutipleEditText.setText(integer.toString());
            }
          }

          @Override
          public void beforeTextChanged(CharSequence s, int start, int count, int after) {
            // TODO Auto-generated method stub

          }

          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count) {
            // TODO Auto-generated method stub

          }
        });
    /** add by pengcx 20130722 end */
    mutipleEditText.setText(String.valueOf(mutipleSeekBar.getProgress()));
    mutipleEditText.addTextChangedListener(
        new TextWatcher() {

          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count) {}

          @Override
          public void beforeTextChanged(CharSequence s, int start, int count, int after) {}

          @Override
          public void afterTextChanged(Editable s) {
            String mutipleString = mutipleEditText.getText().toString();

            if (!mutipleString.equals("")) {
              mutipleSeekBar.setProgress(Integer.valueOf(mutipleString));
            }

            if (mutipleString.length() > 5) {
              mutipleEditText.setText("10000");
              ((EditText) mutipleEditText).setSelection(5);
            }

            setBettingInformationShow();
          }
        });

    freedomButton = (Button) findViewById(R.id.jc_alert_btn_ziyou);
    freedomButton.setBackgroundResource(R.drawable.jc_alert_right_radio_b);
    freedomButton.setOnClickListener(new BeiJingSingleGameIndentOnClickListener());
    bunchButton = (Button) findViewById(R.id.jc_alert_btn_duochuan);
    bunchButton.setBackgroundResource(R.drawable.jc_alert_left_radio);
    bunchButton.setOnClickListener(new BeiJingSingleGameIndentOnClickListener());
    bunchStyleLinearLayout = (LinearLayout) findViewById(R.id.alert_dialog_jc_layout_group);

    cooperationBuyButton = (Button) findViewById(R.id.alert_dialog_touzhu_button_cancel);
    cooperationBuyButton.setOnClickListener(new BeiJingSingleGameIndentOnClickListener());
    confirmBuyButton = (Button) findViewById(R.id.alert_dialog_touzhu_button_ok);
    confirmBuyButton.setOnClickListener(new BeiJingSingleGameIndentOnClickListener());

    selectedNum = getIntent().getIntExtra("selectedgamenum", 0);
    againstedString = getIntent().getStringExtra("selectedagainst");
    bettingInfoList = getIntent().getStringArrayListExtra("selectedeventclicknum");
    laterpartbettingcode = getIntent().getStringExtra("laterpartbettingcode");
    nowIssueString = getIntent().getStringExtra("nowIssueString");
    lotnoString = getIntent().getStringExtra("lotno");
    getIntent().getClass();

    radioGroupView = new RadioGroupView(this);
    bunchStyleLinearLayout.removeAllViews();
    addSelectDuoButtons();

    /** add by pengcx 20130703 start */
    lotoTypeTextView = (TextView) findViewById(R.id.alert_dialog_jc_lotnotype);
    gameNumTextView = (TextView) findViewById(R.id.alert_dialog_jc_gamenum);
    betNumTextView = (TextView) findViewById(R.id.alert_dialog_jc_betnum);
    moneyTextView = (TextView) findViewById(R.id.alert_dialog_jc_money);
    predictMoneyTextView = (TextView) findViewById(R.id.alert_dialog_jc_predictmoney);
    schemeTextView = (TextView) findViewById(R.id.alert_dialog_touzhu_alert_scheme);
    schemeTextView.setText(againstedString);
    schemeDetailTextView =
        (TextView) findViewById(R.id.alert_dialog_touzhu_alert_textview_schemedetail);
    upDownImageView = (ImageView) findViewById(R.id.alert_dialog_touzhu_updown);
    schemeRelativeLayout =
        (RelativeLayout) findViewById(R.id.alert_dialog_touzhu_linear_qihao_beishu);
    schemeDetailLinearLayout =
        (LinearLayout) findViewById(R.id.alert_dialog_touzhu_alert_schemedetail);
    schemeDetailTextView.setText(againstedString);
    schemeRelativeLayout.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            if (bettingInfoList.size() > 1) {
              int visibility = schemeDetailLinearLayout.getVisibility();
              if (visibility == View.VISIBLE) {
                schemeDetailLinearLayout.setVisibility(View.GONE);
                schemeTextView.setText(againstedString);
                upDownImageView.setImageResource(R.drawable.down_icon);
              } else {
                schemeDetailLinearLayout.setVisibility(View.VISIBLE);
                upDownImageView.setImageResource(R.drawable.up_icon);
                schemeTextView.setText("");
              }
            }
          }
        });
    lotoTypeTextView.setText(PublicMethod.toLotno(lotnoString));
    /** add by pengcx 20130703 end */
    setBettingInformationShow();

    handler.setBetAndGift(betAndGift);
  }