Code example for SimpleCursorAdapter

Methods: getItem

0
    } 
 
    @Override 
    public Object getItem(int position) {
        processPosition(position);
        return super.getItem(position);
    } 
 
    private void processPosition(int position) {
        if (mHasMore && (position > getCount() - mPerPage / 2)) {
            if (D) Log.d(LOG_TAG, String.format("Load more: %d of %d", position, getCount()));
            loadMore(); 
        } else { 
            if (loadMoreListener != null)
                loadMoreListener.onItemRequested(position);
        } 
    } 
 
    @Override 
    public View getView(int position, View convertView, ViewGroup parent) {
        processPosition(position);