懒得翻译,直接贴官方文档了。
public void addFooterView (View v)
Add a fixed view to appear at the bottom of the list. If addFooterView 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: When first introduced, this method could only be called before setting the adapter with setAdapter(ListAdapter)
. Starting with KITKAT
, this method may be called at any time. If the ListView's adapter does not extend HeaderViewListAdapter
, it will be wrapped with a supporting instance of WrapperListAdapter
.
public void addHeaderView (View v)
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: When first introduced, this method could only be called before setting the adapter with setAdapter(ListAdapter)
. Starting with KITKAT
, this method may be called at any time. If the ListView's adapter does not extend HeaderViewListAdapter
, it will be wrapped with a supporting instance of WrapperListAdapter
.