adapter-kit
adapter-kit copied to clipboard
Override SimpleSectionAdapter getView
Hello, in my project, I have to override SimpleSectionAdapter to change style of the section background. Is there a way to do this properly ?
In my case, I override the getView method, do the switch again, and set the background color on my view. To do this I have to create another mContext field and constant VIEW_TYPE_SECTION_HEADER because there are private.
Thx
@bbbenja You can just supply a different layout for the section.
Please check the constructor, it allows you to specify a custom layout for this purpose.
SimpleSectionAdapter(Context context, BaseAdapter listAdapter, int sectionHeaderLayoutId, int sectionTitleTextViewId, Sectionizer<T> sectionizer)
Let me know if this is what you are looking for or do you want to make changes to the section header during runtime?
Yeah it is during the runtime
@bbbenja Nice suggestion, will implement a callback that will allow you to do that.