[TIMOB-25678] Android: Window transitions are not enabled unless a shared element exists
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2019-04-17T11:28:10.000+0000 |
| Affected Version/s | Release 7.0.0 |
| Fix Version/s | Release 8.0.1 |
| Components | Android |
| Labels | n/a |
| Reporter | Gary Mathews |
| Assignee | Gary Mathews |
| Created | 2018-01-16T21:39:33.000+0000 |
| Updated | 2019-05-25T04:22:42.000+0000 |
Description
-
hasActivityTransitions incorrectly requires at least one sharedElement to be defined in order to return true
var win = Ti.UI.createWindow({
backgroundColor: 'blue',
layout: 'vertical'
}),
lbl = Ti.UI.createLabel({
left: 5,
text: 'TEST LABEL',
transitionName: 'lbl'
}),
btn = Ti.UI.createButton({
title: 'OPEN'
});
btn.addEventListener('click', function () {
var win2 = Ti.UI.createWindow({
backgroundColor: 'red',
layout: 'vertical',
activityEnterTransition: Titanium.UI.Android.TRANSITION_SLIDE_RIGHT
}),
lbl2 = Ti.UI.createLabel({
right: 5,
text: 'TEST LABEL',
transitionName: 'lbl'
}),
btn2 = Ti.UI.createButton({
title: 'CLOSE'
});
btn2.addEventListener('click', function () {
win2.close();
});
win2.add([lbl2, btn2]);
// win2.addSharedElement(lbl, 'lbl'); // this should not need uncommenting to see a Window transition
win2.open();
});
win.add([lbl, btn]);
win.open();
master: https://github.com/appcelerator/titanium_mobile/pull/9740
Found issues commented in the PR.
FR Passed. Waiting for merge to be enabled.
PR Merged.
*Closing ticket.* Verified fix in SDK version
7.5.0.v20181026044242. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/9740Reverted due to issue mentioned here: [TIMOB-26492]
master: https://github.com/appcelerator/titanium_mobile/pull/10405 8_0_X: https://github.com/appcelerator/titanium_mobile/pull/10589
FR's Passed. Waiting for jenkins.
Merged to master and 8_0_X
*Closing ticket.* Fix verified in SDK version
8.0.1.v20190404135851and SDK version8.1.0.v20190403152850Test and other information can be found at: master: https://github.com/appcelerator/titanium_mobile/pull/10405 8_0_X: https://github.com/appcelerator/titanium_mobile/pull/10589[~gmathews] [~jquick] This fix seems to have broken our Appium tests (Yeti). When running Yeti or tests from QE-Feature test. The following error is seen
[ERROR] TiExceptionHandler: (main) [239,239] ti:/tabgroup.js:108 [ERROR] TiExceptionHandler: _open.call(this, options); [ERROR] TiExceptionHandler: ^ [ERROR] TiExceptionHandler: Error: Attempt to invoke virtual method 'void android.view.ViewRootImpl.setPausedForTransition(boolean)' on a null object reference [ERROR] TiExceptionHandler: at TabGroup.open (ti:/tabgroup.js:108:9) [ERROR] TiExceptionHandler: at /app.js:1:133 [ERROR] TiExceptionHandler: at Module._runScript (ti:/module.js:610:9) [ERROR] TiExceptionHandler: at Module.load (ti:/module.js:106:7) [ERROR] TiExceptionHandler: at Module.loadJavascriptText (ti:/module.js:455:9) [ERROR] TiExceptionHandler: at Module.loadAsFile (ti:/module.js:510:15) [ERROR] TiExceptionHandler: at Module.loadAsFileOrDirectory (ti:/module.js:427:20) [ERROR] TiExceptionHandler: at Module.require (ti:/module.js:254:17) [ERROR] TiExceptionHandler: at Module.global.Module.require (/ti.main.js:8244:34) [ERROR] TiExceptionHandler: at require (ti:/module.js:568:15) [ERROR] TiExceptionHandler: [ERROR] TiExceptionHandler: android.app.ActivityTransitionCoordinator.startInputWhenTransitionsComplete(ActivityTransitionCoordinator.java:897) [ERROR] TiExceptionHandler: android.app.ActivityTransitionCoordinator.viewsTransitionComplete(ActivityTransitionCoordinator.java:885) [ERROR] TiExceptionHandler: android.app.ExitTransitionCoordinator.getExitTransition(ExitTransitionCoordinator.java:318) [ERROR] TiExceptionHandler: android.app.ExitTransitionCoordinator.beginTransitions(ExitTransitionCoordinator.java:365) [ERROR] TiExceptionHandler: android.app.ExitTransitionCoordinator.-wrap0(ExitTransitionCoordinator.java) [ERROR] TiExceptionHandler: android.app.ExitTransitionCoordinator$4.run(ExitTransitionCoordinator.java:216) [ERROR] TiExceptionHandler: android.app.ActivityTransitionCoordinator.startTransition(ActivityTransitionCoordinator.java:773) [ERROR] TiExceptionHandler: android.app.ExitTransitionCoordinator.startExit(ExitTransitionCoordinator.java:213) [ERROR] TiExceptionHandler: android.app.ActivityTransitionState.startExitOutTransition(ActivityTransitionState.java:317) [ERROR] TiExceptionHandler: android.app.Activity.cancelInputsAndStartExitTransition(Activity.java:3960) [ERROR] V8Exception: Exception occurred at ti:/tabgroup.js:108: Uncaught Error: Attempt to invoke virtual method 'void android.view.ViewRootImpl.setPausedForTransition(boolean)' on a null object reference[~smohammed], I'll look into it. Thanks for the info. *Edit:* _I was told this is failing in yeti's "ImageView_View" test. The interesting detail here is that tabs are added after the
TabGroupis created, but before it has been opened._ https://github.com/appcelerator/yeti/blob/master/Modules/Image_View/App/acceptance.jsThis fix broke our unit test suite on master and 8_0_X, resulting in ~78 failed tests on Android after merging. This one needs another look.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10832 PR (8.0.x): https://github.com/appcelerator/titanium_mobile/pull/10833
FR Passed, waiting on Jenkins.
Merged to master and 8_0_X.
Closing ticket, fix verified in SDK version
8.1.0.v20190416065710and SDK version8.0.1.v20190415060903. *Test and other information can be found at:* PR (master): https://github.com/appcelerator/titanium_mobile/pull/10832 PR (8.0.x): https://github.com/appcelerator/titanium_mobile/pull/10833I think this caused a regression in 8.0.1 and 8.1.0: TIMOB-27092
We can confirm that reverting this pull request fixes the window transition issues.