Problem description
The ListView on Android does not fire the pinch event.
Steps to reproduce
Use the following code to reproduce the issue:
var win = Ti.UI.createWindow({backgroundColor: 'white'});
var section = Ti.UI.createListSection({
headerTitle: 'Test',
items: [{properties: {title: 'Apple'}}]
});
var listView = Ti.UI.createListView({
sections: [section]
});
listView.addEventListener('pinch', function(e) {
alert(e);
});
win.add(listView);
win.open();
Pinch event is not fired on Android, while it works fine on iOS.
Note: the event does not also bubble to the parent view.
Override registerForTouch to use the ListView instead of the container to handle the ListView touch events https://github.com/appcelerator/titanium_mobile/pull/4334
backport PR: https://github.com/appcelerator/titanium_mobile/pull/4504
Verified the fix. Now we get the pinch event. Thus closing Environment: Appcel Studio : 3.1.2.201308091728 Ti SDK : 3.1.2.v20130814124556 Mac OSX : 10.8.4 Alloy : 1.2.0-beta CLI - 3.1.2-alpha android 4.2.2
Tested and verified fix with: Titanium Studio, build: 3.1.2.201308091617 Titanium SDK, build: 3.1.2.v20130814124556 Alloy: 1.2.0-beta CLI: 3.1.2-alpha Device: Nexus7(2) Android version 4.3 ListView does fire the "pinch" event