Cannot add header view to list — setAdapter has already been called

后端 未结 10 2084
夕颜
夕颜 2020-12-03 13:38

I have one edittext field and one \"search\" button. When I click on search, I have to display a list view with data corresponding to the values entered in the edittext. I h

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-03 14:34

    On android 2.3, add header after setAdapter (even if you have added early, then removed) will throw an exception. To hide or show a header dynamically, use setVisibility(). How? You can see Hiding header views.

提交回复
热议问题