Android Guides | Samples

Android.Widget.ListPopupWindow Class

A ListPopupWindow anchors itself to a host view and displays a list of choices.

See Also: ListPopupWindow

Syntax

[Android.Runtime.Register("android/widget/ListPopupWindow", DoNotGenerateAcw=true)]
public class ListPopupWindow : Object

Remarks

A ListPopupWindow anchors itself to a host view and displays a list of choices.

ListPopupWindow contains a number of tricky behaviors surrounding positioning, scrolling parents to fit the dropdown, interacting sanely with the IME if present, and others.

See Also

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11

The members of Android.Widget.ListPopupWindow are listed below.

See Also: Object

Public Constructors

Create a new, empty popup window capable of displaying items from a ListAdapter.
Create a new, empty popup window capable of displaying items from a ListAdapter.
Create a new, empty popup window capable of displaying items from a ListAdapter.
Create a new, empty popup window capable of displaying items from a ListAdapter.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
MatchParentInt32 (-1). Alias for ViewGroup+LayoutParams.MatchParent.
const
PositionPromptAbovePositionPrompt (0). The provided prompt view should appear above list content.
const
PositionPromptBelowPositionPrompt (1). The provided prompt view should appear below list content.
const
WrapContentInt32 (-2). Alias for ViewGroup+LayoutParams.WrapContent.

Public Properties

AnchorViewView. Returns the view that will be used to anchor this popup.
AnimationStyleInt32. Returns the animation style that will be used when the popup window is shown or dismissed.
[read-only]
BackgroundDrawable.
HeightInt32.
HorizontalOffsetInt32.
InputMethodModeListPopupWindowInputMethodMode. Return the current value in ListPopupWindow.InputMethodMode.
[read-only]
IsInputMethodNotNeededBoolean.
[read-only]
IsShowingBoolean.
[read-only]
ListViewListView.
ModalBoolean. Returns whether the popup window will be modal when shown.
PromptPositionInt32.
[read-only]
SelectedItemObject.
[read-only]
SelectedItemIdInt64.
[read-only]
SelectedItemPositionInt32.
[read-only]
SelectedViewView.
SoftInputModeSoftInput. Returns the current value in ListPopupWindow.SoftInputMode.
VerticalOffsetInt32.
WidthInt32.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

ClearListSelection()
Clear any current list selection.
CreateDragToOpenListener(View) : View+IOnTouchListener
Returns an NoType:android/view/View$OnTouchListener;Href=../../../reference/android/view/View.OnTouchListener.html that can be added to the source view to implement drag-to-open behavior.
Dismiss()
Dismiss the popup window.
OnKeyDown(Keycode, KeyEvent) : Boolean
Filter key down events.
OnKeyPreIme(Keycode, KeyEvent) : Boolean
Filter pre-IME key events.
OnKeyUp(Keycode, KeyEvent) : Boolean
Filter key down events.
PerformItemClick(Int32) : Boolean
Perform an item click operation on the specified list adapter position.
PostShow()
Post a ListPopupWindow.Show call to the UI thread.
SetAdapter(IListAdapter)
Sets the adapter that provides the data and the views to represent the data in this popup window.
SetBackgroundDrawable(Drawable)
Sets a drawable to be the background for the popup window.
SetContentWidth(Int32)
Sets the width of the popup window by the size of its content.
SetDropDownGravity(GravityFlags)
Set the gravity of the dropdown list.
SetListSelector(Drawable)
Sets a drawable to use as the list item selector.
SetOnDismissListener(PopupWindow+IOnDismissListener)
Set a listener to receive a callback when the popup is dismissed.
SetOnItemClickListener(AdapterView+IOnItemClickListener)
Sets a listener to receive events when a list item is clicked.
SetOnItemSelectedListener(AdapterView+IOnItemSelectedListener)
Sets a listener to receive events when a list item is selected.
SetPromptView(View)
Set a view to act as a user prompt for this popup window.
SetSelection(Int32)
Set the selected position of the list.
Show()
Show the popup list.

Public Events