getAdapter throwing java.lang.ClassCastException

I had used addHeaderView method to add a header to my listview. But when I went to retrieve my adapter I kept getting class cast exceptions. I was very mystified until I looked at my recent changes. I commented out the addheaderview line and viola it worked. A bit of googling directed me to this useful link about the topic.

Leave a Reply

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