[TIMOB-27101] Android: Window open() wrongly does a shared-element fade-in animation by default as of 8.0.1
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-06-10T17:54:49.000+0000 |
Affected Version/s | Release 8.0.1 |
Fix Version/s | Release 8.0.2 |
Components | Android |
Labels | android, animation, engSchedule, open, regression, transition, window |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2019-05-25T04:16:28.000+0000 |
Updated | 2019-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.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10910
PR (8.0.x): https://github.com/appcelerator/titanium_mobile/pull/10925
This is a duplicate of TIMOB-27092 (where some more people are tracking the issue as well). Might be good to link.
PR (8.1.x): https://github.com/appcelerator/titanium_mobile/pull/10933
FR passed. Waiting on Jenkins
Verified the Fix on SDK 8.0.2.v20190605070127 and 8.1.0.v20190606063903. Windows transition works as expected.