The background color turns black and some strange problems during the sliding of the ListView

Source: Internet
Author: User

The ListView is a frequently used Android control that summarizes some of the little landscaping details that have been encountered.

1, the ListView in the drag when the background image disappears into a black background, wait until the drag is complete our own background picture only then displays

This is the problem I encountered there are two possibilities of the ListView buffer when the background is black also may be I choose the theme is black

Workaround: Add in XML

Android:scrollingcache= "false" or "android:cachecolorhint=" #00000000 ″

2, the top and bottom of the ListView has a black shadow

FIX: android:fadingedge= "None"

3. Modify the yellow background when the ListView item is selected by default

Workaround: Use the Listview.setselector () method in a Java file, or use the following code

1android:listselector= "#00000000"//This write is transparent, you can also add drawable pictures

4, Lsitview between each item need to set a picture as the interval

Solution: android:divider= "@drawable/list_driver"

The background color turns black and some strange problems during the sliding of the ListView

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.