The two days have been troubled by a strange bug.
The symptom is this: there is a edittext below the ListView, and the ListView will re-read the data when entering characters in the EditText, making the app run very slowly
In the code, GetView is only called when it is loaded, and should not be invoked at this time.
Looked for a long time code, finally found the problem!! (De other people's bug is really sad)
This is a vertical linearlayout, above a ListView, below or a linearlayout, the height is controlled by weight
And the height of the linearlayout below is wrapcontent.
When the edittext changes, the height changes, affecting the change of the ListView (although it actually does not change, but still leads to the GetView call)
If you find that the ListView is constantly setadapter, you may want to check if the layout is a problem
A place to pay attention to (unexpected title)