Recently do the ListView to increase the head of this problem, simply say, I use 4.4.4 test machine, completely nothing
Requirements are: AddHeader is a carousel diagram, is dynamically obtained from the background, if not displayed, in the 4.4.4 environment to test the first to determine the data obtained from the server, and then decide whether to add the header
But under 4.4 does not seem to be able to do so, the program will crash, give such a hint, meaning that you have to increase the head before the Setadapter, otherwise it will collapse, but now you have added, if the data from the server does not have the carousel graph data How to do, then the problem came, how to solve
In fact, I have a train of thought, I do so, the other did not think:
You can set the XML to gone, and then determine whether the server is set visable, but addheader to add in front of the set, I hope you have a better idea to say
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Java.lang.IllegalStateException:Cannot Add header view to List-Setadapter have already been Calle