Java android.widget ListPopupWindow fields, constructors, methods, implement or subclass

Example usage for Java android.widget ListPopupWindow fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.widget ListPopupWindow.

The text is from its open source code.

Subclass

android.widget.ListPopupWindow has subclasses.
Click this link to see all its subclasses.

Field

intPOSITION_PROMPT_BELOW
The provided prompt view should appear below list content.
intWRAP_CONTENT
Alias for ViewGroup.LayoutParams#WRAP_CONTENT .
intINPUT_METHOD_NOT_NEEDED
Mode for #setInputMethodMode(int) : this popup never needs to work with an input method, regardless of whether it is focusable.

Constructor

ListPopupWindow(@NonNull Context context)
Create a new, empty popup window capable of displaying items from a ListAdapter.
ListPopupWindow(@NonNull Context context, @Nullable AttributeSet attrs)
Create a new, empty popup window capable of displaying items from a ListAdapter.

Method

voiddismiss()
Dismiss the popup window.
ListViewgetListView()
longgetSelectedItemId()
intgetSelectedItemPosition()
ViewgetSelectedView()
booleanisShowing()
voidsetAdapter(@Nullable ListAdapter adapter)
Sets the adapter that provides the data and the views to represent the data in this popup window.
voidsetAnchorView(@Nullable View anchor)
Sets the popup's anchor view.
voidsetContentWidth(int width)
Sets the width of the popup window by the size of its content.
voidsetDropDownGravity(int gravity)
Set the gravity of the dropdown list.
voidsetInputMethodMode(int mode)
Control how the popup operates with an input method: one of #INPUT_METHOD_FROM_FOCUSABLE , #INPUT_METHOD_NEEDED , or #INPUT_METHOD_NOT_NEEDED .
voidsetModal(boolean modal)
Set whether this window should be modal when shown.
voidsetOnDismissListener(@Nullable PopupWindow.OnDismissListener listener)
Set a listener to receive a callback when the popup is dismissed.
voidsetOnItemClickListener(@Nullable AdapterView.OnItemClickListener clickListener)
Sets a listener to receive events when a list item is clicked.
voidsetWidth(int width)
Sets the width of the popup window in pixels.
voidshow()
Show the popup list.