[TIMOB-767] Android: Missing Swipe Gesture
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-04T08:45:05.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 2.1.0, Sprint 2012-07 |
Components | Android |
Labels | api, parity |
Reporter | Don Thorp |
Assignee | Tony Lukasavage |
Created | 2011-04-15T02:35:57.000+0000 |
Updated | 2013-05-17T08:23:38.000+0000 |
Description
Test Case
var win = Ti.UI.createWindow({
backgroundColor: '#fff',
fullscreen: false,
exitOnClose: true
});
var view = Ti.UI.createView({
backgroundColor: '#a00',
height:200,
width:200
});
win.add(view);
view.addEventListener('swipe', function(e) {
alert(e.direction);
});
win.open();
Note, this is similar to #767 and #768
/sigh, I meant #768 and #1703
Closed #1703 as duplicate. #768 is for two finger tap, so leaving it open as it's a separate item.
The swipe gesture is only available on ScrollableView at this time.
Swipe event does not fire in 1.5.1 on scrollableview for Android.
Any updates? Swipe still doesn't fire on views or windows with 1.5.1 or 1.6 CI.
Any word on when this will be fixed? Swiping is really important on mobile. I'm using 1.5.1 and swiping is not working for a view, webview, imageview, or scrollableview
Workaround
Here is a workaround: https://gist.github.com/841075">https://gist.github.com/841075
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/75391">http://developer.appcelerator.com/helpdesk/view/75391
Submitted a pull request for native handling of swipe events, both horizontal and vertical, on Android views: [PR #1350](https://github.com/appcelerator/titanium_mobile/pull/1350)
This issue latest notification was not sent due to JIRA mail setting. Fixed now. Please check the issue for latests changes.
This bug still occurs in: Titanium SDK version: 1.9.0.v20120207124634 Javascript Engine: Rhino Platform & version/Device details: Android 3.1/LG-V909; Android 4.0.2/Galaxy Nexus; Android 2.3.4/HTC T-mobile; Android 3.2/Samsung GT-P7510 Titanium Studio version: 1.0.8.201201262211
Pull request: https://github.com/appcelerator/titanium_mobile/pull/1835 (a good one this time)
Adding environment info- Tested with Titanium SDK: 2.1.0.v20120605190238 Tested with Titanium Studio: 2.1.0.201206041625 Device - Android 2.2 and 4.0 Galaxy nexus Android runtime - V8
'swipe' is fired, but properties as 'row','index' are missing in the event. but in the document, it says 'swipe' event of the tableview has row/index properties. http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView-event-swipe tableView.addEventListener('swipe',function(e){ // e.row or e.index are not available for android. });