Example usage for Java android.widget ListPopupWindow fields, constructors, methods, implement or subclass
The text is from its open source code.
int | POSITION_PROMPT_BELOW The provided prompt view should appear below list content. |
int | WRAP_CONTENT Alias for ViewGroup.LayoutParams#WRAP_CONTENT . |
int | INPUT_METHOD_NOT_NEEDED Mode for #setInputMethodMode(int) : this popup never needs to work with an input method, regardless of whether it is focusable. |
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. |
void | dismiss() Dismiss the popup window. |
ListView | getListView() |
long | getSelectedItemId() |
int | getSelectedItemPosition() |
View | getSelectedView() |
boolean | isShowing() |
void | setAdapter(@Nullable ListAdapter adapter) Sets the adapter that provides the data and the views to represent the data in this popup window. |
void | setAnchorView(@Nullable View anchor) Sets the popup's anchor view. |
void | setContentWidth(int width) Sets the width of the popup window by the size of its content. |
void | setDropDownGravity(int gravity) Set the gravity of the dropdown list. |
void | setInputMethodMode(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 . |
void | setModal(boolean modal) Set whether this window should be modal when shown. |
void | setOnDismissListener(@Nullable PopupWindow.OnDismissListener listener) Set a listener to receive a callback when the popup is dismissed. |
void | setOnItemClickListener(@Nullable AdapterView.OnItemClickListener clickListener) Sets a listener to receive events when a list item is clicked. |
void | setWidth(int width) Sets the width of the popup window in pixels. |
void | show() Show the popup list. |