Preface
This chapter content is android. widget. SpinnerAdapter, version for Android 2.2 r1, translated from "de rod", welcome to visit his blog: http://sparkrico.javaeye.com, thank you again "de rod "! I look forward to your participation in Android Chinese API translation, contact me over140@gmail.com.
Statement
You are welcome to repost, but please keep the original source of the article :)
Blog Garden: http://www.cnblogs.com/
Android Chinese translation group: http://code.taobao.org/project/view/404/
Body
I. Structure
Public interface SpinnerAdapter extends Adapter
Direct subclass
ArrayAdapter <T>, BaseAdapter, CursorAdapter, ResourceCursorAdapter, SimpleAdapter, SimpleCursorAdapter
Ii. Overview
The Adapter that extends the self-Adapter is a bridge between the Spinner and the data. One Spinner Adapter allows two different views: one is to display data on the Spinner, and the other is to display data in the drop-down list when the Spinner is pressed.
Iii. Public Methods
Public abstract ViewGetDropDownView (Int position, View convertView, ViewGroup parent)
Obtain a view that displays data from the drop-down list at a specified position.
Parameters
Index of position Project View
ConvertView if the old view may be used again. Note: before use, check that the view is not empty and the type is appropriate. It is impossible to display correct data in the conversion view. This method can create a new view.
The parent view will eventually attach the parent object
Return Value
A view of data at the specified position
4. Related Articles
Android Chinese API (46) -- SimpleAdapter
End
Thanks for your attention. This weekend we will start to prepare a collection, which is expected to be released next week.