GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-04-17T22:28:48.000+0000 |
Affected Version/s | Release 3.2.0, Release 3.2.1 |
Fix Version/s | 2014 Sprint 08, 2014 Sprint 08 SDK, Release 3.3.0 |
Components | Android |
Labels | module_scrollview, qe-closed-3.3.0, qe-testadded, supportTeam |
Reporter | Rupesh Sharma |
Assignee | Hieu Pham |
Created | 2014-02-20T08:27:07.000+0000 |
Updated | 2014-06-19T12:43:08.000+0000 |
Description
When using a scrollview and setting layout to 'horizontal', I wish to scroll the content in a horizontal fashion, Setting contentWidth to Ti.UI.SIZE or Ti.UI.FILL or auto doesn't work unless I specify the specific contentWidth.
This used to work properly in previous version sdk 3.1.3.GA
Test Case
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
function createRow(i) {
var row = Ti.UI.createView({
backgroundColor: 'white',
borderColor: '#bbb',
borderWidth: 1,
width:40, height: 40,
top: 0, left: 4
});
return row;
}
var scrollView = Ti.UI.createScrollView({
bottom:120,
layout: 'horizontal',
contentWidth:'auto',
contentHeight:50,
height:50
});
for(var i = 0; i <= 20; i++){
var row = createRow(i);
scrollView.add(row);
}
win.add(scrollView);
win.open();
Expected Behaviour :
It should allow to scroll horizontally
Actual Behaviour :
Its not allowing to scroll horizontally
Note : If I set any specific contentWidth (any specific value) then it will allow me to scroll.
Another test case:
PR https://github.com/appcelerator/titanium_mobile/pull/5601 merged into master
Tested and verified the ability to scroll content in scrollview. Titanium SDK, build 3.3.0.v20140418162516 Node.JS Version: v0.10.13 NPM Version: 1.3.2 ├── acs@1.0.14 ├── alloy@1.3.1 ├── node-appc@0.2.0 ├── npm@1.3.2 ├── titanium@3.3.0-dev └── titanium-code-processor@1.1.1-beta1 npm -g ls titanium: /usr/local/lib └── titanium@3.3.0-dev (git://github.com/appcelerator/titanium.git#93414d143051df4578b7aa42670008e5ef02c422) XCode Version: 5.1.1 Devices: Nexus 4 Android version 4.4 iPhone 5S iOS 7.0