Provide my own view for sortable_header.xml
Hello,
I'd like to be able to provide my own view for for the SortableTableHeaderView. Instead of the the little widget, I'd like to overlay the header when it's sorted. Unfortunately there isn't a way to override or inject anything in SortableTable to do this.
Do you think it'd be a good idea to allow SortableTableView to inject a custom content provider to inflate the headerContainerLayout in SortableTableHeaderView.renderHeaderViews()? I think we can also change the LinearLayout to a ViewGroup.
I'm thinking something like:
final ViewGroup headerContainerLayout = (ViewGroup) mHeaderContentProvider(adapter, this);
Then providing the appropriate setters on SortableTable and SortableTableHeaderView.
The the default provider would just inflate the current R.layout.sortable_header.
Hi Jonathon,
die what use case do you need this feature? I don't understand what you mean with "overlay the header when it's sorted". Do you want to get rid of the "sorting indicators" and instead replace the full header of the sorted column?
Best regards, Ingo
Yeah our designs have a transparent image with an arrow on the top or bottom of the header. I was able to override the layout using a layout-v9 folder, but that seemed kinda hacky.
So, instead of the arrows on the left of the header view you want to have them above and below the header view?
yeah, we overlay the entire header cell.