Code example for PopupWindow

Methods: getInputMethodMode

0
     * Return the current value in {@link #setInputMethodMode(int)}. 
     *  
     * @see #setInputMethodMode(int) 
     */ 
    public int getInputMethodMode() { 
        return mPopup.getInputMethodMode();
    } 
 
    /** 
     * Set the selected position of the list. 
     * Only valid when {@link #isShowing()} == {@code true}. 
     *  
     * @param position List position to set as selected. 
     */ 
    public void setSelection(int position) {
        DropDownListView list = mDropDownList;
        if (isShowing() && list != null) {
            list.mListSelectionHidden = false;
            list.setSelection(position);
            if (list.getChoiceMode() != ListView.CHOICE_MODE_NONE) {
                list.setItemChecked(position, true);