Android api Chinese (75) -- AdapterView. OnItemClickListener

Source: Internet
Author: User

 

Preface

This chapter content is android. widget. AdapterView. OnItemClickListener, version for Android 2.3 r1, translated from "wheat", welcome to communicate with him: 0mellisa0@gmail.com, thanks again "wheat "! Welcome to join in Android API Chinese 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 static interface AdapterView. OnItemClickListener

Direct subclass

CharacterPickerDialog, PreferenceScreen

 

Ii. Overview

This interface defines that when an element in AdapterView is clicked, a callback function is called.

 

Iii. Public Methods

Public abstract voidOnItemClick(AdapterView <?> Parent, View view, int position, long id)

When an element in AdapterView is clicked, the callback method is called.

To access data related to the selected items, the execution program can call getItemAtPosition (position ).

Parameters

The AdapterView of the parent click action.

View clicked in AdapterView (a view provided by the adapter ).

Position view position in the adapter.

Id of the row of the clicked element.

 

4. related chapters

Android api Chinese (73) -- AdapterView

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.