开发者

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

开发者 https://www.devze.com 2023-01-28 02:26 出处:网络
Below is the documentation of the method, I dont understand what does the Object data do? What is it for?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号