Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9423] Android: Scrollable view "addView" method not working

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-09-07T03:31:02.000+0000
Affected Version/sRelease 2.0.2, Release 2.0.1
Fix Version/sSprint 2012-15 API, Release 2.1.2, Release 3.0.0
ComponentsAndroid
Labelsapi, module_scrollableview, parity, qe-review, qe-testadded
ReporterNikhil Sharma
AssigneeKarl Rowley
Created2012-06-06T13:06:34.000+0000
Updated2012-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();

Comments

  1. Tamila Smolich 2012-08-13

    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.
  2. Ping Wang 2012-08-13

    PR https://github.com/appcelerator/titanium_mobile/pull/2602
  3. Vishal Duggal 2012-08-14

    Reopening to edit fixVersion
  4. Vishal Duggal 2012-08-14

    Fixed in 2_1_X by https://github.com/appcelerator/titanium_mobile/pull/2733
  5. Anshu Mittal 2012-09-07

    Reopening to update labels
  6. Esben Maaløe 2012-10-07

    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
  7. Esben Maaløe 2012-10-07

    Correction: The view is not added in emulator (HVGA - Android 2.3.3), it is on device.

JSON Source