Spinner下拉列表.docx

上传人:b****3 文档编号:2851791 上传时间:2022-11-15 格式:DOCX 页数:18 大小:20.76KB
下载 相关 举报
Spinner下拉列表.docx_第1页
第1页 / 共18页
Spinner下拉列表.docx_第2页
第2页 / 共18页
Spinner下拉列表.docx_第3页
第3页 / 共18页
Spinner下拉列表.docx_第4页
第4页 / 共18页
Spinner下拉列表.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

Spinner下拉列表.docx

《Spinner下拉列表.docx》由会员分享,可在线阅读,更多相关《Spinner下拉列表.docx(18页珍藏版)》请在冰豆网上搜索。

Spinner下拉列表.docx

Spinner下拉列表

Spinner下拉列表

extendsAbsSpinner

implementsDialogInterface.OnClickListener

java.lang.Object

↳android.view.View

↳android.view.ViewGroup

↳android.widget.AdapterView

↳android.widget.AbsSpinner

↳android.widget.Spinner

KnownDirectSubclasses

AppCompatSpinner

ClassOverview

Aviewthatdisplaysonechildatatimeandletstheuserpickamongthem.TheitemsintheSpinnercomefromtheAdapterassociatedwiththisview.

SeetheSpinnersguide.

Summary

XMLAttributes

AttributeNameRelatedMethodDescription

android:

dropDownHorizontalOffsetsetDropDownHorizontalOffset(int)Amountofpixelsbywhichthedropdownshouldbeoffsethorizontally.

android:

dropDownSelectorListselectortouseforspinnerMode="dropdown"display.

android:

dropDownVerticalOffsetsetDropDownVerticalOffset(int)Amountofpixelsbywhichthedropdownshouldbeoffsetvertically.

android:

dropDownWidthsetDropDownWidth(int)WidthofthedropdowninspinnerMode="dropdown".

android:

gravitysetGravity(int)Gravitysettingforpositioningthecurrentlyselecteditem.

android:

popupBackgroundsetPopupBackgroundResource(int)BackgrounddrawabletouseforthedropdowninspinnerMode="dropdown".

android:

promptTheprompttodisplaywhenthespinner'sdialogisshown.

android:

spinnerModeDisplaymodeforspinneroptions.

[Expand]

InheritedXMLAttributes

Fromclassandroid.widget.AbsSpinner

Fromclassandroid.view.ViewGroup

Fromclassandroid.view.View

Constants

intMODE_DIALOGUseadialogwindowforselectingspinneroptions.

intMODE_DROPDOWNUseadropdownanchoredtotheSpinnerforselectingspinneroptions.

[Expand]

InheritedConstants

Fromclassandroid.widget.AdapterView

Fromclassandroid.view.ViewGroup

Fromclassandroid.view.View

[Expand]

InheritedFields

Fromclassandroid.view.View

PublicConstructors

Spinner(Contextcontext)

Constructanewspinnerwiththegivencontext'stheme.

Spinner(Contextcontext,intmode)

Constructanewspinnerwiththegivencontext'sthemeandthesuppliedmodeofdisplayingchoices.

Spinner(Contextcontext,AttributeSetattrs)

Constructanewspinnerwiththegivencontext'sthemeandthesuppliedattributeset.

Spinner(Contextcontext,AttributeSetattrs,intdefStyleAttr)

Constructanewspinnerwiththegivencontext'stheme,thesuppliedattributeset,anddefaultstyleattribute.

Spinner(Contextcontext,AttributeSetattrs,intdefStyleAttr,intmode)

Constructanewspinnerwiththegivencontext'stheme,thesuppliedattributeset,anddefaultstyle.

Spinner(Contextcontext,AttributeSetattrs,intdefStyleAttr,intdefStyleRes,intmode)

Constructanewspinnerwiththegivencontext'stheme,thesuppliedattributeset,anddefaultstyle.

Spinner(Contextcontext,AttributeSetattrs,intdefStyleAttr,intdefStyleRes,intmode,Resources.ThemepopupTheme)

Constructsanewspinnerwiththegivencontext'stheme,thesuppliedattributeset,defaultstyles,popupmode(oneofMODE_DIALOGorMODE_DROPDOWN),andthecontextagainstwhichthepopupshouldbeinflated.

PublicMethods

CharSequencegetAccessibilityClassName()

Returntheclassnameofthisobjecttobeusedforaccessibilitypurposes.

intgetBaseline()

Returntheoffsetofthewidget'stextbaselinefromthewidget'stopboundary.

intgetDropDownHorizontalOffset()

Gettheconfiguredhorizontaloffsetinpixelsforthespinner'spopupwindowofchoices.

intgetDropDownVerticalOffset()

Gettheconfiguredverticaloffsetinpixelsforthespinner'spopupwindowofchoices.

intgetDropDownWidth()

Gettheconfiguredwidthofthespinner'spopupwindowofchoicesinpixels.

intgetGravity()

Describeshowtheselecteditemviewispositioned.

DrawablegetPopupBackground()

Getthebackgrounddrawableforthespinner'spopupwindowofchoices.

ContextgetPopupContext()

CharSequencegetPrompt()

voidonClick(DialogInterfacedialog,intwhich)

Thismethodwillbeinvokedwhenabuttoninthedialogisclicked.

voidonRestoreInstanceState(Parcelablestate)

Hookallowingaviewtore-applyarepresentationofitsinternalstatethathadpreviouslybeengeneratedbyonSaveInstanceState().

ParcelableonSaveInstanceState()

Hookallowingaviewtogeneratearepresentationofitsinternalstatethatcanlaterbeusedtocreateanewinstancewiththatsamestate.

booleanonTouchEvent(MotionEventevent)

Implementthismethodtohandletouchscreenmotionevents.

booleanperformClick()

Callthisview'sOnClickListener,ifitisdefined.

voidsetAdapter(SpinnerAdapteradapter)

SetstheSpinnerAdapterusedtoprovidethedatawhichbacksthisSpinner.

voidsetDropDownHorizontalOffset(intpixels)

Setahorizontaloffsetinpixelsforthespinner'spopupwindowofchoices.

voidsetDropDownVerticalOffset(intpixels)

Setaverticaloffsetinpixelsforthespinner'spopupwindowofchoices.

voidsetDropDownW

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 数学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1