Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10723] MobileWeb: Scrollable view "addView" method not working

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-01-08T14:31:03.000+0000
Affected Version/sRelease 2.1.1
Fix Version/sRelease 3.0.1, Release 3.1.0, 2012 Sprint 26 JS, 2012 Sprint 26
ComponentsMobileWeb
Labelsapi, parity, qe-port
ReporterArthur Evans
AssigneeBryan Hughes
Created2012-08-30T10:19:35.000+0000
Updated2013-01-26T02:08:18.000+0000

Description

Using the same code from the original bug, the scrollable view locks up on Mobile Web (won't scroll). I thought it was because it was placed in a table view row, but actually commenting out the call to addView fixes the problem. This works in iOS (and as of 2.1.2, in Android as well).

Repo Steps

1. Run the below code in your app.js 2. You can't see the yellow view added to the scrollable view.
var win = Ti.UI.createWindow({backgroundColor:'white'});
var table = Titanium.UI.createTableView();
win.add(table);
var row = Titanium.UI.createTableViewRow();
table.appendRow(row);
 
var view1 = Ti.UI.createView({ backgroundColor:'red' });
var view2 = Ti.UI.createView({ backgroundColor:'green' });
var view3 = Ti.UI.createView({ backgroundColor:'blue' });
 
var scrollableView = Ti.UI.createScrollableView({
  views:[view1,view2,view3],
  showPagingControl:true,
  height: 200
});
var view4 = Ti.UI.createView({backgroundColor:'yellow'});
scrollableView.addView(view4);
row.add(scrollableView);
win.open();

Comments

  1. Chris Barber 2012-09-11

    Verified this is indeed a valid bug. :(
  2. Bryan Hughes 2012-12-11

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/3569
  3. Bryan Hughes 2012-12-17

    3_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/3611
  4. Olga Romero 2013-01-26

    Closing. Tested and verified fix with: Titanium Studio, build: 3.0.1.201212181159 Titanium SDK, build: 3.0.2.v20130125144710 Chrome 23.0 iPhone5 6.0 Nexus4 4.2

JSON Source