Ejemplo n.º 1
0
  /** 初始化列表数据 */
  public void setValue() {
    try {
      Vector<Info> checkInfos = new Vector<Info>();
      JSONArray array = json.getJSONArray("result");
      allPage = Integer.parseInt(json.getString("totalPage"));
      for (int i = 0; i < array.length(); i++) {
        JSONObject obj = array.getJSONObject(i);
        Info info = new Info();
        info.setAllAtm(obj.getString("totalAmt"));
        info.setAtm(obj.getString("buyAmt"));
        info.setName(obj.getString("starter"));
        info.setProgress(obj.getString("progress"));
        info.setId(obj.getString("caseLotId"));
        JSONObject displayIcon = obj.getJSONObject("displayIcon");
        try {
          info.setCup(displayIcon.getString("cup"));
        } catch (Exception e) {

        }
        try {
          info.setDiamond(displayIcon.getString("diamond"));
        } catch (Exception e) {

        }
        try {
          info.setStarNum(displayIcon.getString("goldStar"));
        } catch (Exception e) {

        }
        try {
          info.setCrown(displayIcon.getString("crown"));
        } catch (Exception e) {

        }
        checkInfos.add(info);
      }
      listPages.add(checkInfos);
    } catch (Exception e) {

    }
  }
Ejemplo n.º 2
0
  /** 初始化列表数据 */
  public void setValue() {
    try {
      Vector<Info> checkInfos = new Vector<Info>();
      JSONArray array = json.getJSONArray("result");
      viewInfos[topIndex][lottypeIndex].allPage = Integer.parseInt(json.getString("totalPage"));
      for (int i = 0; i < array.length(); i++) {
        JSONObject obj = array.getJSONObject(i);
        Info info = new Info();
        info.setLottype(obj.getString("lotName"));
        info.setAllAtm(obj.getString("totalAmt"));
        info.setAtm(obj.getString("buyAmt"));
        info.setName(obj.getString("starter"));
        info.setProgress(obj.getString("progress"));
        info.setId(obj.getString("caseLotId"));
        info.setLotno(obj.getString("lotNo"));
        info.setBatchCode(obj.getString("batchCode"));
        info.setIsTop(obj.getString("isTop"));
        JSONObject displayIcon = obj.getJSONObject("displayIcon");
        try {
          info.setCup(displayIcon.getString("cup"));

        } catch (Exception e) {

        }
        try {
          info.setGrayCup(displayIcon.getString("graycup"));
        } catch (Exception e1) {
          e1.printStackTrace();
        }
        try {
          info.setDiamond(displayIcon.getString("diamond"));

        } catch (Exception e) {

        }
        try {
          info.setGrayDiamond(displayIcon.getString("graydiamond"));
        } catch (Exception e1) {
          e1.printStackTrace();
        }
        try {
          info.setStarNum(displayIcon.getString("goldStar"));

        } catch (Exception e) {

        }
        try {
          info.setGrayStarNum(displayIcon.getString("graygoldStar"));
        } catch (Exception e1) {
          e1.printStackTrace();
        }
        try {
          info.setCrown(displayIcon.getString("crown"));

        } catch (Exception e) {

        }
        try {
          info.setGrayCrown(displayIcon.getString("graycrown"));
        } catch (Exception e1) {
          e1.printStackTrace();
        }
        try {
          info.setStarterUserNo(obj.getString("starterUserNo"));
        } catch (Exception e) {

        }
        info.setSafe(obj.getString("safeRate"));
        checkInfos.add(info);
        viewInfos[topIndex][lottypeIndex].listdata.add(info);
      }

    } catch (Exception e) {

    }
  }