Code example for CursorAdapter

Methods: getCount

0
        return position;
    } 
 
    @Override 
    public int getCount() { 
        int superCount = super.getCount();
        if (superCount == 0) {
            return  0; 
        } 
 
        return superCount
                + (mFirstLevel2CursorPosition >= 0 ? 1 : 0)
                + (mHasAllItem ? 1 : 0);
    } 
 
    @Override 
    public View getView(int position, View convertView, ViewGroup parent) {
        if (isAllTracksItem(position)) {
            if (convertView == null) {
                convertView = mActivity.getLayoutInflater().inflate(
                        R.layout.list_item_track, parent, false);