Esempio n. 1
0
  private void initView() {
    // TODO Auto-generated method stub

    rl_wd = (RelativeLayout) findViewById(R.id.main_rl_my);
    rl_wd.setOnClickListener(this);
    rl_xx = (RelativeLayout) findViewById(R.id.main_rl_pos1);
    rl_xx.setOnClickListener(this);
    rl_sy = (RelativeLayout) findViewById(R.id.main_rl_sy);
    rl_sy.setOnClickListener(this);

    findViewById(R.id.confirm)
        .setOnClickListener(
            new OnClickListener() {

              @Override
              public void onClick(View v) {
                // TODO Auto-generated method stub
                Intent i = new Intent(ShopCar.this, ConfirmOrder.class);
                startActivity(i);
              }
            });

    myAdapter = new ShopcarAdapter(ShopCar.this, myShopList);
    eva_nodata = (LinearLayout) findViewById(R.id.eva_nodata);
    Xlistview = (XListView) findViewById(R.id.x_listview);
    // refund_listview.getmFooterView().getmHintView().setText("已经没有数据了");
    Xlistview.setPullLoadEnable(true);
    Xlistview.setXListViewListener(this);
    Xlistview.setDivider(null);
    Xlistview.getmFooterView().setState2(0);
    Xlistview.setOnItemClickListener(
        new OnItemClickListener() {

          @Override
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            // TODO Auto-generated method stub
            // Intent i = new Intent(ShopCar.this, OrderDetail.class);
            // startActivity(i);
          }
        });
    Xlistview.setAdapter(myAdapter);
  }
Esempio n. 2
0
 private void onLoad() {
   Xlistview.stopRefresh();
   Xlistview.stopLoadMore();
   Xlistview.setRefreshTime(Tools.getHourAndMin());
 }