XML Properties for Android ListView

Source: Internet
Author: User
Tags xml attribute

XML attributes for 1.ListView

Android:divider               //drawable or colorandroid:dividerheight displayed between list entries         //used to specify the height of the divider android: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 program android: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. Inherited XML attributes 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 be displayed for the selected item, which can be a picture or a color property. Android:scrollingcache//sets whether to use 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 calculation method based on the visible pixel height of the entry on the screen. 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 will 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//Set list of Transcriptmode. The following options are available://(1) Disabled disable Transcriptmode, also default;//(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 sub-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 than its sub-view,//(2) afterdescendants only if no child view wants to get focus, ViewGroup will get Coke Point;//(3) Blockdescendants ViewGroup will prevent the child view from getting focus android:layoutanimation//define 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 when the drawing cache is not preserved after use//(2) animation retains drawing cache after layout animation//(3) scrolling retains drawing cache after scroll operation//(4) All Always keep drawing cache  

4. Inherited from view XML properties

This is a bit more, let's find out for ourselves

XML Properties for Android 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.