예제 #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 += info.getHome() + " vs " + info.getAway() + ":";
       for (int j = 0; j < info.check.length; j++) {
         if (info.check[j].isChecked()) {
           codeStr += info.check[j].getChcekTitle() + " ";
         }
       }
       if (info.isDan()) {
         codeStr += "(胆)";
       }
       codeStr += "\n\n";
     }
   }
   return codeStr;
 }
예제 #2
0
 @Override
 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;
 }
예제 #3
0
    // add by yejc 20130402
    private View addView(final Info info) {
      View convertView = mInflater.inflate(R.layout.buy_jc_main_listview_item_others, null);
      TextView gameName = (TextView) convertView.findViewById(R.id.game_name);
      TextView gameDate = (TextView) convertView.findViewById(R.id.game_date);

      final TextView homeTeam = (TextView) convertView.findViewById(R.id.home_team_name);
      //			homeTeam.getPaint().setFakeBoldText(true);
      //			final TextView textVS = (TextView) convertView
      //					.findViewById(R.id.game_vs);
      //			if (!"".equals(info.getLetPoint()) && !"0".equals(info.getLetPoint())) {
      //				textVS.setText(info.getLetPoint());
      //			}
      final TextView guestTeam = (TextView) convertView.findViewById(R.id.guest_team_name);
      TextView 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);

      gameName.setText(info.getTeam());
      String date =
          getWeek(info.getWeeks())
              + " "
              + info.getTeamId()
              + "\n"
              + PublicMethod.getEndTime(info.getTimeEnd())
              + " "
              + "(截)";
      gameDate.setText(date);
      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();
              }
            }
          });

      // textVS.setText(info.getWin());
      guestTeam.setText(info.getAway());

      if (!info.getBtnStr().equals("")) {
        btn.setText(info.getBtnStr());
      }
      btn.setOnClickListener(
          new OnClickListener() {
            @Override
            public void onClick(View v) {
              if (info.onclikNum > 0 || isCheckTeam()) {
                info.createDialog(FootBF.titleStrs, true, info.getHome() + " VS " + info.getAway());
              }
              isNoDan(info, btnDan);
            }
          });
      if (isDanguan || isHunHe()) {
        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(R.drawable.jc_btn);
                } else if (info.onclikNum > 0 && isDanCheckTeam() && isDanCheck()) {
                  info.setDan(true);
                  btnDan.setBackgroundResource(R.drawable.jc_btn_b);
                }
              }
            });
      }
      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);
      } else {
        btnDan.setBackgroundResource(R.drawable.jc_btn);
      }
      /** add by pnegcx 20130624 end */
      return convertView;
    }