Use a commonJS module that wraps a view, then change the view parameters, heres a quick example:
// myView.js
function MyView(title, color) {
var self = Ti.UI.createView({backgroundColor : color});
var label = Ti.UI.createLabel({text: 'A simple label'});
// Add other components to your custom view
self.add(label);
return self;
}
// Dont forget this!
module.exports = MyView;
Now require you're custom module and use it in your scrollable view:
var MyView = require('MyView');
var scrollableView = Ti.UI.createScrollableView({
views : [new MyView("View 1", "red"), new MyView("View 2", "green"), new MyView("View 3", "blue")],
showPagingControl : true
});