Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27101] Android: Window open() wrongly does a shared-element fade-in animation by default as of 8.0.1

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-06-10T17:54:49.000+0000
Affected Version/sRelease 8.0.1
Fix Version/sRelease 8.0.2
ComponentsAndroid
Labelsandroid, animation, engSchedule, open, regression, transition, window
ReporterJoshua Quick
AssigneeJoshua Quick
Created2019-05-25T04:16:28.000+0000
Updated2019-06-10T17:54:49.000+0000

Description

*Summary:* As of Titanium 8.0.1, a Window.open() method call is opening with a fade-in animation instead of the system default animation (typically slides-up). What's happening is that the window is doing a "shared-element" animation instead, which is mostly intended to show a view moving from one window to another. This regression was caused by [TIMOB-25678] which was intended to allow app developers to use the shared-element transition animation properties such as "activityEnterTransition" without having to set up any views as shared-elements via Window.addSharedElement(). This was meant to be more convenient to use than the Window.open() method's "activityEnterAnimation" and "activityExitAnimation" properties. The negative consequence of this change was that it was always defaulting to shared-element transition animations even if none of the transition properties were assigned. *Steps to reproduce:*

Build and run the below code on Android.

Tap on the "Open" button to open a child window.

var windowCount = 0;
function openWindow() {
	windowCount++;
	var window = Ti.UI.createWindow({
		title: "Window " + windowCount,
	});
	var openButton = Ti.UI.createButton({ title: "Open" });
	openButton.addEventListener("click", function() {
		openWindow();
		window.close();
	});
	window.add(openButton);
	window.open();
}
openWindow();
*Result:* After pressing the "Open" button, it looks like the app fades to the Android system's home screen and then the app's child window fades-in. *Expected Result:* Child window should open with a slide-in animation instead.

Comments

  1. Joshua Quick 2019-05-25

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10910
  2. Joshua Quick 2019-05-31

    PR (8.0.x): https://github.com/appcelerator/titanium_mobile/pull/10925
  3. Hans Knöchel 2019-06-04

    This is a duplicate of TIMOB-27092 (where some more people are tracking the issue as well). Might be good to link.
  4. Joshua Quick 2019-06-04

    PR (8.1.x): https://github.com/appcelerator/titanium_mobile/pull/10933
  5. Keerthi Mahalingam 2019-06-04

    FR passed. Waiting on Jenkins
  6. Keerthi Mahalingam 2019-06-10

    Verified the Fix on SDK 8.0.2.v20190605070127 and 8.1.0.v20190606063903. Windows transition works as expected.
        Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
       Node.js
         Node.js Version             = 8.9.1
         npm Version                 = 5.5.1
       Titanium CLI
         CLI Version                 = 5.1.1
       Titanium SDK
         SDK Version                 = 8.0.2.v20190605070127 and 8.1.0.v20190606063903
       CLI -7.0.11
       Device =one plus 5t android 9
       Emulator = pixel xl android 9
       

JSON Source