Android API Chinese (77) -- AdapterView. OnItemSelectedListener

Source: Internet
Author: User

Preface

This chapter is about android. widget. AdapterView. OnItemSelectedListener. The version is Android 2.3 r1 and translated from "cnmahj". You are welcome to visit his blog: http://android.toolib.net/blog/. Thank you again "cnmahj "! 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. OnItemSelectedListener

 

Ii. Overview

Defines the callback function interface that is called when a project in the selected view is selected.

 

Iii. Public Methods

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

The callback function executed when the project is selected as the project in the Central view. To access the data associated with the selected entry, you can call getItemAtPosition (position ).

Parameters

The AbsListView where the selected event occurs in the parent.

The selected view in view AbsListView.

Position view position (INDEX) in the list ).

Id of the row to which the row is clicked.

 

Public abstract voidOnNothingSelected(AdapterView <?> Parent)

The callback function executed when all the entries in the selected status in the view disappear. When the touch function is enabled or the adapter is empty, the selected entries may disappear.

Parameters

Parent does not have any AdapterView for the selected entries.

 

Iv. Supplement

This document is transformed from an online Android Chinese document.

 

V. 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.