Split Line processing in ListView

Source: Internet
Author: User

Split Line processing in ListView

1. Set the color and height of the split line

android:dividerheight= "1dip" android:divider= "color values, pictures, etc."
Here you can set the color and height of the split line, but if you just android:divider= "color value" this kind of is not effective, you want to and android:dividerheight= "1dip" matching use.

2. Set whether or not the split line of the tail is displayed

Android:headerdividersenabled= "" Android:footerdividersenabled= ""
Addheaderview (Headview, NULL, TRUE); Addfooterview (Footview, NULL, TRUE); Note: The third argument must be true, otherwise invalid// The display header appears split line listview.setheaderdividersenabled (true);   Prohibit the bottom of the split line listview.setfooterdividersenabled (false);
3.Listview expansion

If you just set the background color, you can directly specify the color of the android:cachecolorhint, if you want to set the picture as the background, you also want to specify the Android:cachecolorhint as Transparent (#00000000)

When the ListView is dragged, the background image disappears into a black background, and when the drag is complete, our own background image is displayed: Android:scrollingcache= "false"

The top and bottom of the ListView have a black Shadow: android:fadingedge= "None"

Lsitview each item needs to be set to a picture as interval: android:divider= "@drawable/list_driver" where @drawable/list_driver is a picture resource




Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Split Line processing in 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.