What does the second parameter in AddHeaderView in the class ListView do?
Below is the documentation of the method, I dont understand what does the Object data do?
What is it for?
public void addHeaderView (View v, Object data, boolean isSelectable)
Add a fixed view to appear at the top of the list. If addHeaderView is called more than once, the views will appear in the order they were added. Views added using this call can take focus if they want.开发者_如何学JAVA NOTE: Call this before calling setAdapter. This is so ListView can wrap the supplied cursor with one that will also account for header and footer views.
Parameters:
v: The view to add.
data: Data to associate with this view.
isSelectable: whether the item is selectable.
It's the data returned from Adapter's getItem method.
精彩评论