How To Fix ClassCastException: LinearLayout$LayoutParams Cannot Be Cast to AbsListView$LayoutParams

Most likely you encountered this exception

ClassCastException: LinearLayout$LayoutParams Cannot Be Cast to AbsListView$LayoutParams

because you either added a header and/or footer in the ListView component and when you removed them, you found out there was no error generated.

Explanations aside, to fix this problem just set the LayoutParams of your header or footer like this:

That should solve it.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *