Search in sources :

Example 1 with PageDetectorSupport

use of com.tmall.wireless.tangram3.support.PageDetectorSupport in project Tangram-Android by alibaba.

the class PojoGroupBasicAdapter method onBindViewHolder.

@Override
public void onBindViewHolder(BinderViewHolder<BaseCell, ? extends View> holder, int position) {
    super.onBindViewHolder(holder, position);
    int idx = findCardIdxFor(position);
    if (idx >= 0) {
        Pair<Range<Integer>, Card> pair = mCards.get(idx);
        pair.second.onBindCell(position - pair.first.getLower(), position, mLastBindPosition < 0 || mLastBindPosition < position);
        PageDetectorSupport pageDetectorSupport = pair.second.serviceManager.getService(PageDetectorSupport.class);
        if (pageDetectorSupport != null) {
            pageDetectorSupport.onBindItem(position, mLastBindPosition < 0 || mLastBindPosition < position, getItemByPosition(position));
        }
    }
    mLastBindPosition = position;
}
Also used : PageDetectorSupport(com.tmall.wireless.tangram3.support.PageDetectorSupport) Range(com.alibaba.android.vlayout.Range)

Aggregations

Range (com.alibaba.android.vlayout.Range)1 PageDetectorSupport (com.tmall.wireless.tangram3.support.PageDetectorSupport)1