[TIMOB-1701] Picker not responding to touch events
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2011-05-17T14:18:26.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0 |
Components | Android |
Labels | android, defect |
Reporter | Kevin Whinnery |
Assignee | Kevin Whinnery |
Created | 2011-04-15T02:59:53.000+0000 |
Updated | 2011-05-17T14:18:26.000+0000 |
Description
In the android_native_refactor branch, picker is not responding to touch events. Code to repro:
(link removed)
(function() {
var suites = ['login', 'test 1', 'test 2', 'test 3'];
var testWindow = Ti.UI.createWindow({
exitOnClose: true,
backgroundColor: '#0000FF'
});
var suitePicker = Ti.UI.createPicker({
left: 0,
right: 0,
top: 30
});
suitePicker.add(suites.map(function(suite) {
return Ti.UI.createPickerRow({title: suite});
}));
testWindow.add(suitePicker);
testWindow.open();
})();
addendum - you can use the trackball to select and open the picker
Comments
- kevinwhinnery 2011-04-15
Our array prototype has:
Array.prototype.map = function(f) { var output = []; for (var i=0; i<this.length; i++) { output.push(f(this[i])); } return output; };
- Bill Dawson 2011-04-15
You're saying that when you tap on the picker, it doesn't show its dropdown? It's working fine for me both in the emulator and on my HTC Desire.
- Bill Dawson 2011-04-15
BTW, this was my complete test. All of this was in app.js:
Titanium.UI.setBackgroundColor('#000'); Array.prototype.map = function(f) { var output = []; for (var i=0; i<this.length; i++) { output.push(f(this[i])); } return output; }; (function() { var suites = ['login', 'test 1', 'test 2', 'test 3']; var testWindow = Ti.UI.createWindow({ exitOnClose: true, backgroundColor: '#0000FF' }); var suitePicker = Ti.UI.createPicker({ left: 0, right: 0, top: 30 }); suitePicker.add(suites.map(function(suite) { return Ti.UI.createPickerRow({title: suite}); })); testWindow.add(suitePicker); testWindow.open(); })();
- Thomas Huelbert 2011-04-15
Using Bills code, I saw the correct behavior (using trackball and touch) on a nexus 1 (2.2) and a g1 (1.6) I was I was able to invoke the picker and select an item.
- Bill Dawson 2011-04-15
Kevin,
Thomas and I apparently got this working fine. Do you want to close as Invalid? (It's an oldie). - Bill Dawson 2011-04-15
ping kevin.
- Eric Merriman 2011-05-17 Could not reproduce with 1.7.0RC1. Closing.