Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable header view in ListView

Anybody knows how to disable the header view in list view? I need to add a header into a list view and make it not clickable. For adapter it's pretty simple: return false in isEnabled(int position) method but I didn't find an appropriate function for list headers/footers. Setting enabled flag for header view didn't help, nor did specifying "android:descendantFocusability="blocksDescendants"" in header's xml

like image 891
Artem Avatar asked Aug 18 '11 09:08

Artem


1 Answers

use these methods to add header and footer in list:

list.addFooterView(v);
list.addHeaderView(v, data, isSelectable);
like image 128
Vineet Shukla Avatar answered Oct 03 '22 22:10

Vineet Shukla