I\'m trying to make an ActionBar spinner that has separators. I have implemented a SpinnerAdapter
that has 2 item view types (thanks to getViewTypeCount
The problem is here:
public View getView(final int position, final View convertView, final ViewGroup parent) {
return getView(mActionBarItemLayoutResId, position, convertView, parent);
}
This method will always return the same View
type, whether called for a separator or a data item. You need to check the position here and return an appropriate view.