Code example for GridView

Methods: setSelection

0
     * 
     * @param position 
     */ 
    public void setSelection(int position) {
        ensureList(); 
        mGridView.setSelection(position);
    } 
 
    /** 
     * Get the position of the currently selected grid item. 
     */ 
    public int getSelectedItemPosition() { 
        ensureList(); 
        return mGridView.getSelectedItemPosition();
    } 
 
    /** 
     * Get the cursor row ID of the currently selected grid item. 
     */ 
    public long getSelectedItemId() { 
        ensureList();