Code example for CursorWindow

Methods: getNumRows

0
        return onMove(oldPos, curRow);
    } 
 
    @Override 
    public boolean moveToPosition(int position) {
        if (position < -1 && position >= window.getNumRows()) {
            return false; 
        } 
        int oldPos = curRow;
        curRow = position;
        return onMove(oldPos, curRow);
    } 
 
    @Override 
    public boolean moveToPrevious() { 
        int oldPos = curRow--;
        if (isBeforeFirst()) { 
            curRow = -1;
            return false; 
        } 
        return onMove(oldPos, curRow);
    } 
 
    /** Not supported */ 
    @Override 
    public void registerContentObserver(ContentObserver observer) {
        // Does nothing 
    } 
 
    /** Not supported */ 
    @Override 
    public void registerDataSetObserver(DataSetObserver observer) {
        // Does nothing 
    } 
 
    /** Deprecated, not supported */ 
    @Override 
    public boolean requery() { 
        return false; 
    } 
 
    /** Not supported */ 
    @Override 
    public Bundle respond(Bundle extras) {
        // Does nothing 
        return null; 
    } 
 
    /** Not supported */ 
    @Override 
    public void setNotificationUri(ContentResolver cr, Uri uri) {
        // Does nothing 
    } 
 
    /** Not supported */ 
    @Override 
    public void unregisterContentObserver(ContentObserver observer) {
        // Does nothing 
    } 
 
    /** Not supported */ 
    @Override 
    public void unregisterDataSetObserver(DataSetObserver observer) {
        // Does nothing 
    } 
 
    @Override 
    public void fillWindow(int position, CursorWindow window) {
        CursorHelper.copyCursorWindow(position, this.window, window);
    } 
 
    @Override 
    public CursorWindow getWindow() {
        CursorWindow ret = new CursorWindow(false);
        fillWindow(0, ret);
        return ret;
    } 
 
    @Override 
    public boolean onMove(int oldPosition, int newPosition) {
        // Don't forget to set curRow = -1 if this method returns false 
        return true; 
    } 
 
    /** Sets this cursor using a CursorWindow data */ 
    public void setFromWindow(CursorWindow window) {
        CursorHelper.copyCursorWindow(0, window, this.window);
        numColumns = CursorHelper.getCursorWindowNumCols(window);
        moveToPosition(-1); 
    } 
 
    /** Sets this cursor from another windowed Cursor */