StickyListHeaders
StickyListHeaders copied to clipboard
Any way to hide the first header?
Unable to send null to getHeaderView. I don't want to display a blank header above the first row.
you can use the common ListView instead of this Custome ListView. Of course, you can modify the source code. in the class AdapterWrapper's configureHeader method if(header == null) throw new NullPointerException("Header view must not be null."); alter to if(header == null) return null; then you can return null to getHeaderView. but this modification is change the goal of the custom ListView
you can set the view visibility to 'gone', for the first header
Do you solve this problem?i dont need the first too,i chang my code like above but not useful, in adapter method getViewHeader(),if(position == 0){convertView.setVisibility(View.GONE);} not useful.
I got around the issue by basically creating a list row layout that's 0dp in height. And then just conditionally show it if it's the first row: if(position == 0) { convertView = mInflater.inflate(R.layout.list_row_header_blank, parent, false); } else { convertView = mInflater.inflate(R.layout.list_row_alerts_header, parent, false); }