完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/Spinner.html
Spinner
public class Spinner
extends AbsSpinner
implements DialogInterface.OnClickListener
java.lang.Object | |||||
↳ | android.view.View | ||||
↳ | android.view.ViewGroup | ||||
↳ | android.widget.AdapterView<android.widget.SpinnerAdapter> | ||||
↳ | android.widget.AbsSpinner | ||||
↳ | android.widget.Spinner |
A view that displays one child at a time and lets the user pick among them. The items in the Spinner come from the Adapter
associated with this view.
其是一个每次值显示一个子项的视图,让用户可以从中选取。这些在Spinner中的项来自与此视图关联的Adapter
。
See the Spinners guide.
请参考Spinners。
摘要
XML属性 | |
---|---|
android:dropDownHorizontalOffset | 下拉菜单水平偏移的像素数量。 |
android:dropDownSelector | 使用spinnerMode="dropdown"来显示的列表选择器。 |
android:dropDownVerticalOffset | 下拉菜单垂直偏移的像素数量。 |
android:dropDownWidth | spinnerMode="dropdown"设置的情况下,下拉按钮的宽度。 |
android:gravity | 用于放置当前选中项的重力值设置。 |
android:popupBackground | 背景drawable,其用于spinnerMode="dropdown"设置的情况下的下拉按钮。 |
android:prompt | spinner对话框显示的提示。 |
android:spinnerMode | spinner选项的显示模式。 |
继承XML属性 | |
---|---|
From class android.widget.AbsSpinner
| |
From class android.view.ViewGroup
| |
From class android.view.View
|
常量 | |
---|---|
int | MODE_DIALOG Use a dialog window for selecting spinner options. |
int | MODE_DROPDOWN Use a dropdown anchored to the Spinner for selecting spinner options. |
继承常量 |
---|
From class android.widget.AdapterView
|
From class android.view.ViewGroup
|
From class android.view.View
|
继承字段 |
---|
From class android.view.View
|
Public构造方法 | |
---|---|
Spinner(Context context) Constructs a new spinner with the given context's theme. | |
Spinner(Context context, int mode) Constructs a new spinner with the given context's theme and the supplied mode of displaying choices. | |
Spinner(Context context, AttributeSet attrs) Constructs a new spinner with the given context's theme and the supplied attribute set. | |
Spinner(Context context, AttributeSet attrs, int defStyleAttr) Constructs a new spinner with the given context's theme, the supplied attribute set, and default style attribute. | |
Spinner(Context context, AttributeSet attrs, int defStyleAttr, int mode) Constructs a new spinner with the given context's theme, the supplied attribute set, and default style attribute. | |
Spinner(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes, int mode) Constructs a new spinner with the given context's theme, the supplied attribute set, and default styles. | |
Spinner(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes, int mode, Resources.Theme popupTheme) Constructs a new spinner with the given context, the supplied attribute set, default styles, popup mode (one of |
Public方法
完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/Spinner.html