Code example for CursorAdapter

Methods: getItemId

0
        if (isAllTracksItem(position)) {
            return ALL_ITEM_ID;
        } else if (isLevel2Header(position)) {
            return LEVEL_2_SECTION_HEADER_ITEM_ID;
        } 
        return super.getItemId(adapterPositionToCursorPosition(position));
    } 
 
    @Override 
    public boolean areAllItemsEnabled() { 
        return false; 
    } 
 
    @Override 
    public boolean isEnabled(int position) {
        return position < (mHasAllItem ? 1 : 0)
                || !isLevel2Header(position)
                && super.isEnabled(adapterPositionToCursorPosition(position));
    } 
 
    @Override