@SuppressWarnings("deprecation")
  @Override
  public void initWidget() {
    super.initWidget();

    gestureDetector = new GestureDetector(this); // 手势滑动

    titleImg.setBackgroundResource(R.drawable.title_splb);
    foodBtn.setText("食品");
    textileBtn.setText("家纺");
    washBtn.setText("洗护");

    // 分类下的彩色条
    gestureDetector = new GestureDetector(this); // 手势滑动
    windowsWidth = this.getWindowManager().getDefaultDisplay().getWidth();
    int offset = ListUtils.dip2px(aty, 30);
    btnSelected.getLayoutParams().width = windowsWidth / 3 - offset;

    listView = (ListView) this.findViewById(R.id.private_order_list);
    listView.setAdapter(adapter);
    listView.setOnItemClickListener(
        new OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
            Bundle bundle = new Bundle();
            bundle.putString("name", list.get(position).getName());
            bundle.putString("description", list.get(position).getName());
            bundle.putString("address", list.get(position).getName());
            bundle.putString("path", list.get(position).getImagePath());
            bundle.putString("type", list.get(position).getType());
            MemberShoppeActivity.this.showActivity(aty, TypeDetailActivity.class, bundle);
          }
        });
  }
Beispiel #2
0
 @Override
 public void initWidget() {
   super.initWidget();
   mListView.setAdapter(new MyAdapter(aty, mList));
 }