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
 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 += info.getAway() + " vs " + info.getHome() + "(主)" + ":";
       if (info.isWin()) {
         codeStr += "小";
       }
       if (info.isFail()) {
         codeStr += "大";
       }
       if (info.isDan()) {
         codeStr += "(胆)";
       }
       codeStr += "\n\n";
     }
   }
   return codeStr;
 }
Exemplo n.º 3
0
    // add by yejc 20130402
    private View addView(final Info info, final int index) {
      View convertView = mInflater.inflate(R.layout.buy_jc_main_listview_item_others, null);
      View divider = (View) convertView.findViewById(R.id.jc_main_divider_up);
      if (index == 0) {
        divider.setVisibility(View.VISIBLE);
      } else {
        divider.setVisibility(View.GONE);
      }
      TextView gameName = (TextView) convertView.findViewById(R.id.game_name);
      TextView gameNum = (TextView) convertView.findViewById(R.id.game_num);
      TextView gameDate = (TextView) convertView.findViewById(R.id.game_date);
      TextView gameTime = (TextView) convertView.findViewById(R.id.game_time);
      final TextView homeTeam = (TextView) convertView.findViewById(R.id.home_team_name);
      final TextView guestTeam = (TextView) convertView.findViewById(R.id.guest_team_name);

      final Button btn = (Button) convertView.findViewById(R.id.jc_main_list_item_button);

      TextView analysis = (TextView) convertView.findViewById(R.id.game_analysis);
      final Button btnDan = (Button) convertView.findViewById(R.id.game_dan);
      final LinearLayout layout =
          (LinearLayout) convertView.findViewById(R.id.jc_play_detail_layout);

      gameName.setText(info.getTeam());
      String num = info.getTeamId();
      String date = PublicMethod.getTime(info.getTimeEnd());
      String time = PublicMethod.getEndTime(info.getTimeEnd()) + " " + "(截)";
      //			String date = getWeek(info.getWeeks()) + " " + info.getTeamId()
      //					+ "\n" + PublicMethod.getEndTime(info.getTimeEnd()) + " "
      //					+ "(截)";
      gameNum.setText(num);
      gameDate.setText(date);
      gameTime.setText(time);
      homeTeam.setText(info.getHome());

      gameName.setOnClickListener(
          new View.OnClickListener() {

            @Override
            public void onClick(View v) {
              if (context instanceof JcMainActivity) {
                JcMainActivity activity = (JcMainActivity) context;
                activity.createTeamDialog();
              }
            }
          });
      guestTeam.setText(info.getAway());

      btn.setOnClickListener(
          new OnClickListener() {
            @Override
            public void onClick(View v) {
              LinearLayout detailLayout =
                  (LinearLayout) mFactory.inflate(R.layout.buy_jc_zq_bqc_layout, null);
              showLayout(layout, detailLayout, index, info, FootBQC.titleStrs, btn);
              isNoDan(info, btnDan);
            }
          });
      if (isDanguan) {
        btnDan.setVisibility(Button.GONE);
      } else {
        btnDan.setVisibility(Button.VISIBLE);
        btnDan.setOnClickListener(
            new OnClickListener() {
              @Override
              public void onClick(View v) {
                if (info.isDan()) {
                  info.setDan(false);
                  btnDan.setBackgroundResource(android.R.color.transparent);
                  btnDan.setTextColor(black);
                } else if (info.onclikNum > 0 && isDanCheckTeam() && isDanCheck()) {
                  info.setDan(true);
                  btnDan.setBackgroundResource(R.drawable.jc_btn_b);
                  btnDan.setTextColor(white);
                }
              }
            });
      }
      analysis.setOnClickListener(
          new OnClickListener() {
            @Override
            public void onClick(View v) {
              trunExplain(getEvent(Constants.JCFOOT, info), info.getHome(), info.getAway());
            }
          });

      /** add by pnegcx 20130624 start */
      if (info.isDan()) {
        btnDan.setBackgroundResource(R.drawable.jc_btn_b);
        btnDan.setTextColor(white);
      } else {
        btnDan.setBackgroundResource(android.R.color.transparent);
        btnDan.setTextColor(black);
      }
      /** add by pnegcx 20130624 end */
      return convertView;
    }