A possible fix to IllegalStateException: Cannot add header view to list -- setAdapter has already been called when trying to add a header or a footer.
This crash occured on a Samsung Galaxy Nexus running 4.2.2 which is completely normal.
I removed the setAdapter from the consturctor and moved it to the private initialize method and set the adapter only if the getAdapter method returns null.
This change enables the possibility to add header or footer to the CalendarPickerView.