Problem
The open window method have activityEnterAnimation and activityExitAnimation that can be used to specify the animation of the transition between the current and the new activity. The same properties should be available to the close window method so the close animation can be customized. When implemented the attached project should be able to transition both on open and close.
Test case
var win = Ti.UI.createWindow({
backgroundColor : '#fff',
orientationModes : [Titanium.UI.PORTRAIT],
exitOnClose : true,
navBarHidden : true
});
win.open();
var button = Titanium.UI.createButton({
title: 'Open new window',
width: 300,
height: 75
});
button.addEventListener('click',function(e) {
var win2 = Ti.UI.createWindow({
backgroundColor : '#0ff',
orientationModes : [Titanium.UI.PORTRAIT],
navBarHidden : true
});
win2.addEventListener('android:back', function() {
win2.close({
activityEnterAnimation: Titanium.App.Android.R.anim.slide_in_right,
activityExitAnimation: Titanium.App.Android.R.anim.slide_out_left
});
win2.removeEventListener('android:back', arguments.callee);
})
win2.open({
activityEnterAnimation: Ti.Android.R.anim.slide_in_left,
activityExitAnimation: Ti.Android.R.anim.slide_out_right
});
});
win.add(button);
Hi Jesper, Thanks, so I'll close this as duplicate - you can interject in TIMOB-13543 if there's anything you think they're missing.