Code example for CursorAdapter

Methods: notifyDataSetChanged

0
     * Resets list-cursor mapping. 
     */ 
    public void reset() { 
        resetMappings(); 
        notifyDataSetChanged();
    } 
 
    private void resetMappings() { 
        mListMapping.clear();
        mRemovedCursorPositions.clear();
    } 
 
    @Override 
    public Object getItem(int position) {
        return super.getItem(mListMapping.get(position, position));
    } 
 
    @Override 
    public long getItemId(int position) {
        return super.getItemId(mListMapping.get(position, position));
    }