Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27834] Android: NavigationWindow doesnt trigger open and close events

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2020-08-10T19:38:07.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.1.0
ComponentsAndroid
Labelsandroid, events, navigationwindow
ReporterAndrea Vitale
AssigneeGary Mathews
Created2020-03-27T08:49:25.000+0000
Updated2020-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.

Comments

  1. Michael Gangolf 2020-04-08

    PR: https://github.com/appcelerator/titanium_mobile/pull/11607 I've changed the example controller to:
       var args = $.args;
       
       function onNavigationWindowOpen() {
       	Ti.API.info('Opened');
       }
       
       function onNavigationWindowClose() {
       	Ti.API.info('Closed');
       }
       
       setTimeout(function() {
       	$.index.close();
       }, 4000)
       
       $.index.open();
       
    So it will actually open and close the NavigationWindow.
  2. Samir Mohammed 2020-05-21

    FR Passed, waiting on Jenkins build.
  3. Christopher Williams 2020-06-03

    manually merged to master for 9.1.0 target.
  4. Satyam Sekhri 2020-08-10

    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

JSON Source