Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19462

iOS: Titanium Labels not aligned on horizontal layout in a view

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 3.5.1, Release 4.0.0, Release 4.1.0
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      iOS8.4
      Xcode 6.4
      Titanium SDK 3.5.1.GA, 4.0.0.GA, 4.1.0.GA

    • Story Points:
      1

      Description

      Issue Description

      There is an horizontal view and when the user add Labels and/or text inputs to the view the label text is not aligned at the edge of the screen, see the attached image.

      Expected behavior

      The text should be aligned

      Steps to Replicate:

      1. Create a new titanium classic default project
      2. Open the app.js file
      3. Replace the app.js with the code in the test case
      4. Run on iOS iphone 5/5S

      Test Case

      var mainWindow =Ti.UI.createWindow({
      top:20,
      backgroundColor:'white',
      layout:'horizontal'
      });
       
      var mainView = Ti.UI.createView({
      backgroundColor:'white',
      layout:'horizontal'
      });
       
       
      var label1 = Ti.UI.createLabel({
      text : 'label1 ',
      });
       
      var label2 = Ti.UI.createLabel({
      text : 'label2 ',
      });
      var label3 = Ti.UI.createLabel({
      text : 'label3 ',
      });
      var label4 = Ti.UI.createLabel({
      text : 'label4 ',
      });
       
      var input = Ti.UI.createTextField({
        borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
        keyboardType:"Ti.UI.KEYBOARD_DECIMAL_PAD",
        textAlign:"right",
        enableReturnKey:"true", 
        keyboardToolbarColor:"#999",
        returnKeyType:"Ti.UI.RETURNKEY_DONE",
        hintText:"8.0",
        maxLength:"4",  
        color: '#336699'
      });
       
      var label5 = Ti.UI.createLabel({
      text : 'label5 ',
      });
       
      var label6 = Ti.UI.createLabel({
      text : 'label6 ',
      horizontalWrap: true
      });
      var label7 = Ti.UI.createLabel({
      text : 'label7 ',
      });
      var label8 = Ti.UI.createLabel({
      text : 'label8 ',
      });
       
       
      // Add to the parent view.
      mainView.add(label1);
      mainView.add(label2);
      mainView.add(label3);
      mainView.add(label4);
      mainView.add(input);
      mainView.add(label5);
      mainView.add(label6);
      mainView.add(label7);
      mainView.add(label8);
       
      mainWindow.add(mainView);
      mainWindow.open();
      
      

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              rramirez Ricardo Ramirez
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-20321
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration