예제 #1
0
 public void ResultFilter() {
   mFileListFilter.clear();
   switch (param.getSearchType()) {
     case 0: // 全部
       mFileListFilter.addAll(param.getSearchItems());
       fileAdapter.notifyDataSetChanged();
       break;
     case 1: // 音乐
       mFileListFilter.addAll(ItemFilter(getGroupItem(1), param.getSearchItems()));
       fileAdapter.notifyDataSetChanged();
       break;
     case 2: // 视频
       mFileListFilter.addAll(ItemFilter(getGroupItem(3), param.getSearchItems()));
       fileAdapter.notifyDataSetChanged();
       break;
     case 3: // 图片
       mFileListFilter.addAll(ItemFilter(getGroupItem(2), param.getSearchItems()));
       fileAdapter.notifyDataSetChanged();
       break;
     case 4: // 文档
       mFileListFilter.addAll(ItemFilter(getGroupItem(4), param.getSearchItems()));
       fileAdapter.notifyDataSetChanged();
       break;
     case 5: // 安装包
       mFileListFilter.addAll(ItemFilter(getGroupItem(7), param.getSearchItems()));
       fileAdapter.notifyDataSetChanged();
       break;
     case 6: // 压缩包
       mFileListFilter.addAll(ItemFilter(getGroupItem(6), param.getSearchItems()));
       fileAdapter.notifyDataSetChanged();
       break;
     default:
       break;
   }
 }
예제 #2
0
 private void SelectAll() {
   if (mFileListFilter.size() >= 1) {
     boolean check = !mFileListFilter.get(0).isChecked();
     for (int i = 0; i < mFileListFilter.size(); i++) {
       FileBean tmpInfo = mFileListFilter.get(i);
       tmpInfo.setChecked(check);
     }
     fileAdapter.notifyDataSetChanged();
   }
 }
예제 #3
0
 public void onScrollStateChanged(AbsListView view, int scrollState) {
   switch (scrollState) {
     case AbsListView.OnScrollListener.SCROLL_STATE_FLING:
       P.debug("SCROLL_STATE_FLING");
       if (fileAdapter != null) fileAdapter.setShowLogo(false);
       break;
     case AbsListView.OnScrollListener.SCROLL_STATE_IDLE:
       P.debug("SCROLL_STATE_IDLE");
       if (fileAdapter != null) {
         fileAdapter.setShowLogo(true);
         fileAdapter.notifyDataSetChanged();
       }
       break;
     case AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL:
       P.debug("SCROLL_STATE_TOUCH_SCROLL");
       if (fileAdapter != null) fileAdapter.setShowLogo(false);
       break;
     default:
       break;
   }
 }
예제 #4
0
 @Override
 public void Refresh() {
   // TODO Auto-generated method stub
   fileAdapter.notifyDataSetChanged();
 }