Android Popupwindow GridView Onitemclick Invalid

Source: Internet
Author: User

Some of the reasons for the online presentation are summarized below:

The Onitemclicklistener event that encountered the GridView during development was not responding.

The reason is that the click event was intercepted by Itemview. Workaround:

Convert Xxxbutton to TextView and other common view

Set Itemview clickable to FALSE;

Set gridview:descendantfocusability= "Blocksdescendants"

Set the Focusable of the GridView to true (to be verified);

The reason I met is:

The Focusable property of the Popupwindow needs to be set, and the following sentence is added to the Popupwindow initialization. Sets the Popupwindow as the focus state.
Mpopupwindow.setfocusable (TRUE);

I hope you have a reference to this problem.

Android Popupwindow GridView Onitemclick Invalid

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.