Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25678] Android: Window transitions are not enabled unless a shared element exists

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2019-04-17T11:28:10.000+0000
Affected Version/sRelease 7.0.0
Fix Version/sRelease 8.0.1
ComponentsAndroid
Labelsn/a
ReporterGary Mathews
AssigneeGary Mathews
Created2018-01-16T21:39:33.000+0000
Updated2019-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();

Comments

  1. Gary Mathews 2018-01-16

    master: https://github.com/appcelerator/titanium_mobile/pull/9740
  2. Lokesh Choudhary 2018-10-19

    Found issues commented in the PR.
  3. Lokesh Choudhary 2018-10-23

    FR Passed. Waiting for merge to be enabled.
  4. Lokesh Choudhary 2018-10-25

    PR Merged.
  5. Samir Mohammed 2018-10-26

    *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/9740
  6. Joshua Quick 2018-10-29

    Reverted due to issue mentioned here: [TIMOB-26492]
  7. Gary Mathews 2019-01-14

    master: https://github.com/appcelerator/titanium_mobile/pull/10405 8_0_X: https://github.com/appcelerator/titanium_mobile/pull/10589
  8. Lokesh Choudhary 2019-03-27

    FR's Passed. Waiting for jenkins.
  9. Christopher Williams 2019-04-03

    Merged to master and 8_0_X
  10. Samir Mohammed 2019-04-05

    *Closing ticket.* Fix verified in SDK version 8.0.1.v20190404135851 and SDK version 8.1.0.v20190403152850 Test 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
  11. Samir Mohammed 2019-04-05

    [~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
        
  12. Joshua Quick 2019-04-05

    [~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 TabGroup is created, but before it has been opened._ https://github.com/appcelerator/yeti/blob/master/Modules/Image_View/App/acceptance.js
  13. Christopher Williams 2019-04-05

    This 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.
  14. Joshua Quick 2019-04-09

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10832 PR (8.0.x): https://github.com/appcelerator/titanium_mobile/pull/10833
  15. Samir Mohammed 2019-04-11

    FR Passed, waiting on Jenkins.
  16. Christopher Williams 2019-04-15

    Merged to master and 8_0_X.
  17. Samir Mohammed 2019-04-17

    Closing ticket, fix verified in SDK version 8.1.0.v20190416065710 and SDK version 8.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/10833
  18. Hans Knöchel 2019-05-19

    I think this caused a regression in 8.0.1 and 8.1.0: TIMOB-27092
  19. Hans Knöchel 2019-05-20

    We can confirm that reverting this pull request fixes the window transition issues.

JSON Source