|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.View
android.view.ViewGroup
android.widget.AdapterView<SpinnerAdapter>
android.widget.AbsSpinner
android.widget.Spinner
public class 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class android.widget.AbsSpinner |
|---|
AbsSpinner.RecycleBin, AbsSpinner.SavedState |
| Nested classes/interfaces inherited from class android.widget.AdapterView |
|---|
AdapterView.AdapterContextMenuInfo, AdapterView.AdapterDataSetObserver, AdapterView.OnItemClickListener, AdapterView.OnItemLongClickListener, AdapterView.OnItemSelectedListener |
| Nested classes/interfaces inherited from class android.view.ViewGroup |
|---|
ViewGroup.LayoutParams, ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener |
| Nested classes/interfaces inherited from class android.view.View |
|---|
View.BaseSavedState, View.MeasureSpec, View.OnClickListener, View.OnCreateContextMenuListener, View.OnFocusChangeListener, View.OnKeyListener, View.OnLongClickListener, View.OnTouchListener |
| Field Summary |
|---|
| Fields inherited from class android.widget.AbsSpinner |
|---|
mAdapter, mBlockLayoutRequests, mHeightMeasureSpec, mInterpolator, mRecycler, mSelectedView, mSelectionBottomPadding, mSelectionLeftPadding, mSelectionRightPadding, mSelectionTopPadding, mSpinnerPadding, mWidthMeasureSpec |
| Constructor Summary | |
|---|---|
Spinner(Context context)
|
|
Spinner(Context context,
AttributeSet attrs)
|
|
Spinner(Context context,
AttributeSet attrs,
int defStyle)
|
|
| Method Summary | |
|---|---|
int |
getBaseline()
Return the offset of the widget's text baseline from the widget's top boundary. |
CharSequence |
getPrompt()
|
(package private) void |
layout(int delta,
boolean animate)
Creates and positions all views for this Spinner. |
void |
onClick(DialogInterface dialog,
int which)
This method will be invoked when a button in the dialog is clicked. |
protected void |
onLayout(boolean changed,
int l,
int t,
int r,
int b)
Called from layout when this view should assign a size and position to each of its children. |
boolean |
performClick()
Call this view's OnClickListener, if it is defined. |
void |
setOnItemClickListener(AdapterView.OnItemClickListener l)
A spinner does not support item click events. |
void |
setPrompt(CharSequence prompt)
Sets the prompt to display when the dialog is shown. |
void |
setPromptId(int promptId)
Sets the prompt to display when the dialog is shown. |
| Methods inherited from class android.widget.AbsSpinner |
|---|
generateDefaultLayoutParams, getAdapter, getChildHeight, getChildWidth, getCount, getSelectedView, handleDataChanged, onMeasure, onRestoreInstanceState, onSaveInstanceState, pointToPosition, recycleAllViews, requestLayout, resetList, setAdapter, setSelection, setSelection, setSelectionInt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface android.view.ViewParent |
|---|
createContextMenu, getParent, isLayoutRequested |
| Constructor Detail |
|---|
public Spinner(Context context)
public Spinner(Context context,
AttributeSet attrs)
public Spinner(Context context,
AttributeSet attrs,
int defStyle)
| Method Detail |
|---|
public int getBaseline()
ViewReturn the offset of the widget's text baseline from the widget's top boundary. If this widget does not support baseline alignment, this method returns -1.
getBaseline in class Viewpublic void setOnItemClickListener(AdapterView.OnItemClickListener l)
A spinner does not support item click events. Calling this method will raise an exception.
setOnItemClickListener in class AdapterView<SpinnerAdapter>l - this listener will be ignored
protected void onLayout(boolean changed,
int l,
int t,
int r,
int b)
ViewGroup
onLayout in class AdapterView<SpinnerAdapter>changed - This is a new size or position for this viewl - Left position, relative to parentt - Top position, relative to parentr - Right position, relative to parentb - Bottom position, relative to parentCreates and positions all views
void layout(int delta,
boolean animate)
layout in class AbsSpinnerdelta - Change in the selected position. +1 moves selection is moving to the right,
so views are scrolling to the left. -1 means selection is moving to the left.public boolean performClick()
View
performClick in class View
public void onClick(DialogInterface dialog,
int which)
DialogInterface.OnClickListener
onClick in interface DialogInterface.OnClickListenerdialog - The dialog that received the click.which - The button that was clicked, i.e. BUTTON1 or BUTTON2 or
the position of the item clicked.public void setPrompt(CharSequence prompt)
prompt - the prompt to setpublic void setPromptId(int promptId)
promptId - the resource ID of the prompt to display when the dialog is shownpublic CharSequence getPrompt()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||