Android7.0中文API -- Spinner

完整内容,请查看: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:dropDownWidthspinnerMode="dropdown"设置的情况下,下拉按钮的宽度。 
android:gravity用于放置当前选中项的重力值设置。 
android:popupBackground背景drawable,其用于spinnerMode="dropdown"设置的情况下的下拉按钮。 
android:promptspinner对话框显示的提示。 
android:spinnerModespinner选项的显示模式。 

继承XML属性

From class android.widget.AbsSpinner
From class android.view.ViewGroup
From class android.view.View

常量

intMODE_DIALOG

Use a dialog window for selecting spinner options.
使用一个对话框窗口来选择Spinner的选项。

intMODE_DROPDOWN

Use a dropdown anchored to the Spinner for selecting spinner options.
使用一个下拉按钮来选择Spinner的选项。

继承常量

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.
使用指定的context的主题构造一个新的Spinner。

Spinner(Context context, int mode)

Constructs a new spinner with the given context's theme and the supplied mode of displaying choices.
使用指定的context的主题和指定的显示选项的模式构造一个新的Spinner。

Spinner(Context context, AttributeSet attrs)

Constructs a new spinner with the given context's theme and the supplied attribute set.
使用指定的context的主题和指定的一组属性构造一个新的Spinner。

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.
使用指定的context的主题,指定的一组属性和默认的样式属性构造一个新的Spinner。

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.
使用指定的context的主题,指定的一组属性和默认的样式属性构造一个新的Spinner。

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.
使用指定的context的主题,指定的一组属性和默认的样式构造一个新的Spinner。

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 MODE_DIALOG or MODE_DROPDOWN), and the theme against which the popup should be inflated.
使用指定的context的主题,指定的一组属性,默认的样式,弹出模式(MODE_DIALOGMODE_DROPDOWN之一)和加载(Inflate)的弹出窗口的主题构造一个新的Spinner。

Public方法


完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/Spinner.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值