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. 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With