Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14252] BlackBerry : Setting 'contentWidth' on scrollview for labels puts them in an infinite drawing loop

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-08-02T23:07:39.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.1.1
ComponentsBlackBerry
Labelsqe-3.1.1, qe-testadded, regression, sdk-bb
ReporterLokesh Choudhary
AssigneePedro Enrique
Created2013-06-15T22:41:15.000+0000
Updated2014-06-30T09:35:39.000+0000

Description

Note : This is a regression. Description: 1. Create an app for BB with the following code:
var win = Titanium.UI.createWindow();
 
var scroll = Ti.UI.createScrollView({
    backgroundColor: 'green',
    width: Ti.UI.FILL,
    height: Ti.UI.FILL,
    layout: 'vertical',
    contentHeight:Ti.UI.SIZE,
    contentWidth:Ti.UI.SIZE 
});
 
function MyButton(text) {
    return Ti.UI.createLabel({
        text: text,
        top: 10,
        //width:50
    });
}
 
for(var i = 0; i < 100; i++) {
    scroll.add(MyButton('Label #' + (i + 1))); 
}
 
win.add(scroll);
win.open();
2. Build it for BB device/simulator 3. launch the app & observe the labels Actual Result: 1. The labels are in an infinite drawing loop Expected Result: 1. The labels should be displayed in the center of the screen

Attachments

FileDateSize
TIMOB-14252.png2013-08-02T07:51:30.000+000072153

Comments

  1. Lokesh Choudhary 2013-06-16

    Verified the fix & the labels are now displayed as in the code & do not get in an infinite drawing loop. Thus closing. Environment: Ti Studio : 3.1.1.201306112235 Ti BB SDK : 3.1.1.v20130615160957 Mac OSX : 10.8.3 Alloy : 1.1.3-cr CLI - 3.1.1-cr win 7 Win 8 Z10 BB simulator : 10.0.10.822 Z10 device running 10.0.10.88
  2. Priya Agarwal 2013-08-02

    Verified with: Studio: 3.1.2.201307311816 SDK: 3.1.2.v20130801190110 acs:1.0.4 alloy:1.2.0-alpha3 titanium:3.1.2-alpha titanium-code-processor:1.0.2-alpha OS: OSX 10.8.4 Device:Blackberry-Z10(v 10.0.10.261) blackberry SDK: 10.1.0.1020 Labels are not put on infinite loop but are seen towards left of the screen not on the centre. Also attached the screenshot for the same.
  3. Pedro Enrique 2013-08-02

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/145
  4. Olga Romero 2014-05-27

    Tested and verified labels are not in infinite loop, however are not centered. Linking to TIMOB-14251. Environment: Appcelerator Studio, build: 3.3.0.201405161313 Titanium SDK, build: 3.3.0.v20140524224144 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-alpha4 npm@1.3.2 titanium@3.3.0-alpha5 titanium-code-processor@1.1.1 Device: BB Z10 (10.2.1)
  5. Priya Agarwal 2014-06-30

    Verified with: Appcelerator-Studio:3.3.0.201406271159 Sdk:3.3.0.v20140627202512 acs:1.0.14 alloy:1.4.0-rc3 npm:1.3.2 titanium:3.3.0-rc4 titanium-code-processor:1.1.1 xcode:5.1.1 OS:Maverick(10.9.3) Device:Blackberry Z10(10.0.10.261) Setting 'contentWidth' on scrollview displays all the buttons.Does not goes on infinite loop. Working as expected. Hence closing the issue.

JSON Source