[TIMOB-16087] Android: Content inside of an animating container does not behave as expected
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-01-22T22:21:52.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | 2014 Sprint 02, 2014 Sprint 02 API, Release 3.2.3, Release 3.3.0 |
Components | Android |
Labels | android, module_animation, parity, qe-closed-3.2.3, qe-testadded, regression |
Reporter | Matthew Congrove |
Assignee | Ping Wang |
Created | 2013-12-26T21:23:14.000+0000 |
Updated | 2014-04-18T20:25:26.000+0000 |
Description
Animations that worked in 3.1.X on Android have now changed behavior and broken pre-existing UX. There are two problems I've noticed thus far:
1) Content inside of an animating container does not behave as expected
2) Animating views do not properly push aside other views inside the same container, e.g. with layout horizontal (duplicate of TIMOB-15951)
Sample code, for TABLET only, is available here: https://github.com/mcongrove/TitaniumAnimationDemo
After installing the application on an Android tablet, try the following steps:
1) At the top-right of the application, swipe down on the "Alert: TiDev.io Launches" black bar. This should act as a drawer to display new content, but instead the black bar view simply stretches.
2) On the first large content box (grey), tap the full-screen button in the top-right. Instead of pushing the following boxes, it instead expands behind them. It also stretches all content inside the box.
To see how any of this SHOULD work, run the application on an iPad.
Matt, is issue #2 TIMOB-15951?
Ingo, yes, it looks to be the same as the second issue I've reported. Sorry, I didn't see that one in my search :)
No problem. I'm glad, as otherwise I was going to ask you to file two separate tickets. :) I'll repurpose this one for issue #1.
Test case:
In 3.2.0.GA, click "Scaling Test". The green view is scaled up/down along with the red view. In 3.1.3.GA, click "Scaling Test". The green view keeps the same size while the red view is scaled up/down.
The root issue is the children views are scaled up/down with the parent view even the dimensions of the children views are defined as absolute values (eg. "50px"). This is not our bug but a native Android behavior when using Honeycomb+ Property Animation which is introduced in 3.2.0. However, technically speaking, this is a regression.
If the developer wants to keep the size of the child view unchanged while the parent view is scaled, one workaround is to scale the child view to compensate the size change. For the above test case, we can use the workaround like:
Using the above TestCode: Appc-Studio: 3.2.1.201401061716 acs:1.0.11 alloy:1.3.1-beta npm:1.3.2 titanium:3.2.0 titanium-code-processor:1.1.0 Osx: Maverick 10.9 Device:Nexus7(v4.4.2) Issue still exists in both sdk build:3.2.1.v20140106195644 and 3.3.0.v20140106195650 Observed Result: In 3.1.3.GA, click "Scaling Test". The green view keeps the same size while the red view is scaled up/down. In 3.2.0.GA,3.2.1.v20140106195644 and 3.3.0.v20140106195650 click "Scaling Test". The green view is scaled up/down along with the red view.
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
Tested and verified the correct behavior of the red and the green views. Mac osx 10.9.2 Mavericks Titanium SDK, build: 3.2.3.v20140320130134 Node.JS Version: v0.10.13 NPM Version: 1.3.2 ├── acs@1.0.14 ├── alloy@1.3.1 ├── npm@1.3.2 ├── titanium@3.2.1 └── titanium-code-processor@1.1.0 Device: Nexus 4 Android version 4.2