What does the second parameter in AddHeaderView in the ListView class do?

The following is the documentation of the method, I don’t understand what the Object data does?

What is this for?

public void addHeaderView (View v, Object data, boolean isSelectable)

Add a fixed view to the top of the list. If addHeaderView is called more than once, views are displayed in the order in which they were added. Views added with this call can focus if they want to. NOTE. Call this before calling setAdapter. This is so that the ListView can wrap the supplied cursor with one that also takes into account the presentation of the header and footer.

Parameters:

   v:           The view to add.
   data:         Data to associate with this view.
   isSelectable: whether the item is selectable.
+5
source share
1 answer
+7

All Articles