@ Override public int getItemViewType ( int position ) { int viewType = TYPE_ITEM ; if ( isHeaderPosition ( position ) ) { viewType = TYPE_HEADER ; } else if ( isFooterPosition ( position ) ) { viewType = TYPE_FOOTER ; } return viewType ; }
Returns the type associated to an item given a position passed as arguments . If the position is related to a header item returns the constant TYPE_HEADER or TYPE_FOOTER if the position is related to the footer if not returns TYPE_ITEM .