Quantcast
Viewing all articles
Browse latest Browse all 8068

[Alloy] How to set Controller as HeaderView to TableViewSection in Android?

Hi folks,

I need your help again.

I want to use custom headers for my table view sections. Therefor I have a header controller. I want to use it as headerView for TableViewSections.

Here is my code, that works fine on iOS:

var topPlacesHeader = Alloy.createController('header', {titleid: L('monitor:top_places')}).getView();
$.topPlacesSection.setHeaderView(topPlacesHeader);
But on Android, it doesn't work because the headerView have to be set at creation-time
Type: TypeError
Message: Object #<TableViewSection> has no method 'setHeaderView'
Any solutions, hints or advice? Thank you!

Viewing all articles
Browse latest Browse all 8068

Trending Articles