Using Listview.addheaderview (view), you can add a view view above the ListView so that the ListView and the view join together in an effect that looks like a whole
Typically used for pull-up refresh pull-down load listview
1, about the Addheaderview (view) method of multiple use
Corresponding to a ListView object such as: List
Each time the Addheaderview (view) method is used, a view is added above the list object
The order in which the view is added is arranged in the order in which they are added,
List.addheaderview (View1);
List.addheaderview (VIEW2);
The effect is:
View1 on top view2 at the bottom.
2, about the position of the item subkey after the ListView object uses the Addheaderview () method
List.addheaderview (View1);
List.addheaderview (VIEW2);
There are two view views above the list object,
When the first position of the list object is the View1 view, it is no longer the first item subkey in the list
For example, after adding view1,view2, the position of the list's first item subkey becomes 2.
position:0
Position:1
Position:2--list.size ()-2;
Pull to Refreshlistview add Headerview