Why adding header to listView moves items position by one?
When I add header, position of first item in the list is no longer 0 but 1. Why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your ‘header’ is representing the same data as all other items, but has different layout.
The header might contain data and it might not. (you might not be using it but another developer could easily add list data to his header and footer).
Thus since the header could contain data it is in fact an item, which occupies position 0. Similarly footer occupies the last position (if used)