Skip to content

Commit d4685ee

Browse files
committed
Update example
1 parent 1f3d9a1 commit d4685ee

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

example/app.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var win = Ti.UI.createWindow({
22
title: 'ScrollableView',
3-
backgroundColor:'#eee'
3+
backgroundColor:'#000'
44
});
55

66
var label = Ti.UI.createLabel();
@@ -9,6 +9,9 @@ win.open();
99

1010
// Common params
1111
var params = {
12+
backgroundColor: '#fff',
13+
height: Ti.UI.SIZE,
14+
cacheSize: 3,
1215
clipViews: false,
1316
currentPageIndicatorColor: '#000',
1417
pageIndicatorColor: '#f00',
@@ -33,9 +36,11 @@ if (Ti.Platform.name === 'android') {
3336
scrollableView = Titanium.UI.createScrollableView(params);
3437
}
3538

36-
var view1 = Ti.UI.createView({ id: 'view1', backgroundColor: '#836' });
37-
var view2 = Ti.UI.createView({ id: 'view2', backgroundColor: '#246' });
38-
var view3 = Ti.UI.createView({ id: 'view3', backgroundColor: '#48b' });
39-
scrollableView.setViews([view1, view2, view3]);
39+
var view1 = Ti.UI.createView({ id: 'view1', backgroundColor: '#836', height: '200' });
40+
var view2 = Ti.UI.createView({ id: 'view2', backgroundColor: '#246', height: '180' });
41+
var view3 = Ti.UI.createView({ id: 'view3', backgroundColor: '#48b', height: '160' });
42+
var view4 = Ti.UI.createView({ id: 'view3', backgroundColor: '#b84', height: '140' });
43+
var view5 = Ti.UI.createView({ id: 'view3', backgroundColor: '#8b4', height: '120' });
44+
scrollableView.setViews([view1, view2, view3, view4, view5]);
4045

4146
win.add(scrollableView);

0 commit comments

Comments
 (0)