Code example for GridView

Methods: setAdapter, getSelectedItemPosition, setEmptyView, setOnItemClickListener

0
    /** 
     * Get the position of the currently selected grid item. 
     */ 
    public int getSelectedItemPosition() { 
        ensureGrid(); 
        return mGrid.getSelectedItemPosition();
    } 
 
    /** 
     * Get the cursor row ID of the currently selected grid item. 
     */ 
    public long getSelectedItemId() { 
        ensureGrid(); 
        return mGrid.getSelectedItemId();
    } 
 
    /** 
     * Get the activity's grid view widget. 
     */ 
    public GridView getGridView() {
        ensureGrid();