[AC-5837] Android: Window activityExitAnimation is Ignored
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Resolved |
| Resolution | Duplicate |
| Resolution Date | 2018-08-14T16:18:17.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | Android, bug |
| Reporter | Russell Kenny |
| Assignee | Shak Hossain |
| Created | 2018-08-14T14:37:53.000+0000 |
| Updated | 2018-08-14T16:18:18.000+0000 |
Description
I'm trying to configure my windows to use consistent transition animations and found that while activityEnterAnimation works properly, the values I specify for activityExitAnimation are ignored and the default animation is used instead.
Window 1 XML:
<Alloy>
<Window id="testWin1" title="Test Window 1" zIndex="100">
<View layout="vertical" backgroundColor="#393">
<Label color="#fff">This is test window 1</Label>
<Button onClick="openWin2">Open Win 2</Button>
</View>
</Window>
</Alloy>
Window 1 Controller JS:
function openWin2() {
var objWin = Alloy.createController('testWin2').getView();
objWin.open();
}
$.testWin1.open({
activityEnterAnimation: Ti.Android.R.anim.fade_in,
activityExitAnimation: Ti.Android.R.anim.fade_out
});
Window 2 XML:
<Alloy>
<Window id="testWin2" title="Test Window 2" zIndex="200">
<View layout="vertical" backgroundColor="#33f">>
<Label color="#fff">This is test window 2</Label>
<Button onClick="closeWin">Close Win 2</Button>
</View>
</Window>
</Alloy>
Window 2 Controller JS:
function closeWin() {
$.testWin2.close();
}
$.testWin2.open({
activityEnterAnimation: Ti.Android.R.anim.fade_in,
activityExitAnimation: Ti.Android.R.anim.fade_out
});
Note that I've tried several different values for activityExitAnimation (as identified on https://developer.android.com/reference/android/R.anim) and they were all ignored. I also tried testing in both Android 16 and Android 23 and the result was the same in both places (although of course the default animation differs between android releases).
Sorry, I just saw that this is a duplicate of TIMOB-24586.