Пример #1
0
 public void UpdateData() {
   //        if(!mIsRunning)
   //            return;
   if (mType == Constants.PLAYLIST) {
     // 播放列表
     if (!Global.mPlaylist.containsKey(mArg)) {
       mAdapter.setList(new ArrayList<MP3Item>());
       mNum.setText("0首歌曲");
     } else {
       new UpdateThread().start();
     }
   } else if (mType == Constants.FOLDER) {
     // 文件夹
     mArg = getIntent().getStringExtra("Title");
     if (!Global.mFolderMap.containsKey(mArg)) {
       mAdapter.setList(new ArrayList<MP3Item>());
       mNum.setText("0首歌曲");
     } else {
       new UpdateThread().start();
     }
   } else {
     // 艺术家或者专辑
     new UpdateThread().start();
   }
 }
Пример #2
0
 @Override
 public void handleMessage(Message msg) {
   if (msg.what == Constants.UPDATE_MULTI) {
     mMultiChoice.clearSelectedViews();
   } else if (msg.what == Constants.UPDATE_ADAPTER) {
     if (mInfoList == null) return;
     mAdapter.setList(mInfoList);
     mNum.setText(mInfoList.size() + "首歌曲");
   }
 }