Skip to content

Instantly share code, notes, and snippets.

@grantges
Created February 10, 2016 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grantges/ffbb0771adf091d15941 to your computer and use it in GitHub Desktop.
Save grantges/ffbb0771adf091d15941 to your computer and use it in GitHub Desktop.
Odd behavior with ScrollableView
var interMediateStop = 3;
var _menuOptionWidth = 0;
var diamention = 0;
function onScrollCurrentPosition(e) {
//$.dottedCurrentMarker.left = (e.currentPageAsFloat * _menuOptionWidth);
}
$.index.open();
".container": {
backgroundColor:"white",
layout : "vertical"
}
"Label": {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
color: "#000"
}
"#scrollableView": {
width: Ti.UI.FILL,
height: Ti.UI.SIZE,
top : "30dip"
}
<Alloy>
<Window class="container">
<View id="view1" pageId="1" backgroundColor="red" width="90%" height="Ti.UI.SIZE">
<Label height="Ti.UI.SIZE">View 1</Label>
</View>
<ScrollableView id="scrollableView" onScroll="onScrollCurrentPosition">
<View id="view1" pageId="1" backgroundColor="red" width="90%" height="100">
<Label height="Ti.UI.SIZE">View 1</Label>
</View>
<View id="view2" pageId="2" backgroundColor="green" width="90%" height="Ti.UI.SIZE">
<Label>View 2</Label>
</View>
<View id="view3" pageId="3" backgroundColor="blue" width="90%" height="Ti.UI.SIZE">
<Label>View 3</Label>
</View>
<View id="view4" pageId="4" backgroundColor="yellow" width="90%" height="Ti.UI.SIZE">
<Label>View 4</Label>
</View>
</ScrollableView>
</Window>
</Alloy>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment