Collection of ListView common attributes in Android

Source: Internet
Author: User
Tags xml attribute

Class Listview.fixedviewinfo//used to present a fixed-position view within the list, such as the header at the top of the list and the footer at the bottom of the listone, XML properties1. The XML attribute of the ListView Android:divider//drawable or color displayed between list entriesAndroid:dividerheight//used to specify the height of the dividerandroid:entries//a reference to the array resource that makes up the ListView. For some fixed resources, this property provides a much easier way to add resources than in a programandroid:footerdividersenabled//When set to False, the ListView will not draw divider between the individual footer. True by default. android:headerdividersenabled//When set to False, the ListView will not draw divider between the headers. True by default. 2. Xml attribute inherited from Abslistview android:cachecolorhint//indicates that the background of this list is always drawn in a single, fixed color, which optimizes the drawing process. Android:choicemode//Specifies the selected behavior for the view. The optional types are: None, Singlechoice, Multiplechoice, Multiplechoicemodal. Android:drawselectorontop//if set to True, the selector will be drawn on top of the selected item. The default is False. android:fasescrollenabled//sets whether to allow the use of the Quick scroll slider. Android:listselector//sets the drawing object to display for the selected item, which can be a picture or a color property. Android:scrollingcache//sets whether to use the draw cache when scrolling. If set to true, the scrolling performance will be faster, but will consume more memory. The default is true. Android:smoothscrollbar//is true, the list uses a more precise method of calculating the height of the visible pixels on the screen based on the entry. The default property is True, and if your adapter needs to draw a variable-height entry, he should set it to false. When this property is true, you can change the size of the ScrollBar's handle as it scrolls while the adapter displays the height entry. When set to False, the list uses only the number of entries in the adapter and the visible entries on the screen to determine the properties of the scroll bar. Android:stackfrombottom//sets whether the GridView and ListView display content starting at the bottom. android:textfilterenabled//when set to True, the list filters the results to the user type. The premise is that the adapter of this list must support the Filterable interface. Android:transcriptmode//sets the Transcriptmode of the list. The following options are available://(1) disabled disable Transcriptmode, is also the default value;//(2) normal when a new entry is added to the list and is ready to be displayed, the list automatically slides to the bottom to show the latest entries;//(3) The Alwaysscroll list automatically slides to the bottom, regardless of whether the new entry is ready to be displayed.3. Xml attribute inherited from ViewGroup Android:addstatesfromchildren//sets whether the drawable state of this viewgroup includes the state of the child view. If set to true, the entire ViewGroup also receives focus when the child view, such as EditText or button, receives the focus. Android:alwaysdrawnwithcache//sets whether ViewGroup always uses the drawing cache when drawing child view. The default is true. Android:animationcache//sets whether the layout creates a drawing cache for its child view when the animation effect is drawn. If set to true, it consumes more memory and requires a longer initialization process, but behaves better. The default is true. Android:clipchildren//sets whether the child view is constrained to draw within its own bounds. If set to false, the child view can be drawn outside the boundary when it occupies more space than the boundary. The default is true. android:cliptopadding//defines whether there is space between layouts. The default is true. android:descendantfocusability//defines the relationship between ViewGroup and its child view when looking for a focus view. The optional options are://(1) beforedescendants ViewGroup will get focus more first than its sub-view;//(2) afterdescendants only when no sub-view wants to get the focus, ViewGroup will get the focus;//(3) blockdescendants ViewGroup will prevent the child view from getting focusandroid:layoutanimation//defines the animation effect when the ViewGroup is first expanded, or it can be artificially called after the first expansion. Android:persistentdrawingcache//defines the persistence of the drawing cache. The following options are available://(1) None save drawing cache after use//(2) animation preserve the drawing cache after layout animation//(3) scrolling keep drawing cache after scroll operation//(4) Always keep drawing cache

Collection of ListView common attributes in Android

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.