Code example for ExpandableListView

Methods: getSelectedPosition

0
     *  
     * @return A packed position representation containing the currently selected group or child's 
     *         position and type. 
     */ 
    public long getSelectedPosition() { 
        return mExpandableList.getSelectedPosition();
    } 
 
    /** 
     * Sets the selection to the specified child. If the child is in a collapsed group, the group 
     * will only be expanded and child subsequently selected if shouldExpandGroup is set to true, 
     * otherwise the method will return false. 
     *  
     * @param groupPosition 
     *            The position of the group that contains the child. 
     * @param childPosition 
     *            The position of the child within the group. 
     * @param shouldExpandGroup 
     *            Whether the child's group should be expanded if it is collapsed. 
     * @return Whether the selection was successfully set on the child. 
     */