Tips for using AndroidUI components in ListView: androiduilistview
Android: fadingEdge = "none" // go to shadow
Android: listSelector = "@ android: color/transparent" // removes the click effect of an Item.
Android: scrollbars = "none" // remove the scroll bar
Android: cacheColorHint = "#00000000" // transparent background color
Android: divider = "@ null" // No Separator
If you find that the last Item of the ListView cannot be normally displayed in a layout, You need to place your listView control on the lower control using the above attribute.
Here, we only record what ListView is commonly used to quickly find and use it next time.
Reprinted please indicate the source: http://blog.csdn.net/android_jiangjun/article/details/39895297
Android listview obtains components in an item
I wonder why you want to do this. This is not advisable. The error is reported because in the onCreate method of the Activity, listview does not have a subview, list. getChildAt () is naturally null, and you must report a null pointer exception when operating on it. In addition, when the listview has a Header, getChildAt (0) will get the Header. Please note that.
The android listview can hide a component in all sub-items in one click.
At the same time, it is better to hide all Items than to hide a single simple point. Simply use a boolean to control it.
Determine whether the value is true or false in getView to display/hide tv1 and tv2.
When you click a button on the top of the ListView, set boolean to true and then adapter. setpolicychanged: Let the listView update it again, which is equivalent to getView again, and then judge boolean again to display or hide tv1 and tv2. Click the button again, modify the boolean value, and then update the adapter.