Skip to content

Instantly share code, notes, and snippets.

@MotiurRahman
Last active December 31, 2015 08:29
Show Gist options
  • Select an option

  • Save MotiurRahman/7960966 to your computer and use it in GitHub Desktop.

Select an option

Save MotiurRahman/7960966 to your computer and use it in GitHub Desktop.
Swipe (horizontal) doesn't work on a ScrollView
/* Hi I have tested this jira issue. It's a valid bug swipe event only work on a label not rest of the window
inside the ScrollView.
Testing Environment:
Android SDK: 4.2.2
Titanium SDK: 3.1.3,
CLI version 3.1.2
Steps to Reproduce:
1. Create a simple Project.
2. Paste this code in app.js file.
3. Run this code with testing environment.
4. Swipe only work on label not rest of the window.
*/
//Test Case
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var scrollView = Ti.UI.createScrollView({
layout : 'vertical',
contentHeight : 'auto',
top : 0,
bottom : 0,
left : 0,
right : 0
});
var label = Ti.UI.createLabel({
text : 'Swipe only works on this label',
font : {
fontSize : 48
},
top : 0,
});
scrollView.add(label);
win.add(scrollView);
win.addEventListener('swipe', function(e) {
alert('swipe');
});
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment