Objective
This chapter is Android.widget.AdapterView.OnItemSelectedListener, version of Android 2.3 R1, translated from "Cnmahj", Welcome to visit his blog:/http android.toolib.net/blog/, thanks again for "Cnmahj"! You are welcome to participate in the Chinese translation of Android API, contact me [email protected].
Statement
Welcome reprint, but please keep the original source of the article:)
Blog Park: http://www.cnblogs.com/
Android Chinese translation group: http://code.taobao.org/project/view/404/
Body
First, the structure
public static interface Adapterview.onitemselectedlistener
Ii. Overview
Defines the interface of the callback function that is called when an item in the view is selected.
Iii. Public methods
public abstract void onitemselected (adapterview<?> Parent, view view, int position, Long ID)
The callback function that is executed when the item in the view is selected. When implemented, you can call getitematposition (position) if you need to access the data associated with the selected entry.
Parameters
The parent takes the Abslistview of the selected event.
The view that is selected in the View Abslistview.
The position (index) of the position view in the list.
ID is clicked on the line ID of the entry.
public abstract void onnothingselected (adapterview<?> Parent)
The callback function that executes when the selected entries in the View all disappear. Starting the touch feature or empty the adapter may cause the selected entry to disappear.
Parameters
The parent does not have any Adapterview for the selected entry.
Iv. Supplementary
This article was converted from the Android Chinese online document .
V. Related chapters
Android API Chinese (--adapterview)
Android API Chinese (--adapterview.onitemselectedlistener)