Android API Chinese (--adapterview.onitemselectedlistener)

Source: Internet
Author: User

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)

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.