コード例 #1
0
  public void filltheseats() {
    mDatas.clear();
    ShouyeServiceBean service = new ShouyeServiceBean();
    service.setDefaultservice(2);
    service.setAppName("收款");
    service.setId(99);
    mDatas.add(service);

    ShouyeServiceBean endservie = new ShouyeServiceBean();
    endservie.setIcoUrl("http");
    endservie.setDefaultservice(1);
    endservie.setAppName("服务商城");
    endservie.setId(100);
    mDatas.add(endservie);
    setFill();
    ((ShouYeFragment) fm_shouye).getServiceMall(mDatas);
  }
コード例 #2
0
 /** 补位填充 */
 public void setFill() {
   if (0 != mDatas.size() % 4) {
     int numfill = 0;
     switch (mDatas.size() % 4) {
       case 1:
         numfill = 3;
         break;
       case 2:
         numfill = 2;
         break;
       case 3:
         numfill = 1;
         break;
     }
     for (int i = 0; i < numfill; i++) {
       ShouyeServiceBean filltheseats2 = new ShouyeServiceBean();
       filltheseats2.setDefaultservice(-1);
       filltheseats2.setAppName("");
       filltheseats2.setId(-1);
       mDatas.add(filltheseats2);
     }
   }
 }