コード例 #1
0
    public View getView(int position, View convertView, ViewGroup parent) {
      final OneLabelItemView view;
      if (convertView == null) {
        view =
            new OneLabelItemView(
                mActivity,
                mVideoManager,
                parent.getWidth(),
                mFallbackBitmap,
                mList.getSelector(),
                true);
      } else {
        view = (OneLabelItemView) convertView;
      }
      final Actor actor = this.getItem(position);
      view.reset();
      view.position = position;
      view.title = actor.name;

      if (mLoadCovers) {
        if (mVideoManager.coverLoaded(actor, mThumbSize)) {
          view.setCover(mVideoManager.getCoverSync(actor, mThumbSize));
        } else {
          view.setCover(null);
          view.getResponse().load(actor, !mPostScrollLoader.isListIdle());
        }
      }

      return view;
    }
コード例 #2
0
 public View getView(int position, View convertView, ViewGroup parent) {
   final OneLabelItemView view;
   if (convertView == null) {
     view =
         new OneLabelItemView(
             mActivity, parent.getWidth(), mFallbackBitmap, mList.getSelector(), true);
   } else {
     view = (OneLabelItemView) convertView;
     mItemPositions.remove(view.position);
   }
   final PlaylistItem item = this.getItem(position);
   view.reset();
   view.position = position;
   view.title = item.filename;
   if (position == mCurrentPosition) {
     view.setCover(sPlayingBitmap);
   } else {
     view.setCover(mFallbackBitmap);
   }
   mItemPositions.put(view.position, view);
   return view;
 }