Example #1
0
        @Override
        public void handleMessage(Message msg) {
          super.handleMessage(msg);
          if (msg.what == 0) {
            if (tmz_Cur_Num == 1) {
              tmzGoodses = (ArrayList<TMZGoods>) msg.obj;
              if (tmzGoodses != null) {
                setAdapterForTMZ();
              }
            } else {
              ArrayList<TMZGoods> newtmzGoodses = (ArrayList<TMZGoods>) msg.obj;
              if (newtmzGoodses != null) {
                tmzGoodses.addAll(newtmzGoodses);
                customTMZListViewAdapter.notifyDataSetChanged();
              }
              listViewTMZ.onRefreshComplete();
            }

          } else if (msg.what == 1) {
            if (jjks_Cur_Num == 1) {
              jjksGoodses = (ArrayList<JJKSGoods>) msg.obj;
              if (jjksGoodses != null) {
                setAdapterForJJKS();
              }
            } else {
              ArrayList<JJKSGoods> newjjksGoodses = (ArrayList<JJKSGoods>) msg.obj;
              if (newjjksGoodses != null) {
                jjksGoodses.addAll(newjjksGoodses);
                customJSKSListViewAdapter.notifyDataSetChanged();
              }
              listViewJJKS.onRefreshComplete();
            }
          }
        }
Example #2
0
 private void setAdapterForTMZ() {
   customTMZListViewAdapter = new CustomTMZListViewAdapter(tmzGoodses, getActivity());
   listViewTMZ.setAdapter(customTMZListViewAdapter);
   customTMZListViewAdapter.notifyDataSetChanged();
   listViewTMZ.onRefreshComplete();
 }