I have added a view to the header of listVivew,
View TopSearch = (View) View.inflate(this, R.layout.search, null);
lv.addHeaderView(TopSearch, null
API 18 and lower is confused about what it is wrapping. To help it, set your header and/or footer PRIOR to assigning the adapter. That way the correct wrapping takes place under the covers. Then remove the header/footer immediately after (if that is what you want).
myList.addFooterView(myFooterView);
myList.setAdapter(adapter);
myList.removeFooterView(myFooterView);