As listview is being made in the past two days, some attributes that I personally think are special are sorted out. By setting these attributes, you can make a more beautiful list. FirstIt is the stackfrombottom attribute. After this attribute is set, the list you prepared will display the bottom of your list, with values true and false. Android: stackfrombottom = "true" second is the transciptmode attribute, you need to use listview or other controls that display a large number of items to track or view information in real time, and want the latest entries to automatically scroll to the visible range. By setting the transcriptmode attribute, You can automatically slide the Android platform control (scrollbar supported) to the bottom. Android: transcriptmode = "alwaysscroll" third cachecolorhint attribute, many people want to change the background so that they can adapt to the overall uidesign, to change the background, you only need to prepare an image and specify the attributes Android: Background =" @ drawable/BG " but don't be happy too early. When you do this, you will find that the background has changed, but when you drag, you can also click the blank position in the list to find that all listitems are black, damaging the overall effect. If you only change the background color, you can directly specifyAndroid: cachecolorhintIf you use an image as the background, you only need to setAndroid: cachecolorhintSpecify as transparent (#00000000)You can. FourthDivider attribute, which is used to set an image between each item as an interval or remove the split line between items. Android: divider = "@ drawable/list_driver"@ Drawable/list_driver is an image resource. If you do not want to display the split line, set itAndroid: divider = "@ drawable/@ null"You can. The fifth fadingedge attribute has a black shadow on the top and bottom. Android: fadingedge = "NONE"No shadow after setting ~ FifthThe scrollbars attribute is used to hide the listview scroll bar, Android: scrollbars = "NONE" and setverticalscrollbarenabled (true,Hidden during non-activity and during activity SixthThe fadescrollbars attribute. When Android: fadescrollbars = "true" is used to configure the listview layout, setting this attribute to true can automatically hide and display the scroll bar. |