Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10302] Android: Heavyweight window animations on open not working

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-11-16T10:12:09.000+0000
Affected Version/sRelease 2.1.1
Fix Version/sRelease 3.1.0, 2012 Sprint 23 Core, 2012 Sprint 23
ComponentsAndroid
LabelsSupportTeam, core, insight, module_animation, qe-testadded
ReporterVarun Joshi
AssigneeBill Dawson
Created2012-08-02T15:10:02.000+0000
Updated2013-09-27T09:27:29.000+0000

Description

Issue

Animations on opening a window are not working on some Android versions.

Steps to Reproduce

1. Run the sample code below {noformat} var win = Ti.UI.createWindow({ backgroundColor: 'white' }); win.open(); win.addEventListener('click', function(){ var win1 = Ti.UI.createWindow({ backgroundColor: 'red', left: 320, navBarHidden: true }); var slide_it_left = Titanium.UI.createAnimation(); slide_it_left.left = 0; slide_it_left.duration = 300; win1.open(slide_it_left); }); {noformat} 2. The above code only shows animation (right to left) on Android 2.3 but not on Android 4.0. Also, only the right to left animation is working. None of the other animations i.e bottom to top work.

Comments

  1. Bill Dawson 2012-11-14

    Author says that the animation shows on Android 2.3. I'm not seeing that. I would think this isn't working at all, anywhere, on any version of Android. Still investigating solution.
  2. Bill Dawson 2012-11-15

    With exactly that code above? If you change the code to change the slide_it_left.duration to 3000 (instead of 300) to make it very exaggerated and slow, you see a slow animation? I see nothing but the default activity transition that Android always shows.
  3. Bill Dawson 2012-11-15

    Can you try my suggestion and see if you see a slow, 3-second long transition from left to right?
  4. Bill Dawson 2012-11-15

    Title changed to reflect that work being done on this is for heavyweight windows only, since the sample fail case is a heavyweight window. window.open() animations are also not working on lightweight windows, but those need to be handled differently and thus via another ticket that I will create and link here.
  5. Varun Joshi 2012-11-15

    Here is what I see: http://screencast.com/t/ZGJctsVs [On Google APIS Android 2.3.3 Emulator] and http://screencast.com/t/qR3ByVucJjp [On Google APIS Android 4.0 Emulator]
  6. Bill Dawson 2012-11-15

    Did you make the change to 3000 for those videos?
  7. Bill Dawson 2012-11-15

    Testing Notes

    Review the documentation changes (the diff in the pull request) to understand what's going on.

    Create a new Titanium Android application and use the following as the app.js:

       var win = Ti.UI.createWindow({
       	backgroundColor: 'white'
       });
        
       win.open();
        
       win.addEventListener('click', function(){
       	var win1 = Ti.UI.createWindow({
       		backgroundColor: 'red',
       		navBarHidden: true
       	});
       	win1.open({
       		activityEnterAnimation: Ti.Android.R.anim.fade_in,
       		activityExitAnimation: Ti.Android.R.anim.fade_out
       	});
       });
       

    Run the app.

    After the app loads and the empty white window appears, click the white window anywhere.

    You should see a new window (activity) open and fade-in (to red) as it does so. (You should see it go through some pink stages before hitting its solid red.)

  8. Bill Dawson 2012-11-15

    Pull request ready: https://github.com/appcelerator/titanium_mobile/pull/3431
  9. Martin Guillon 2012-12-10

    It s working great except that on my 4.1 device only the enter animation works. The exit animation still is the Scale/fade effect. Same on the simulator
  10. kent hao 2013-01-16

    as the title, it's not working when we're using heavyweight window, does it mean it's working for lightwindow? but for me, both are not working. my system is sdk2.1.1, android4.0
  11. Shyam Bhadauria 2013-01-22

    Environment used for verification - Titanium SDK: 3.1.0.v20130114171802 Titanium  Studio: 3.0.1.201212181159 Device : Samsung GALAXY Note Android 2.3.6, Nexus 7 Android 4.1

JSON Source