[TIMOB-11668] Android: Scrollview does not generate click events
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-03-20T05:24:35.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | Release 3.1.0, 2013 Sprint 06 API, 2013 Sprint 06 |
Components | Android |
Labels | android, clickEvent, exalture, qe-testadded, scrollview |
Reporter | Soumya Kanti Kar |
Assignee | Sunila |
Created | 2012-11-02T11:39:04.000+0000 |
Updated | 2013-09-25T06:43:23.000+0000 |
Description
When a scroll view with an other view is added to a window. The Scroll view does not listen to the event. If you click on the view inside scrollview then both the view and scrollview will get the click event, but if you click on just the scroll view, the scrollview is not getting any click event. This issue is happening only in Android. It works properly in iPhone.
Steps to Reproduce:
1. Load the below app.js 2. Click on the red view (The click event of both view and scrollview is getting called) 3. Click on the yellow view (The click event of the scrollview is not getting called) app.js:
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var self = Ti.UI.createView({
left : 0,
top : 0,
width : '50%',
height : '50%',
backgroundColor : 'red'
});
self.addEventListener('click', function(e) {
Ti.API.info("View has been clicked");
});
var scrollbar = Ti.UI.createScrollView({
left : 0,
top : 0,
width : '100%',
height : '100%',
backgroundColor : 'yellow'
});
scrollbar.addEventListener('click', function(e) {
Ti.API.info("Scrollbar has been clicked");
});
scrollbar.add(self);
win.add(scrollbar);
win.open();
Tested Devices: HTC Sense Android v2.3.3
Attachments
File | Date | Size |
---|---|---|
zTouchTest.zip | 2012-11-02T11:39:04.000+0000 | 754747 |
The problem reproduces with release 3.0.2 and master release 3.1.0 tested on Titanium Studio, build: 3.0.2.201302191606 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 Device: Samsung galaxy s duos Android version: 4.0.4 Android Emulator: Android SDK version: 2.2
I can confirm it. Is there a workaround available?
https://github.com/appcelerator/titanium_mobile/pull/3956
Environment used for verification - Titanium SDK: 3.1.0.v20130319225749 Titanium Studio:3.0.2.201302151605 Device: Samsung GALAXY Note (2.3.6),LG-P970 Android 2.2.2 and Nexus 7 Android 4.1