[TIMOB-2018] Android: Implement Synthetic Events on Proxies
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:57:49.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M01 |
Components | Android |
Labels | android, feature |
Reporter | Don Thorp |
Assignee | Don Thorp |
Created | 2011-04-15T03:08:15.000+0000 |
Updated | 2011-04-17T01:57:49.000+0000 |
Description
See #581
Basically I should be able to add an event listener to a proxy and fire it. Ticket #581 is specifically about Window(Views) but this should be a TiProxy capability, not just TiViewProxy.
Comments
- Don Thorp 2011-04-15
Should already be working.
- Don Thorp 2011-04-15
Verified that the code from #581 works as expected. I've included the code inline below to make testing easier.
Titanium.UI.setBackgroundColor('#000'); var tabGroup = Titanium.UI.createTabGroup(); var win = Titanium.UI.createWindow({ title:'Tab', backgroundColor:'#fff' }); var tab = Titanium.UI.createTab({ icon:'KS_nav_ui.png', title:'Tab', window:win }); var alt = Titanium.UI.createAlertDialog({ title: 'clicked!', message: '' }); var button = Titanium.UI.createButton({ title:'Fires synthetic event', height:40, width:200, top:10 }); var button2 = Titanium.UI.createButton({ title:'Simple Click event', height:40, width:200, top:100 }); button.addEventListener("click", function() { win.fireEvent("foo"); }); button2.addEventListener("click", function() { alt.show(); }); win.add(button); win.add(button2); win.addEventListener("foo", function() { alt.show(); }); tabGroup.addTab(tab); tabGroup.open();
- Thomas Huelbert 2011-04-15
confirmed g2 and 2.1 sim (1.5.0.7d08f15), added test to bugtests