public static interface AdapterView.OnItemClickListener
| android.widget.AdapterView.OnItemClickListener |
| |
在单击此AdapterView中的项目时调用回调的接口定义。
公共方法(Public methods) |
|
|---|---|
abstract void |
onItemClick(AdapterView<?> parent, View view, int position, long id) 当点击此AdapterView中的某个项目时,将调用回调方法。 |
void onItemClick (AdapterView<?> parent, View view, int position, long id)
当点击此AdapterView中的某个项目时,将调用回调方法。
如果需要访问与选定项目相关的数据,实施者可以调用getItemAtPosition(position)。
| 参数(Parameters) | |
|---|---|
parent |
AdapterView: The AdapterView where the click happened. |
view |
View: The view within the AdapterView that was clicked (this will be a view provided by the adapter) |
position |
int: The position of the view in the adapter. |
id |
long: The row id of the item that was clicked. |