Istview Android:cachecolorhint,android:listselector Attribute Action (RPM)

Source: Internet
Author: User
Tags transparent color

The listview is a common display control, the default background is the same transparent color as the system window, and if you add a background picture or background color to the ListView, the ListView will be black when scrolling .The reason is that when scrolling, the view in the list is redrawn, using the system default transparent color, the color value is #ff191919,to change this situation, you only need to callListView setcachecolorhint (0), color value set to 0Or the properties of the ListView in the XML file Android: cachecolorhint= "#00000000",when scrolling, there is no background color when redrawing the view. android:listselector= "#00000000"

After the above setting, the ListView does not have any phenomenon when clicking on the item.

android:listselector= "@null" cannot be implemented. When customizing the ListView, when you do not use the android:cachecolorhint= "#00000000" will appear below to select a space for the black background of the case, damage the overall aesthetics:
when you do not use the Android:listselector property, the selected item is displayed by default as an orange background, and sometimes we need to remove the effect:

Original Digest from: http://blog.csdn.net/gchk125/article/details/7586401

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.