A word: Ya Addfootview executed several times, go back to modify the conditions, Footview already exist when you don't add ~ ~ ~ Don't understand please see the last ~ ~
Troubleshooting Order:
1, write a test project alone, simple Listview,getview return a textview,addfootview after the interface normal
2, modify the official project, GetView also modified to return TextView, the problem exists ~ ~
========================
Horse eggs I only use TextView also reported wrong, don't let live!!
Suddenly found that the footview each move down the size of the same, it is repeated added ~
Sure enough to add again ~ ~ ~
========================
The premise of the problem arises:
Private View Footview = View.inflate (Context,r.id.footview,null), .... private void Updatelistview () {if (Hasmoredata) Li Stview.addfooterview (Footview); else Listview.removefooterview (Footview);}
That is , Updatelistview is executed several times, the same view is repeated add, the problem of this ghost will appear.
Modify the judging condition:
(!hasmoredata) {Listview.removefooterview (footview);} (Listview.getfooterviewscount () = =) {. Listviewaddfooterview (Footview);}
Problem solving.
The Footview of the ListView keeps getting longer.