var main = Ti.UI.createWindow({ backgroundColor:'#000' });
var container = Ti.UI.createView({ height:300, width:300, backgroundColor:'#fff' });
main.add(container);
var shifty = Ti.UI.createView({ top:10, left:10, height:200, width:200, backgroundColor:'#ff0000' });
container.add(shifty);
var btn = Ti.UI.createButton({ title:'do it', height:50, width:100, bottom:10 });
btn.addEventListener('click', function() {
shifty.animate({ height:50, width:50, duration:1500 });
});
main.add(btn);
main.open();
Run the above test case on Samsung S3 (4.0.4) and click the button.
Expected behavior: both height and width of the square animate to 25%.
Actual behavior: see the attached screen shot in TIMOB-2373.
If we turn on the hardware acceleration in tiapp.xml
android:hardwareAccelerated="true"
the animation will work fine.
This bug only happens on 3.2.0 because in 3.2.0 we start using the new animation mechanism - [Property Animation](
http://developer.android.com/guide/topics/graphics/prop-animation.html).
[~ingo], Correct.. at this point, we do not know of a more graceful fix.
PR: https://github.com/appcelerator/titanium_mobile/pull/5226 For FR, please follow the testing steps in TIMOB-15951, TIMOB-16087, TIMOB-15719, TIMOB-2373, TIMOB-13536.
3_2_X PR: https://github.com/appcelerator/titanium_mobile/pull/5245
Verified the fix on samsung galaxy S3 running android 4.0.4 & it seems to be fixed. We do not see any side effects & the animations are smooth as expected. Environment: Appc Studio : 3.2.3.201403181115 Ti SDK : 3.2.3.v20140320130134 , 3.3.0.v20140319124903 Mac OSX : 10.8.5 Alloy : 1.3.1 CLI - 3.2.1