Example #1
0
 /** 上一页 */
 protected void onPageUp() {
   int i1 = Integer.parseInt(requestParams.getBegin());
   int i2 = 0;
   if (i1 <= 1) {
     setToolBar(1, false, R.color.zr_newlightgray);
     return;
   } else {
     i1 -= pageNum;
     i2 = Integer.parseInt(requestParams.getEnd()) - pageNum;
     if (i1 <= 1) {
       setToolBar(1, false, R.color.zr_newlightgray);
       setToolBar(2, true, R.color.zr_white);
     } else {
       setToolBar(1, true, R.color.zr_white);
       setToolBar(2, true, R.color.zr_white);
     }
   }
   i1 = (i1 <= 1) ? 1 : i1;
   // i2 = (i2<pageNum)?pageNum:i2;
   String begin = String.valueOf(i1);
   String end = String.valueOf(i2);
   requestParams.setBegin(begin);
   requestParams.setEnd(end);
   setToolBar();
 }
Example #2
0
 /** 下一页 */
 protected void onPageDn() {
   int i1 = Integer.parseInt(requestParams.getBegin()) + pageNum;
   int i2 = Integer.parseInt(requestParams.getEnd()) + pageNum;
   if (i2 >= allStockNums) {
     // i2 = allStockNums;
     setToolBar(1, true, R.color.zr_white);
     setToolBar(2, false, R.color.zr_newlightgray);
   } else {
     setToolBar(1, true, R.color.zr_white);
     setToolBar(2, true, R.color.zr_white);
   }
   String begin = String.valueOf(i1);
   String end = String.valueOf(i2);
   requestParams.setBegin(begin);
   requestParams.setEnd(end);
   setToolBar();
 }
Example #3
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.zr_table);
    initTitle(
        R.drawable.njzq_title_left_back, 0, getResources().getString(R.string.sunprivatetitle));
    String[] toolbarname =
        new String[] {
          Global.TOOLBAR_MENU,
          Global.TOOLBAR_SHANGYE,
          Global.TOOLBAR_XIAYIYE,
          Global.TOOLBAR_REFRESH
        };
    initToolBar(toolbarname, Global.BAR_TAG);
    setToolBar(1, false, R.color.zr_newlightgray);
    menu = getResources().getStringArray(R.array.stock_type_menu);
    requestParams = new RequestParams();
    requestParams.setPaixu("nw");
    cols = getResources().getStringArray(R.array.sunprivate_colsname);
    this.activityKind = Global.SUN_PRIVATE;

    Bundle bundle = getIntent().getExtras();
    if (null != bundle) { // 从查询条件带过来
      jingzhi1 = (String) bundle.get("jingzhi1");
      jingzhi2 = (String) bundle.get("jingzhi2");
      jingzhiAdd1 = bundle.getString("jingzhiAdd1");
      jingzhiAdd2 = bundle.getString("jingzhiAdd2");
    }
    requestParams.setJingzhiAdd1(jingzhiAdd1);
    requestParams.setJingzhiAdd2(jingzhiAdd2);
    requestParams.setJingzhi1(jingzhi1);
    requestParams.setJingzhi2(jingzhi2);

    // 根据不同分辨率获得可显示行数
    pageNum = CssSystem.getTablePageSize(SunPrivate.this);
    rowHeight = CssSystem.getTableRowHeight(SunPrivate.this);
    requestParams.setBegin("1");
    requestParams.setEnd(String.valueOf(pageNum));
    handlerData();
    setToolBar(1, false, R.color.zr_newlightgray);
  }