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

后端 未结 10 2086
夕颜
夕颜 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

    I had the same problem today. I have multiple ListViews.. With the information from the first, it builds the list of the next one and everyone has setAdapter in it. For me, the best solution was to put

    setListAdapter(null);
    

    on top of the function, where I inflate the Header. I hope this helps..

提交回复
热议问题