Code example for PopupWindow

Methods: setInputMethodMode

     * @param defStyleAttr Style attribute to read for default styling of popup content. 
     * @param defStyleRes Style resource ID to use for default styling of popup content. 
    public ListPopupWindow(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        mContext = context;
        mPopup = new PopupWindow(context);
     * Sets the adapter that provides the data and the views to represent the data 
     * in this popup window. 
     * @param adapter The adapter to use to create this window's content. 
    public void setAdapter(ListAdapter adapter) {
        if (mObserver == null) {
            mObserver = new PopupDataSetObserver();
        } else if (mAdapter != null) {