Skip to content

Set the view via .add() #3

@FokkeZB

Description

@FokkeZB

I'd like to be able to set the view via a .add() method:

var myListView = Ti.UI.createListView({
    height: Ti.UI.FILL,
    width: Ti.UI.FILL
});

var swipeRefreshModule = require('com.rkam.swiperefreshlayout');
var swipeRefresh = swipeRefreshModule.createSwipeRefresh({
    height: Ti.UI.FILL,
    width: Ti.UI.FILL
});

swipeRefresh.add(myListview);

$.content.add(swipeRefresh);

This will allow me to use the module in Alloy XML:

<Alloy>
  <Window>
    <SwipeRefresh module="com.rkam.swiperefreshlayout">
      <ListView>
        <!-- listview tags -->
      </ListView>
    </SwipeRefresh>
  </Window>
</Alloy>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions