[TIMOB-27834] Android: NavigationWindow doesnt trigger open and close events
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-08-10T19:38:07.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.1.0 |
Components | Android |
Labels | android, events, navigationwindow |
Reporter | Andrea Vitale |
Assignee | Gary Mathews |
Created | 2020-03-27T08:49:25.000+0000 |
Updated | 2020-08-10T19:38:07.000+0000 |
Description
As per the docs the [open](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.NavigationWindow-event-open) and [close](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.NavigationWindow-event-open) events must be triggered when the NavigationWindow opens and closes respectively.
This only works on iOS.
Here is a sample:
_controller.xml_
<Alloy>
<NavigationWindow onOpen="onNavigationWindowOpen" onClose="onNavigationWindowClose">
<Window>
<Label>Main</Label>
</Window>
</NavigationWindow>
</Alloy>
_controller.js_
// Arguments passed into this controller can be accessed via the $.args
object directly or:
var args = $.args;
function onNavigationWindowOpen() {
Ti.API.info('Opened');
}
function onNavigationWindowClose() {
Ti.API.info('Closed');
}
Nor _Opened_ neither _Closed_ events were shown inside the console.
PR: https://github.com/appcelerator/titanium_mobile/pull/11607 I've changed the example controller to:
So it will actually open and close the NavigationWindow.
FR Passed, waiting on Jenkins build.
manually merged to master for 9.1.0 target.
Verified on: Mac OS: 10.15.4 SDK: 9.1.0.v20200810095016 Appc CLI: 8.1.0-master.9 JDK: 11.0.4 Node: 10.17.0 Studio: 6.0.0.202005141803 Device: Nexus4(v5.1.1) device, Pixel3(v10.0) emulator