Reputation: 7161
I'm trying to follow some guides about window animation for android in Appcelerator Titanium, but none of them actually mentions lightweight vs heavyweight windows.
In any case, the simplest example doesn't work:
// in mainWindow do:
var winInfoView = Ti.UI.createWindow({
title : "info",
url : 'infoview.js',
// notice I don't set the window fullscreen or modal property so that the window remains lightweight
});
winInfoView.open({
animated : true
});
Neither does a more complicated one:
// in mainWindow do:
var winInfoView = Ti.UI.createWindow({
title : "info",
url : 'infoview.js',
// notice I don't set the window fullscreen or modal property so that the window remains lightweight
});
var slideLeft = Ti.UI.createAnimation();
slideLeft.left = 0;
slideLeft.duration = 300;
winInfoView.open(slideLeft);
So, is it possible to animate the opening of the lightweight window? How?
Upvotes: 2
Views: 1191
Reputation: 4361
as explained at docs : http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window
be sure you had add this code to your tiapp.xml, for can using lightwindow in android platform
<property name="ti.android.useLegacyWindow" type="bool">true</property>
this code is work perfectly for me :
var menuWindow = Ti.UI.createWindow({
top:0,
left:0,
width:150
});
menuWindow.open({
activityEnterAnimation: Ti.Android.R.anim.slide_in_left
});
menuWindow.add(something);
Upvotes: 1