[TIMOB-2844] Android: Ciick events not triggered if held to long.
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-18T13:04:12.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-10, Release 1.6.2 |
Components | Android |
Labels | android, click, enterprise, feature, handler, release-1.6.2, release-1.7.0, reported-1.5.1, rplist |
Reporter | Rick Blalock |
Assignee | Bill Dawson |
Created | 2011-04-15T03:30:58.000+0000 |
Updated | 2011-04-18T13:04:12.000+0000 |
Description
When holding your finger slightly longer than usual the click event is not fired on buttons. I tested this around other native apps. There are some cases in a normal Android app where this would fire a separate event (such as opening a secondary window). However in other instances (like the brightness page under settings) holding down your finger on "cancel" will eventually run the click handler once the finger is lifted.
Customer's ticket: http://developer.appcelerator.com/helpdesk/view/66081">http://developer.appcelerator.com/helpdesk/view/66081
On-going q/a: http://developer.appcelerator.com/question/100321/android-clicks-not-triggering-event-handler-if-slightly-too-long#178771]"> http://developer.appcelerator.com/question/100321/android-clicks-no...,
Tested on Kitchen Sink with an Android 2.2 device using Ti. 1.6 and 1.5.1.
I would just add that in any Settings menu item that has an option list popup when you click it, you can press and hold the menu item itself, or any of the option list items, or any Select/Cancel button as long as you want. They stay highlighted, and when you let go they perform the click function. In KS, this is not true for any button - if you pause for the slightest fraction of a second, the button click does not fire.
We have enterprise attention for this, now.
Sample Code
The following code has a really big button and label. Touching the button updates the label with the number of seconds since the app launched. It should be useful for testing if the click event is firing.
Tested On
Titanium SDK version: 1.6.0 (02/23/11 12:34 9882e81)
BROKEN on Samsung EPIC 4G running Android 2.2
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/75681">http://developer.appcelerator.com/helpdesk/view/75681
Bill, I think the problem may be in the Gesture handler. I'm not for some reason the OS isn't sending the click in this instance.
(from [f6a4a833411636403e9bae9b03bce3a2dae68c5b]) Make sure click listener not firing if touchable has been set to false. [#2844] https://github.com/appcelerator/titanium_mobile/commit/f6a4a833411636403e9bae9b03bce3a2dae68c5b"> https://github.com/appcelerator/titanium_mobile/commit/f6a4a8334116...
(from [88f6a53f3c831ede4a05b78a5ac79269709556a0]) Remove click event firing from the single tap handler since a click and a single tap are not the same thing. (Click can have a long press phase, whereas single tap must be quick to be fired.) [#2844] https://github.com/appcelerator/titanium_mobile/commit/88f6a53f3c831ede4a05b78a5ac79269709556a0"> https://github.com/appcelerator/titanium_mobile/commit/88f6a53f3c83...
Tested with Titanium SDK version: 1.7.0 (03/14/11 11:01 f6a4a83) on
Nexus S 2.3.2
Emulator 2.1
Android only issue, tried 1.6 on iOS.
Added to stable branch 1_6_X
Setting affectedVersion. Not possible w/o reopening.
Re closing after updating fixed version