Android in ListView click on item invariant color and set Listselector invalid

Source: Internet
Author: User

Android in ListView click on item invariant color and set Listselector invalid

This is the same problem, click on item in the ListView will change color, because the ListView set the default Listselector, there is a default color, the same way if you click No color change how we set the Listselector will not change color.

But in our development process, we may encounter the problem of the ListView click the invariant color, summed up a bit about these reasons:

1, the layout of the item set background color value, remove the background color can

2, the effect of the Listselector attribute in the ListView is overwritten, such as the list item is a full cell imageview, ImageView if there is content then listselector effect will be blocked

This time we need to add the Drawselectorontop property in the ListView and set to True


 

This article is for bloggers original articles, reproduced please indicate the source

Http://www.cnblogs.com/rencm/p/5919485.html

Android in ListView click on item invariant color and set Listselector 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.