Code example for GridView

Methods: getSelectedItemId

0
    /** 
     * 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(); 
        return mGridView;
    } 
 
    /** 
     * The default content for a SherlockGridFragment has a TextView that can 
     * be shown when the grid is empty. If you would like to have it 
     * shown, call this method to supply the text it should use. 
     */