Code example for GridView

Methods: getSelectedItemPosition

0
    /** 
     * 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(); 
        return mGridView.getSelectedItemId();
    } 
 
    /** 
     * Get the activity's grid view widget. 
     */ 
    public GridView getGridView() {
        ensureList();