Android programming-ExpandableListView usage Summary

Source: Internet
Author: User

The ExpandableListView class is similar to other android list form views. If you look at the source code, you can know that it is a combination of multiple views. Today, I will not analyze the source code, but I will only write some experiences. 1. The Button is right. That's right. It's the button component. I don't know if it has encountered many problems. Many of them are caused by it! The most common problem is that ExpandableListView cannot be expanded, and OnItemClickListener does not respond. Solution: Check whether the View File loaded in the getView method contains a Button or ImageButton. If yes, change it to TextView or ImageView. The problem may be solved. Cause: the listening Event Sequence of the layout file is the component view, and then the layout file skill. Listening events such as OnItemClickListener are all listening la S. If there is a Button, it will be intercepted and cannot be listened. 2. The Arrow defines the Layout View with an arrow, but it also displays the arrow that comes with the system. Problem: remove the system arrow. Solution: Add android: groupIndicator = "@ null" to the ExpandableListView attribute"

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.