Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13136] BlackBerry : In a complex layout the parent view starts rendering the controls before they are placed in their positions

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-07-25T22:42:36.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 15 API, 2013 Sprint 15, Release 3.1.2, Release 3.2.0
ComponentsBlackBerry
Labelsqe-3.1.2, qe-testadded, sdk-bb
ReporterLokesh Choudhary
AssigneePedro Enrique
Created2013-03-20T18:48:54.000+0000
Updated2014-06-19T12:43:10.000+0000

Description

Descriptions: 1.Run the code snippet below on BB simulator/device
var win = Titanium.UI.createWindow();
 
var scroll = Ti.UI.createScrollView({
    backgroundColor: '#ccc',
    width: 200,
    height: 300,
    layout: 'vertical',
    contentHeight: Ti.UI.SIZE,
    contentWidth: Ti.UI.FILL
});
 
function MyButton(title) {
    return Ti.UI.createButton({
        title: title,
        top: 10
    });
}
 
for(var i = 0; i < 100; i++) {
    scroll.add(MyButton('Button #' + (i + 1))); 
}
 
win.add(scroll);
win.open();
Actual Result: 1.Notice when the app starts you can see that the parent view starts rendering the buttons even before the buttons are where they should be actually. 2.You will the buttons start getting rendered from the left of the screen when you run the app. 3.In more complex apps with many controls & window it will not be pleasing so see this after we start the app Expected Result: 1.The parent should wait for the controls to be in their positions before it starts rendering them

Comments

  1. Pedro Enrique 2013-07-10

    https://github.com/appcelerator/titanium_mobile_blackberry/pull/126
  2. Lokesh Choudhary 2013-08-09

    Verified the fix. Now the parent renders the controls before rendering itself. Thus closing. Environment: Appcel Studio : 3.1.2.201308082014 Ti SDK : 3.1.2.v20130808180613 Mac OSX : 10.8.4 Alloy : 1.2.0-alpha6 CLI - 3.1.2-alpha win 7 Win 8 Z10 BB simulator : 10.0.10.822 Z10 device running 10.0.10.88
  3. Samuel Dowse 2013-09-26

    Verified the fix, parent renders controls before itself. Environment: Titanium Studio, build: 3.1.3.201309132423 Titanium SDK: 3.1.3.GA BB SDK: 10.2.1 Mac OSX : 10.8.5 Alloy : 1.2.2 Z10 BB simulator : 10.2.1 Z10 device running 10.0.10.88

JSON Source