ListPopupWindow Class

Definition

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

[Android.Runtime.Register("android/widget/ListPopupWindow", DoNotGenerateAcw=true)]
public class ListPopupWindow : Java.Lang.Object
[<Android.Runtime.Register("android/widget/ListPopupWindow", DoNotGenerateAcw=true)>]
type ListPopupWindow = class
    inherit Object
Inheritance
ListPopupWindow
Attributes

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.

Java documentation for android.widget.ListPopupWindow.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

Name Description
ListPopupWindow(Context, IAttributeSet, Int32, Int32)

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

ListPopupWindow(Context, IAttributeSet, Int32)

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

ListPopupWindow(Context, IAttributeSet)

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

ListPopupWindow(Context)

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

ListPopupWindow(IntPtr, JniHandleOwnership)

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

Fields

Name Description
MatchParent

Alias for ViewGroup.LayoutParams#MATCH_PARENT.

PositionPromptAbove
Obsolete.

The provided prompt view should appear above list content.

PositionPromptBelow
Obsolete.

The provided prompt view should appear below list content.

WrapContent

Alias for ViewGroup.LayoutParams#WRAP_CONTENT.

Properties

Name Description
AnchorView

Returns the view that will be used to anchor this popup. -or- Sets the popup's anchor view.

AnimationStyle

Returns the animation style that will be used when the popup window is shown or dismissed. -or- Set an animation style to use when the popup window is shown or dismissed.

Background

Provides the managed binding for public virtual Android.Graphics.Drawables.Drawable? Background { get; }.

Class

Returns the runtime class of this Object.

(Inherited from Object)
EpicenterBounds

Returns bounds which are used as a popup's epicenter of the enter and exit transitions. -or- Specifies the anchor-relative bounds of the popup's transition epicenter.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
Height

Sets the height of the popup window in pixels.

HorizontalOffset

Set the horizontal offset of this popup from its anchor view in pixels.

InputMethodMode

Return the current value in #setInputMethodMode(int). -or- Control how the popup operates with an input method: one of #INPUT_METHOD_FROM_FOCUSABLE, #INPUT_METHOD_NEEDED, or #INPUT_METHOD_NOT_NEEDED.

IsInputMethodNotNeeded

Provides the managed binding for public virtual bool IsInputMethodNotNeeded { get; }.

IsShowing

Provides the managed binding for public virtual bool IsShowing { get; }.

JniIdentityHashCode

Gets the identity hash code assigned to this Java peer by the interop runtime.

(Inherited from Object)
JniManagedPeerState (Inherited from JavaObject)
JniPeerMembers

Gets the JNI peer-member metadata for this managed binding type.

ListView

Provides the managed binding for public virtual Android.Widget.ListView? ListView { get; }.

Modal

Returns whether the popup window will be modal when shown. -or- Set whether this window should be modal when shown.

PeerReference

Gets the JNI object reference for this Java peer.

(Inherited from Object)
PromptPosition

Set where the optional prompt view should appear.

SelectedItem

Provides the managed binding for public virtual Java.Lang.Object? SelectedItem { get; }.

SelectedItemId

Provides the managed binding for public virtual long SelectedItemId { get; }.

SelectedItemPosition

Provides the managed binding for public virtual int SelectedItemPosition { get; }.

SelectedView

Provides the managed binding for public virtual Android.Views.View? SelectedView { get; }.

SoftInputMode

Returns the current value in #setSoftInputMode(int). -or- Sets the operating mode for the soft input area.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

VerticalOffset

Set the vertical offset of this popup from its anchor view in pixels.

Width

Sets the width of the popup window in pixels.

Methods

Name Description
ClearListSelection()

Clear any current list selection.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Construct(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
CreateDragToOpenListener(View)

Returns an OnTouchListener that can be added to the source view to implement drag-to-open behavior.

Dismiss()

Dismiss the popup window.

Dispose()

Releases the resources held by this Java peer.

(Inherited from Object)
Dispose(Boolean)

Releases the resources held by this Java peer.

(Inherited from Object)
DisposeUnlessReferenced() (Inherited from JavaObject)
Equals(Object) (Inherited from JavaObject)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
OnKeyDown(Keycode, KeyEvent)

Filter key down events.

OnKeyPreIme(Keycode, KeyEvent)

Filter pre-IME key events.

OnKeyUp(Keycode, KeyEvent)

Filter key up events.

PerformItemClick(Int32)

Perform an item click operation on the specified list adapter position.

PostShow()

Post a #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.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
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.

SetPeerReference(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
SetPromptView(View)

Set a view to act as a user prompt for this popup window.

SetSelection(Int32)

Set the selected position of the list.

SetWindowLayoutType(WindowManagerTypes)

Set the layout type for this popup window.

Show()

Show the popup list.

ToArray<T>()

Creates a managed array from this Java array wrapper.

(Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime()

Unregisters this Java peer from the interop runtime.

(Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Events

Name Description
DismissEvent

Occurs when the dismiss event Java listener callback is invoked.

ItemClick

Occurs when the item click Java listener callback is invoked.

ItemSelected

Occurs when the item selected Java listener callback is invoked.

NothingSelected

Occurs when the nothing selected callback is invoked.

Explicit Interface Implementations

Name Description
IJavaPeerable.Disposed() (Inherited from JavaObject)
IJavaPeerable.Finalized() (Inherited from JavaObject)
IJavaPeerable.JniObjectReferenceControlBlock (Inherited from JavaObject)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from JavaObject)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from JavaObject)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from JavaObject)

Extension Methods

Name Description
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to