[TIMOB-11764] [ios] scrollableview doesnt behave correctly on width/height animation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2017-06-20T21:35:36.000+0000 |
Affected Version/s | Release 2.1.2, Release 2.1.3, Release 2.1.4, Release 3.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | ios, resize, scrollableview |
Reporter | Martin Guillon |
Assignee | Eric Merriman |
Created | 2012-08-21T07:38:12.000+0000 |
Updated | 2017-06-20T21:35:36.000+0000 |
Description
When resizing a scrollableview, you get very strange behaviours. Mostly pages are not resize correctly:
- the page view is resized but not the page view children
- animation as different effect depending on which page we are on (first one is the closest to be ok).
test case
var win = Ti.UI.createWindow();
var view1 = Ti.UI.createView({ backgroundColor:'#123' });
var view2 = Ti.UI.createView({ backgroundColor:'#246' });
var view3 = Ti.UI.createView({ backgroundColor:'#48b' });
var inView1 = Ti.UI.createView({ backgroundColor:'black', width:"70%" , height:"70%"});
view1.add(inView1);
var inView2 = Ti.UI.createView({ backgroundColor:'black', width:"70%", height:"70%" });
view2.add(inView2);
var inView3 = Ti.UI.createView({ backgroundColor:'black', width:"70%", height:"70%" });
view3.add(inView3);
var scrollableView = Ti.UI.createScrollableView({
views:[view1,view2,view3],
width:300,
height:200
});
var needsShrink = true;
win.add(scrollableView);
var button = Titanium.UI.createButton({
title: 'resize',
top: 10,
width: 100,
height: 50
});
button.addEventListener('click',function(e)
{
scrollableView.animate({
height:(needsShrink?100:200),
width:(needsShrink?200:300)
});
needsShrink = !needsShrink;
});
win.add(button);
win.open();
Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) iOS iPhone Simulator: iOS SDK version: 6.0
I am unable to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170620103414 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131