I'm trying to override getItemViewType and return a different view type for my footer, but integer comparison is failing within the function:
This image shows a debug session where the input position is 21 and the the private List mValues has a size of 21, however when I pushed "step over" the conditional code is skipped.
If both integers are equal, why does position == mValues.size() return false?
I cleaned and rebuilt my project before running.
UPDATE:
It works when the integers are hardcoded:
but not when I use the input parameter:
UPDATE
I added a Log statement as the first line of the function
Log.e("MYAPP", "position: " + position + ", evaluates: " + (position == 21));
and in my monitor I see: position: 21, evaluates: true
However, my breakpoint at return FOOTER_VIEW; is never called and none of the functions related to the footer view are ever called.
UPDATE:
Heres the full Adaptor: https://gist.github.com/fergusom/79c6d5d9b1fd5e8348949d114a0159d5
Note that I updated the code to compute a boolean first, but it still fails even though the boolean prints out true in the logs


