Android ListView removes edge shadows, selected colors, dragging background colors, row height, and addFootView

Source: Internet
Author: User

Remove the black shadow of the edge when the ListView slides to the top and bottom: android: fadingEdge = "none" ------------------------------------------ remove the default black background when dragging: android: cacheColorHint = "#00000000" or listView. setCacheColorHint (Color. TRANSPARENT); -------------------------------------------------- remove the selected yellow background color: android: listSelector = "#00000000" or listView. setSelector (new ColorDrawable (Color. TRANSPARENT); --------------------------------------------------- remove the black line between rows: android: divider = "#00000000" or listView. setDivider (null); ----------------------------------------------------- the ListView automatically rolls to the bottom after refreshing: listView. setSelection (listView. getAdapter (). getCount ()-1); remove the slide bar: android: scrollbars = "none" to set the minimum Row Height: www.2cto.com. In the item xml file, set the root element to android: minHeight = "xxdip" add addFootView: View footView = getLayoutInflater () to the listview (). inflate (R. layout. footview, null); listview. addFooterView (footView); listview. setAdapter (adapter );

Related Article

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.