Beispiel #1
0
 public void dataChanged() {
   if (shopAdapter == null) {
     shopAdapter = new ShopAdapter(this, listdata);
     plListv.setAdapter(shopAdapter);
   } else {
     shopAdapter.notifyDataSetChanged();
   }
 }
Beispiel #2
0
  private void initListener() {
    plListv.setOnItemClickListener(
        new OnItemClickListener() {

          @Override
          public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
            Intent intent = new Intent(ShopActivity.this, GoodsShowActivity.class);
            Bundle b = new Bundle();
            b.putSerializable("store", listdata.get(arg2 - 1));
            intent.putExtras(b);
            startActivity(intent);
          }
        });

    mtb.setOnRightClickListener(
        new OnRightClickListener() {

          @Override
          public void onRightClick() {
            sm.showMenu();
          }
        });
  }