Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14251] BlackBerry : Setting 'contentWidth' on scrollview for buttons displays them on the left of the screen

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2014-05-27T23:23:41.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.1.1
ComponentsBlackBerry
Labelsmodule_scrollView, qe-3.1.1, qe-3.3.0, qe-testadded, regression, sdk-bb
ReporterLokesh Choudhary
AssigneePedro Enrique
Created2013-06-15T22:35:54.000+0000
Updated2014-06-30T09:36:57.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(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();
2. Build it for BB device/simulator 3. launch the app & observe the buttons Actual Result: 1. The buttons are seen at the very left side of the screen Expected Result: 1. The buttons should be at the center of the screen

Attachments

FileDateSize
TIMOB-14251.png2013-08-02T07:17:21.000+000072608

Comments

  1. Lokesh Choudhary 2013-06-16

    Verified the fix & the buttons are displaying the center according to the code. 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 Attached the screenShot for the same
  3. Pedro Enrique 2013-08-02

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/145
  4. Priya Agarwal 2013-09-25

    Verified the fix with: Studio: 3.1.3.201309132456 SDK: 3.1.4.v20130918151553 acs:1.0.6 alloy:1.2.2 titanium:3.1.2 titanium-code-processor:1.0.3 OS: OSX 10.8.4 Device:Blackberry-Z10(v 10.0.10.261) Closing the issue as getting the Buttons placed on center though scrollview has been set with ContentWidth.
  5. Olga Romero 2014-05-27

    Tested and ran in to the original issue, all buttons are on the left. 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)
  6. Pedro Enrique 2014-05-27

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/248
  7. Pedro Enrique 2014-05-27

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/248
  8. 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 button on center of the screen. Working as expected. Hence closing the issue.

JSON Source