[TIMOB-9423] Android: Scrollable view "addView" method not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-07T03:31:02.000+0000 |
Affected Version/s | Release 2.0.2, Release 2.0.1 |
Fix Version/s | Sprint 2012-15 API, Release 2.1.2, Release 3.0.0 |
Components | Android |
Labels | api, module_scrollableview, parity, qe-review, qe-testadded |
Reporter | Nikhil Sharma |
Assignee | Karl Rowley |
Created | 2012-06-06T13:06:34.000+0000 |
Updated | 2012-10-07T12:02:11.000+0000 |
Description
Scrollable View "addView" method doesn't work in android. This method works in IOS.
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();
Closing as fixed. Tested and verified on: Titanium Studio, build: 2.1.1.201208091713 Titanium SDK, build: 2.2.0.v20120810194112 Devices: Nexus 7 tab (4.1), HTC Evo (4.0.3), Android Emulator (2.2) The yellow view added to scrollable view now is visible.
PR https://github.com/appcelerator/titanium_mobile/pull/2602
Reopening to edit fixVersion
Fixed in 2_1_X by https://github.com/appcelerator/titanium_mobile/pull/2733
Reopening to update labels
Host OS: Linux OS Arch: x86 JRE Version: 1.6.0_25 JRE Vendor: Sun Microsystems Inc. Version: 2.1.2.201208301612 Titanium Mobile SDK Version: 2.1.3 the yellow view is still not added in TiSDK 2.1.3
Correction: The view is not added in emulator (HVGA - Android 2.3.3), it is on device.