I have added a view to the header of listVivew,
View TopSearch = (View) View.inflate(this, R.layout.search, null);
lv.addHeaderView(TopSearch, null, false);
And everything is fine until I try to execute (when data changes)
adapter.notifyDataSetChanged();
That always crash my application giving me following error:
> java.lang.ClassCastException: android.widget.HeaderViewListAdapter
If I remove header view then there is no error. Any suggestions? Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…