[TIMOB-2373] Android: Height and width animations have side effects
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-11-14T20:22:42.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | 2013 Sprint 23, 2013 Sprint 23 API, Release 3.2.0 |
Components | Android |
Labels | core, insight, module_animation, qe-closed-3.2.0, qe-testadded |
Reporter | Kevin Whinnery |
Assignee | Hieu Pham |
Created | 2011-04-15T03:18:07.000+0000 |
Updated | 2014-02-21T06:22:56.000+0000 |
Description
When attempting to animate height and width on a view in Android, there are some interesting side effects going on in the parent view. Here's an app.js to repro:
// Create application main window
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();
Attachments
File | Date | Size |
---|---|---|
droid3.png | 2013-10-23T18:22:01.000+0000 | 15976 |
samsung_s3.png | 2013-10-23T18:22:01.000+0000 | 28682 |
samsung_s4.png | 2013-10-23T18:22:01.000+0000 | 38249 |
Still occurs in heavyweight windows too.
rollback wrong update
Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120821095711, issue still valid. Sometimes it animates the view perfectly fine, other times it actually has some weird effect on the parent view. If you keep trying for a few times, you should eventually be able to reproduce it.
This is resolved in 3.2.0.
Reopening ticket. Bug still occurs on Samsung Galaxy S4 (4.2.2) and Samsung Galaxy S3 (4.0.4) (see samsung_s4.png and samsung_s3.png). However, bug seems fixed on Droid3 (2.3.4) (see droid3.png) Tested on: Titanium Studio, build: 3.2.0.201310230548 OS: Mac OS X Mountain Lion (10.8.5) SDK build: 3.2.0.v20131022171645 Ti CLI: 3.2.0 (72f7426b4ee6c2d2883c666d5b7e03906a16012f) Devices: Droid3 (2.3.4), Samsung Galaxy S3 (4.0.4), Samsung Galaxy S4 (4.2.2) Note: If you are testing on a higher density android device like Samsung Galaxy S3, then add this to you tiapp.xml:
master PR: https://github.com/appcelerator/titanium_mobile/pull/4957
The above PR fixes the issue on JellyBean devices. The issue on Galaxy S3 is filed as a different ticket TIMOB-15719. Resolved this ticket as Fixed.
+Verified fixed on:+ Max OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311200322 Titanium SDK, build: 3.2.0.v20131120142443 CLI: 3.2.0-alpha Alloy: 1.3.0-alpha +Tested and fixed on the following devices:+ Sony Xperia U (2.3.7) Sony Xperia S (4.1.2) Samsung Galaxy Note II (4.1.2) Google Nexus 5 (4.4) Samsung Galaxy S4 (4.2.2 +Still occurs on:+ Samsung Galaxy SIII (4.0.4) Animation runs smoothly using the code in the example with both fixes provided in comments. Closing.