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

后端 未结 10 2067
夕颜
夕颜 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:33

    If you were used android:entries in ListView in xml file, Its called setAdapter() method before addHeaderView. So remove android:entriesattribute from ListView in xml layout file. It will be work.

提交回复
热议问题