@Override
    public int getItemType(BaseCell item) {
        // if the item is a keyType, which means item.type is not the key
        int version = mViewManager != null ? mViewManager.getViewVersion(item.stringType) : 0;
        if (!TextUtils.isEmpty(item.typeKey)) {
            // we should use getTypeKey()
            String typeKey = item.typeKey + version;
            if (!mStrKeys.containsKey(typeKey)) {
                int newType = mTypeId.getAndIncrement();
                mStrKeys.put(typeKey, newType);
                mId2Types.put(newType, item.stringType);
            }

            return mStrKeys.get(typeKey).intValue();
        } else {
            // otherwise, use item.type as identity key
            // note, this now only be executed in MainThread, atomic not actually needed
            String stringType = item.stringType + version;
            if (!mStrKeys.containsKey(stringType)) {
                int newType = mTypeId.getAndIncrement();
                mStrKeys.put(stringType, newType);
                mId2Types.put(newType, item.stringType);
            }
            return mStrKeys.get(stringType).intValue();
        }
    }
@ Override public int getItemType ( BaseCell item ) { int version = mViewManager != null ? mViewManager . getViewVersion ( item . stringType ) : 0 ; if ( ! TextUtils . isEmpty ( item . typeKey ) ) { String typeKey = item . typeKey + version ; if ( ! mStrKeys . containsKey ( typeKey ) ) { int newType = mTypeId . getAndIncrement ( ) ; mStrKeys . put ( typeKey , newType ) ; mId2Types . put ( newType , item . stringType ) ; } return mStrKeys . get ( typeKey ) . intValue ( ) ; } else { String stringType = item . stringType + version ; if ( ! mStrKeys . containsKey ( stringType ) ) { int newType = mTypeId . getAndIncrement ( ) ; mStrKeys . put ( stringType , newType ) ; mId2Types . put ( newType , item . stringType ) ; } return mStrKeys . get ( stringType ) . intValue ( ) ; } }
Find itemType for Cell

@param item the cell data
@return itemType as int used for recycled id